Jump to content

Elfo

Legendary Member
  • Posts

    2,009
  • Credits

  • Joined

  • Last visited

  • Days Won

    54
  • Feedback

    0%

Everything posted by Elfo

  1. What you linked, is my code. It is already shared for 382 here;
  2. Scrap the poll. Make a server YOU would play. It's that simple.
  3. There is nothing special to adat. The service itself is cross-chronicle and the l2j code is so minimal it should be easily adaptable
  4. You can use this as an example to see how: https://github.com/Elfocrash/L2jTesla
  5. This one is only guaranteed if you're using try-with-resources btw. In some cases they will eventually close because they will get forced by the GC (even though they are unmanaged, the JVM will try to close when possible before disposing) but it's not guaranteed and they can cause socket exhaustion.
  6. Ignore the service itself. It's just an example of an implementation of the concept. You can implement it using proxies instead of using AWS' Edges (which is basically what AWS is also doing). Like I said, spin up an Azure or AWS environment (wherever you have free credits) and test if for yourself. I tested it with the L2jBrasil folks when I originally created it and that's where my results come from. Now about the "torture testing". I define torture test as 1 million concurrent connections with maybe 10m requests per second. Has it been torture tested this way? Nah, but it's perfectly stable with at least 500 L2 concurrent connections without any signs of degradation. Keep in mind that traffic is also segregated. It's perfectly stable and perfectly fine to use based on no compaints from at least 20 servers that I personally know that are using it. And at the end of the day you don't even have to use the service itself. Simply gets a VPS and configure it as a proxy. You can still use the Java part. You just lose some features but gain all the benefits of the concept.
  7. It's nothing new. You probably missed my edit but: Here is an example of an AWS dedicated to this exact concept called AWS Global Accelerator with a dedicated section on how this benefits Gaming. I personally know that Blizzard is using it for games like WoW, Overwatch. Basically every big company that does any sort of networking is using that concept and has been for years in both gaming and other general networking.
  8. It's not theory at all. It might be new to you but it's actually how things work. Backbone networking is one of the selling features of cloud providers and I use them on a day to day basis. Some basic googling will answer all your questions. You can get anything from a 10% to a 60% reduction depending on the region and the status of the network. Those are actual numbers. Feel free to create a free account on AWS or Azure and test it on your own. Also the project is used in multiple live servers and it has been running in its previous form on a few other servers since 2018. Nothing educational here and nothing to sell (so nothing to market). You can disagree all you want but at the end of the day it doesn't matter because it's just ignorance talking. EDIT: Here is an example of an AWS dedicated to this exact concept called AWS Global Accelerator with a dedicated section on how this benefits Gaming. I personally know that Blizzard is using it for games like WoW, Overwatch.
  9. MITM is a term for intercepting proxies. It is an intercepting proxy acting as a reverse proxy. Proxies decrease latency only when implemented on a provider's backbone network. You are basically taking advantage of the cloud provider's dedicated networking to speed up indirectly. Here is a diagram explaining it. It won't do miracles because the speed of light is the speed of light at the end of the day but it can make a noticable difference. You also get protection and control that the GS itself doesn't have to waste resources to deal with. You never have to expose the actual gameserver location and all your traffic protections can be applied on cheap VPS' rather than expensive dedicated servers. This approach has a lot of advantages. If you have enough proxies you can even shadow segment teh proxies that show up and if someone DDOSes the server they will just take down 1-10/20 proxies that hold just a few people instead of the whole server.
  10. It's a MITM proxy that implements reverse proxy functionality. It's not a reverse proxy by definition but you wouldn't be wrong for calling it a reverse proxy either.
  11. Those are completely separate connections. The diagram shows the logical flow of the login process. After you login the player is directly connected to the proxy which is directly connected to the server. A single player is always connected to the gameserver through a single proxy. The graph just shows that there might be multiple proxies to chose from.
  12. a
  13. I won't but I also won't provide the source. Feel free to write it yourself from scratch. It's only 25 lines of code.
  14. It will but you will lose the benefit of using the API to get things like proxy status. I'm sure some l2off dev will be able to implement it but I know nothing about l2off
  15. 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
  16. They are self contained excecutables so simply configure the appsettings.json and then chmod 777 L2Proxy ./L2Proxy And it will run
  17. You need to create the xml in the appropriate location. The error you get says that the xml doesn't exist in the right folder. Keep in mind the config is on the loginserver not gameserver. You need to apply the java patch and then run the app in the VPS that you use for proxy. You need to also open the inbound and outbound ports in the VPS to accept traffic and point it to the gameserver Can't remember which packet the ping lives in. It doesn't look it's in the ServerList one
  18. If proxy is local to you you will see 0, else you will see the real value. (I can't remember is ping is calculated by the client itself or if it's a packet value. It doesn't look to be a packet value. Example:
  19. You need to also open outbound traffic port 7777 for the connection to go to the gameserver
  20. Is the 7778 port open? Your proxy server needs 7778 open for inbound traffic and 7777 for outbound
  21. 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. 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 Proxy health 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. 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. MaxConnections on each proxy. Once the limit is met, no more connections can be made to the gameserver via the proxy. -1 means unlimited 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". Get all proxies - GET http://localhost:6969/api/proxies Get proxy by IP and Port - GET http://localhost:6969/api/proxies/127.0.0.1/7778 (IP is the proxy ip and 7778 is the proxy port) Disconnect an active connection - DELETE http://localhost:6969/api/proxies/127.0.0.1/7778/127.0.0.1/11571 (First IP is the proxy IP, second ip is the client ip, first port is the proxy port and second port is a client port) Get all blacklisted IPs - GET http://localhost:6969/api/blacklist Check if IP is blacklisted - GET http://localhost:6969/api/blacklist/127.0.0.1 (The IP is the user IP) Blacklist an IP and disconnect used - POST http://localhost:6969/api/blacklist/127.0.0.1 (The IP is the user IP) Removed an IP from the blacklist - DELETE http://localhost:6969/api/blacklist/127.0.0.1 (The IP is the user IP) 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> 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. 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/v0.2.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. Enjoy
×
×
  • Create New...