0
\$\begingroup\$

From what I gathered, wrappers mimic the game server in question, receiving packets from client and sending them to the server (and vice versa). It acts like a bridge between the client and server, allowing data to flow and modifying/reading it as it travels through it.

Am I right in how wrappers work? What is the general gist of them? How would one go about writing one?

I plan to write one for Starbound in Java, using https://github.com/StarryPy/StarryPy as a reference to the packets.

\$\endgroup\$
3
  • \$\begingroup\$ I think it's kinda edge case here, but in general you're better off trying some code on your own and then asking for help in case you're stuck. Don't start asking before you even started. \$\endgroup\$
    – Mario
    Mar 4, 2015 at 9:01
  • 1
    \$\begingroup\$ What exactly is the problem you want to solve? \$\endgroup\$
    – Philipp
    Mar 4, 2015 at 14:01
  • \$\begingroup\$ Sorry, I know relised my question was fairly vague. I was just asking if my idea is correct, and if not, what is the way wrappers work. \$\endgroup\$ Mar 5, 2015 at 7:54

1 Answer 1

1
\$\begingroup\$

Yes, you'd essentially create a bridge - no wrapper - but that's terminology.

  • The basic idea is to use two network connections.
  • You've got one listen port that will act to the actual game as if it was the actual game server.
  • The bridge will also establish a connection to the real server and pretend to be the actual game client.
  • The rest is pretty simplistic: You pass through packages:
    • Stuff sent by the game client is passed to the game server.
    • Stuff sent by the game server is passed to the game client.

As a suggestion, start easy. Write a simple pass through bridge that works with any simple protocol. For example, IRC or HTTP.

Read the incoming data on one end, send it out on the other end, and possibly print it to a console window.

Once your "http proxy" works, you should be able to use it for Starbound or any other game with some minor modifications.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .