Welcome to RUSaCis - эмулятор Interlude

Присоединяйтесь к нам прямо сейчас, чтобы получить доступ ко всем нашим возможностям. После регистрации и входа в систему вы сможете создавать темы, публиковать ответы в существующих темах, давать репутацию пользователям - так же приобрести исходный код. Это также быстро, так чего же вы ждете?

L2Proxy by Elfocrash

BezneR

Преемник
Customer
Регистрация
27 Мар 2021
Сообщения
162
Реакции
238
Баллы
43
RaCoin
50
Since I see people asking for this every now and then I thought I'd code it and share it.

L2Proxy is a simple MITM proxy for your L2 server.

It comes in two parts

  • The Java side
  • The L2Proxy service
The Java side can be used on any pack and with any proxy configuration without needing the app. If however you don't wanna mess with proxy configuration you can also use the L2Proxy service which runs a MITM proxy for your players. It is fully cross platform and will run fine on any VPS as long as you have the network bandwidth needed. It adds some extra functionality that you might find handy.
image.png.bf699fc056d6ecf103dff227363d07cf.png
Proxies with Gameserver invisibility turned on

Features

  • Gameserver invisibility option - You are able to hide your server behind the proxies and keep your real server IP secret
  • RealIP - Usually with MITM proxies, since the traffic is funnelled from one server, you normally lose the real IP of the player which limits a lot of the functionality that you might have implemented. L2Proxy allows the LoginServer to pass the real IP of the used to the Gameserver during the Login-> Gameserver player handoff
  • An API - You can use the API in L2Proxy to check the stats of your Proxies, see the active connections to it and even disconnect a specific use IP or blacklist it
  • IP Blacklist - You can blacklist a specific IP its connection will be rejected on the proxy level before it ever gets to the gameserver. This includes malicious connections. You can also use the API to blacklist someone and get them instantly disconnected.
  • Multiple Proxies from one app - No real reason for this to exist but I added it anyway


API Actions
To make actions you need to set the x-api-key header to equal to the API Key setting in L2Proxy. The default is "changeit".


proxy.xml
Код:
 <? Xml version = '1.0' encoding = 'utf-8'?>
<list>
    <gameserver serverId = "1" hide = "true">
        <proxy proxyServerId = "2" proxyHost = "127.0.0.1" proxyPort = "7778" />
        <proxy proxyServerId = "3" proxyHost = "127.0.0.1" proxyPort = "7779" />
    </gameserver>
</list>

Features I might add (don't bet on it)

  • Max connection limit
  • Make calls to the API to let the gameserver know the proxy status and make proxy level action
  • Proxy service discovery to propagate proxy actions to all running proxies
  • Automatic proxy suggestion based on proxy load
  • You currently need to blacklist the IP on each proxy API since the data is not shared

Download link and executables of latest version: https://github.com/Elfocrash/L2Proxy/releases/tag/0.1.0

If you run the framework dependent version you need .NET 5 CLR installed. If you run the standalone versions you don't need anything preinstalled.


Will upload a video of the thing at some point. It's late.

  • serverId is the real gameserver id that your gameserver is running on
  • proxyId is the gameserver id that your proxy will use to get exposed. Ideally this should be different from the serverId
  • hide true will hide the real gameserver and only expose the proxies. hide false will show the proxies and the real gameserver
  • To get the benefit of the proxy you shouldn't run it on the same server. you should have one VPS for the each proxy and one dedicated server for your gameserver
  • If you hide the gameserver and your don't host logic, any proxy and gameserver on the same pc there is no way for anyone to find the real server ip
Here is a diagram explaining the initial login flow. Once you login the loginserver goes away and you connect directly to the proxies or gameserver depending on your configuration.

image.png.bbf1a3739a0bec4a76cbc96185317dc4.png

Tested and working properly.
Shot00001.jpg

RUSaCis diff: https://pastebin.com/qgXxT3eE

Enjoy
 

BezneR

Преемник
Customer
Регистрация
27 Мар 2021
Сообщения
162
Реакции
238
Баллы
43
RaCoin
50
v0.2.0 is out! Check it out here: https://github.com/Elfocrash/L2Proxy/releases/tag/v0.2.0

  • Added proxy status detection. If the proxy goes down the proxy listings will appear as down as well. (This feature requires the L2Proxy service). Validation can be turned off by setting the "validateHealth" option to false.
  • Added unhealthy proxy fallback. If all proxies are down and the "fallbackToGameserver" setting is set to true then even if you've chosen to hide the gameserver, it will appear as a fallback so people can still login when the proxies are down.
  • Added MaxConnections on the proxy. Once the limit is met, no more connections can be made to the gameserver via the proxy. -1 means unlimited
Updated:

Apply first patch: https://pastebin.com/qgXxT3eE
And then second: https://pastebin.com/k1LkWFjQ

proxy.xml

Код:
<?xml version='1.0' encoding='utf-8'?>
<list>
    <config />
    <! -
        serverId: The true id of the gameserver
        hide: When enabled, the true gameserver will not appear in the server list
        fallbackToGameserver: When the proxy server is down, when true, the real gameserver will appear
        proxyServerId: The gameserver id that the proxy will use to be listed in the server list
        proxyHost: The host of the proxy
        proxyPort: The port of the proxy
        apiPort: The port of the API for the proxy
        apiKey: The api key for the proxy api
    -->
    <gameserver serverId="1" hide="true" fallbackToGameserver="false">
        <proxy proxyServerId="2" proxyHost="127.0.0.1" proxyPort="7778" validateHealth="true" apiPort="6969" apiKey="changeit"/>
        <proxy proxyServerId="3" proxyHost="127.0.0.1" proxyPort="7779" validateHealth="true" apiPort="6969" apiKey="changeit"/>
    </gameserver>
</list>

Shot00002.jpg
 

BezneR

Преемник
Customer
Регистрация
27 Мар 2021
Сообщения
162
Реакции
238
Баллы
43
RaCoin
50

izert

Вассал
Регистрация
16 Мар 2021
Сообщения
86
Реакции
2
Баллы
8
Возраст
33
Веб-сайт
blackpublic.ru
RaCoin
0
Вроде "Русс" Acis, не?))
 

cucu23

Бродяга
Регистрация
2 Ноя 2021
Сообщения
1
Реакции
0
Баллы
1
RaCoin
0
hi, i'm looking for someone to help me put this proxy system on my server
 

Сверху Снизу