Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[In-Depth] Making a MapleStory redirector

Initiate Mage
Joined
Sep 29, 2017
Messages
2
Reaction score
0
Briefing: This tutorial is meant to teach you how to make a redirector, from scratch. It will not include any code, it will explain the concepts behind making a redirector in-depth, however. All you need to know is how to use the TCP networking library in your favorite programming language.

Imagine the following scenario:
ahXAmBI - [In-Depth] Making a MapleStory redirector - RaGEZONE Forums

On your computer you have MapleStory. Now, the client is a vanilla one (completely unedited). By default, the client will try reaching out to Nexon's servers. This is the behavior we're going to alter with our redirector.

Conceptually, this works like so:
VlzWNAo - [In-Depth] Making a MapleStory redirector - RaGEZONE Forums

All traffic is rerouted through our app (the redirector), from the client to the server and back.

How to actually achieve this
You set up a tcp server (bound to localhost:8484) in your redirector and wait for an incoming connection. Once a connection is established, you make a new TCP connection to your server's loginserver; once your server accepts the connection, you simply "pipe" the packets across, like so:
t7V1cfx - [In-Depth] Making a MapleStory redirector - RaGEZONE Forums

Data sent in the direction of the arrow. Red represents a TCP connection, green represents the pipe your program must implement. Generally, this is as easy as piping an input stream into an output stream.

This is how a redirector works internally. It's dead simple yet elegant. However, we're still missing one final step.

Derouting Nexon's IP
A simple, clever hack that makes any and all traffic sent to a certain IP be derouted to the local host. Without this step, your redirector will not work!

This can be achieved with the netsh int ip command line utility. Read the documentation and figure out how to do it yourself :p

Important information
If you pipe only port 8484 (login), your game will crash after entering pin/pic. To fix this, you must pipe your channel ports (generally 8585 on) as well as your cash shop port (8610). Check your source for these values, though.
Either way, a TCP connection is closed (in favor of a new one) once you enter the game(login->channel), change channel (channelA->channelB), enter cs (channel->cs), leave cs (cs->channel) and log out (channel->login).

In other words, the game will only have one active connection at a time and its port number will change, be ready to deal with that

You should take this into account, since if you don't have a TCP server ready to accept a new connection on that port, your game will crash.
If I missed anything or you have any questions, put them below.

Enjoy!
 

Attachments

You must be registered for see attachments list
Last edited:
Initiate Mage
Joined
Sep 29, 2017
Messages
2
Reaction score
0
i don't really see how this will benefit anyone honestly, if someone is capable of making a redirector your explanation is rendered useless

I felt the need to write a concise, in-depth tutorial about the inner workings of a redirector due to there being none out there (nothing personal, but I find your tutorial to be shallow -- perhaps because it was written four or so years ago). You take from it whatever you learn. My goal was to spread knowledge without giving out something for free, and I am confident that I have achieved that. While a redirector is a fairly simple tool that takes almost no effort to implement, it might not be as intuitive for a new dev as it is to you and me: I think it's offensive to assume that all (however, most) new devs have zero coding experience.

Or perhaps this tutorial might inspire a learning dev to delve into his favorite language's TCP networking library. Perhaps he had no idea how communication protocols work! Sparking curiosity is another great way of transmitting knowledge, at least in my opinion. As I said, you take from this whatever you learn.
 
Back
Top