-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(Core/Packet): Support RelayPacket in Auth and World servers #19998
Conversation
Co-Authored-By: Amin Mahmoudi <[email protected]>
@masterking32 Maybe you can explain to me better everything related to this code, since it is your creation, I just adapted it. If it could be modularized, I would have done it, but I think it would be difficult to really do. |
https://github.com/masterking32/WoW-Server-Relay |
AzerothCore already supports Proxy Protocol v2, and you can use HAProxy, Envoy, Traefik, and many other tools that support Proxy Protocol to achieve the same result as this specific relay. And remember to set up the firewall correctly. |
If it is true that the emulator already supports something similar to this, then there is a lack of documentation, because I as a contributor have no idea how to create relay servers currently without this content. At least @masterking32 made the changes to the emulator, and also provided the tool in node.js, so we can use it. Can't both systems coexist at the end of the day? And if it is not possible, then someone should explain how to create other servers and be able to connect to the main server. |
I just took someone else's work to make it work with this emulator. In fact, if I could do it in module form, I wouldn't even have created the pull request, so I can't really answer that question. |
Considering this I feel like we don't need this implementation in the core. |
And how do we replicate multiple servers and thus be able to offer them the possibility of having less latency in different places? Nobody has explained how to do that. Here at least, it would be something optional and tied to another tool that nobody has even tested. I think that first, we should see the differences and in any case, we could determine if it is necessary or not. According to its creator, he got these results. Which, at the very least, is somewhat curious. And we could take it into account. |
Indeed, there is a lack of a simple example of how to implement proxy v2. For me, the idea is not to use an off-the-shelf proxy, but to extend some additional features to control user connections and deny unwanted access. For example, obtaining the device's machine code through a client login utility and verifying the uniqueness of the player's device on the proxy. |
If there is another way to do this, I'm sure we can close it without any problems, but so far, I wouldn't know how to do this same job without this code and this tool. Now, if you give me an example and we publish it on the wiki, and we get better or similar results, great, we can close it without any problems. But at least let's make sure that there is documentation and some way to get better or equal results. |
Probably best to leave it to the author in that case as they can answer the questions submitted by the reviewers and also resolve any issues the implementation brings, like vulnerabilities. |
I totally agree. I'm trying to get the author to speak up and explain any doubts you may have on the subject. What's more, if we need to make changes to the code, I'll listen to you and I'm open to suggestions. |
I want a simple high performance proxy sample code and then some modifications on that. Don't do as js, js is prone to performance problems at high concurrency |
Tell me how I can obtain this same thing, without this tool, and I will gladly close this pull request myself and agree with you. |
You’re both right that there’s a lack of documentation on this part. However, if you’re familiar with proxying and networking, there aren’t many AC-specific details you need to know to implement this. If you’re interested, here’s a high-level overview of how you can achieve the same:
If you need more details, feel free to reach out to me on Discord. |
Perfect, I'll get in touch with you. That part is clear to me. |
This system is not just a security possibility. Its efficiency is much higher, like the need to spend heavy costs for a powerful virtual server in a suitable location for players to play with low ping. |
This testimony, I think, is really very good. As for security, I trust that the author will maintain and the community can help him in this regard, all the updates, respect for the tool developed in node. Also, it is something optional, nobody is forcing anyone to use it if they do not want to. |
Think that you are in Argentina and you have players from China, how can they communicate with the server with proper ping!? This possibility is very useful. By providing several node js hosts with the right resources, you can attract players from anywhere for a server, isn't this a great feature?? |
This is good, but I want to do more control of the client on the proxy server, so it is best that the proxy is not an off-the-shelf software, but a component that can be developed twice! |
I think so, that's why I created the pull request. |
That's something the owner of the code might be able to explain to you. It's beyond my knowledge. |
In my opinion the already implemented proxy protocol v2 can already serve as a high performance proxy server as @walkline stated in a comment above. It is a standardized protocol which I would usually prefer before any custom implementation that tries to fulfill the exact same use case. Probably I'm missing something here, but I don't feel like the AC core has any benefits of adding an additional (non-standardized) proxy protocol. |
I think this is the right way to go, standardization is important, so while this PR is nice, it shouldn't be part of AZ. |
Can someone show me an example where the ping decreases and what are the values it gets? Because so far we have an example of a person who tested this code and managed to decrease going ping from 500 to 80. With the current protocol that we have and how can we do tests? |
Unless you host your server in Iran, you won’t see the same ping improvement. If you didn’t know, Iran is currently an authoritarian country, and its government sometimes makes poor decisions, such as providing drones and ballistic missiles to other countries that ultimately use them to bomb my city. As a result, most countries have imposed sanctions on Iran, which, along with internal policies, have impacted the ping to services in Iran. This is why it's crucial for Iranian services to have alternative routing paths if they have clients in the western (not only) world. I believe the country you're living in doesn't face the same issues, so you probably wouldn’t see such drastic ping improvements. |
There already is an alternative so we should just stick to it. If guides are needed maybe we can work on that. Closing this now as I’m sorry but changing packet protocols is something we don’t need. Thanks for the PR but can’t be accepted. If you wish to use this alternative I suggest using a patch similar to TC users seeing the module author does offer that. |
I think they make a mistake, but I have no arguments for defending the debate because it is not my project or idea either. I just adapted the code and made it compatible. The rest is borne by the author of the same. It may serve someone anyway even if it's closed. The guide thing on the wiki, it wouldn't really be bad, because if I had to do something similar to this, I wouldn't know how to do it. In my opinion, all I think is that I would have waited a little longer and done tests, given that we have the result of this code and the complementary tool, but we don't have any evidence about the current existing code, which determines that it can replace that. |
Changes Proposed:
This PR proposes changes to:
Issues Addressed:
Tests Performed:
This PR has been:
How to Test the Changes:
This code is necessary to be able to use the following tool. I upload it so that we can discuss it, because I really doubt that it can be modularized, however, its author assures that with this tool, the ping can be considerably reduced by creating mirror servers.
https://github.com/masterking32/WoW-Server-Relay
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.