-
[UPDATED 14/7] Emulator Proxy [C#] - People won't find your ip
I made this so people can't find the ip of your website. How it works:
- It gets a socket connection
- It connects to the emulator
- It sends data between the two
Another Update: http://www.mediafire.com/download.php?0qr3036q49rl9qb
- Better security now
Older Versions:
How to use it:
If you're using phoenix update the last_ip in the database to the ip where the proxy is on and edit the client.php to the proxy ip.
If you want good results you should put like 5 of them on different vps' and use a random host -> session of them in php.
Source is included :)
-
Re: Emulator Proxy [C#] - People won't find your ip
I love it, if it works it'd be brilliant.
-
Re: Emulator Proxy [C#] - People won't find your ip
It should work, just test it. The user.cs might be a bit messy but I thought this was the easiest way.
Code:
private void SendToSocket(IAsyncResult result)
{
try
{
emubufflength = emu.EndReceive(result);
if (emubufflength != 0)
{
socket.BeginSend(emubuff, 0, emubufflength, SocketFlags.None, SentToSocket, null);
emubufflength = 0;
}
}
catch
{
Disconnect();
}
try
{
emu.BeginReceive(emubuff, 0, emubuff.Length, 0, SendToSocket, null);
}
catch
{
Disconnect();
}
}
private void SendToEmu(IAsyncResult result)
{
try
{
databufflength = socket.EndReceive(result);
if (packet != "@@BH@" && databufflength != 0)
{
emu.BeginSend(databuff, 0, databufflength, SocketFlags.None, SentToEmu, null);
databufflength = 0;
}
else
{
Disconnect();
return;
}
socket.BeginReceive(databuff, 0, databuff.Length, 0, SendToEmu, null);
}
catch
{
Console.WriteLine(">> Emulator is probably offline, disconnecting..");
Disconnect();
}
}
The most important part of the code
Wait I have to clean up some parts of the code.
Update: Emulator Proxy by AmirZ.rar
-
Re: Emulator Proxy [C#] - People won't find your ip
Thank you for this. :cool:
-
Re: Emulator Proxy [C#] - People won't find your ip
-
Re: Emulator Proxy [C#] - People won't find your ip
Three months ago I thought of creating something like it... Great work!
-
Re: Emulator Proxy [C#] - People won't find your ip
I don't understand how to set this up haha, it would be nice and i wold be greatful if someone could explain little more how to do :p I have been SYN flooded for 5 days now
-
Re: Emulator Proxy [C#] - People won't find your ip
This means that nothing is impossible, Great work.
-
Re: Emulator Proxy [C#] - People won't find your ip
Nice.
Also, when one proxy server is down what then?
You might make a ping in it or whatever and when it's down, the php side doesn't choose that one, but a other.
Still, must have multiple servers for that, i think it can be cheap ones :p
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
joopie
Nice.
Also, when one proxy server is down what then?
You might make a ping in it or whatever and when it's down, the php side doesn't choose that one, but a other.
Still, must have multiple servers for that, i think it can be cheap ones :p
Setup multiple proxy servers for redundancy and you'll have no problem.
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
joopie
Nice.
Also, when one proxy server is down what then?
You might make a ping in it or whatever and when it's down, the php side doesn't choose that one, but a other.
Still, must have multiple servers for that, i think it can be cheap ones :p
If this was rewritten in Java, it could be easily run on any VPS. Get a few cheapo linux VPS and you'll be set.
-
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
leenster
edit : ignore....
The idea of this is so that no one will be able to find out your main server IP because you use the proxy IP on the client. You could put like 5 of them so they work together and if one gets attacked the other one comes online or the proxies are picked at random.
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
Hejula
The idea of this is so that no one will be able to find out your main server IP because you use the proxy IP on the client. You could put like 5 of them so they work together and if one gets attacked the other one comes online or the proxies are picked at random.
Yeah i guess you did read my post. My post was based on a situation where Cloudflare was not used... So the IP of the webserver was known. You take the webserver down and the client protection would be useless...... then right when i hit the post button i remembered Cloudflare so my post became useless. That's why i removed it.
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
leenster
Yeah i guess you did read my post. My post was based on a situation where Cloudflare was not used... So the IP of the webserver was known. You take the webserver down and the client protection would be useless...... then right when i hit the post button i remembered Cloudflare so my post became useless. That's why i removed it.
I think it's best practice to host your site on a different server than your emulator. If your emulator's VPS goes down, then your site is still online for you to notify users etc. I use some awesome cPanel hosting that's hosted in NL for my site. I'd love to see someone hit that offline..
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
Leon
I think it's best practice to host your site on a different server than your emulator. If your emulator's VPS goes down, then your site is still online for you to notify users etc. I use some awesome cPanel hosting that's hosted in NL for my site. I'd love to see someone hit that offline..
Hi Leon!
I was wondering is it possible to have the cms on one vps and emu and db on another ? Becouse i have been SYN flooded for a week know and it's starts to get on my nervs. I have a good vps but the attackers are to many. Sorry for asking in this thread. :)
-
Re: Emulator Proxy [C#] - People won't find your ip
This & CloudFlare (which is properly set-up) could potentially be the end of DDoS, since CloudFlare also hides the IP when pinging etc
Quote:
Originally Posted by
resize
Hi Leon!
I was wondering is it possible to have the cms on one vps and emu and db on another ? Becouse i have been SYN flooded for a week know and it's starts to get on my nervs. I have a good vps but the attackers are to many. Sorry for asking in this thread. :)
Entirely possibly, you could even just rent a webhost with DDoS protection and then run your server on a VPS, and with this (if it works, haven't tested yet) you should be in the clear.
-
Re: Emulator Proxy [C#] - People won't find your ip
Funny how I am coding something familiar but far more structured. Suggested to have a look on the source AND MOTHER OF JESUS CHRIST!
Users.cs:
private byte[] databuff = new Byte[100000];
private byte[] emubuff = new Byte[100000];
I just wrote my first C++ code to avoid memory fragmentation like this on checking if a process is running. But holy shit! Do you expect to receive 100000 byte (~100KB) with data at each transmition? THIS is what would kill performance. You NEVER use any more than 1024 bytes of that array anyways.
Peace,
- Martin
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
maritnmine
Funny how I am coding something familiar but far more structured. Suggested to have a look on the source AND MOTHER OF JESUS CHRIST!
Users.cs:
private byte[] databuff = new Byte[100000];
private byte[] emubuff = new Byte[100000];
I just wrote my first C++ code to avoid memory fragmentation like this on checking if a process is running. But holy shit! Do you expect to receive 100000 byte (~100KB) with data at each transmition? THIS is what would kill performance. You NEVER use any more than 1024 bytes of that array anyways.
Peace,
- Martin
True words, but I know he isn't a very advanced C# coder.
Sincerely yours,
Josh.
-
Re: Emulator Proxy [C#] - People won't find your ip
Nice work Azaidi. I've looked through the source it's nice, but the buffers are highly recommended to be lower. :)
Quote:
Originally Posted by
George2000
True words, but I know he isn't a very advanced C# coder.
Sincerely yours,
Josh.
And neither are you. :):
-
Re: Emulator Proxy [C#] - People won't find your ip
What person in their right mind would serve an online game through a proxy...?
PS; if this is to "try and hide your IP", I hope you're aware that proxy servers are usually much weaker than your normal server, so this is pretty pointless, especially if you have to fuck about with changing proxy settings everywhere
-
Re: Emulator Proxy [C#] - People won't find your ip
Just asking, what would be a better databuffer for emu and client?
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
azaidi
Just asking, what would be a better databuffer for emu and client?
512 bytes. :D:
-
Re: Emulator Proxy [C#] - People won't find your ip
Quote:
Originally Posted by
Quackster
512 bytes. :D:
Emulator Proxy by AmirZ - Update.rar
Improved stability, and you can set the bytes in the config now.
-
Re: [UPDATED 14/7] Emulator Proxy [C#] - People won't find your ip