-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Implement NAT hole punching and make API server configurable #298
Conversation
- Add "more info" button on client when it fails to connect - Add "more info" button in "Manage Server" menu when the port is not reachable - Troubleshooting panel shows info about port forwarding, Windows Firewall and using Hamachi or ZeroTier - Detect Hamachi through the availability of the 25.0.0.0/8 subnet - When Hamachi is detected, display IP address in Host Game and Manage Game panels - Improve connection check messages, display different messages when Hamachi is detected
Code wise (visually), it looks good, will test it out over the weekend. |
- Include GlobalServer in CSM repo - Use ProtoBuf-based protocol for GlobalServer communication - Implement port checking into GlobalServer - Refactor and cleanup
6ceb89a
to
759523a
Compare
I finally had the time to include the port checking mechanism. For this, I refactored most of the CSM <-> GlobalServer communication and included the GS project into this repository. It is not included in the solution as this didn't work for me with Mono (Because the GS is .NET core). Port checking works by simulating a CSM client on the GS and performing the same procedure as with the regular connection procedure. Maybe I'll add the building of this Docker Image to the Github Action later today. |
ooooh nice! I've got some free time at the moment so I'll check this out |
The Data folder should be a symlink to the GS project's Data folder (so the packets are the same). Could this be a problem with Visual Studio? Does it look correct in the file system? I personally use Jetbrains Rider as an IDE where it works fine. |
I could probably get away with replacing paths to the data folder with relative paths in the csproj file, looks like there are issues with using linux symlinks on Windows (there are local ways to get around this, but would complicate PRs in the future for people wanting to contribute) |
Yes, I'm on Linux. In theory, symlinks should work on Windows. I just found this post: https://stackoverflow.com/a/59761201 If relative paths work properly, we can also use those. I just wanted to avoid duplicate code especially for the protocols. |
I see, I'll give relative paths a try for now. I'd eventually like to try modernizing our c# csprojs and still build for .net 3.5 (which should be possible, but will need to see if mono freaks out, and if everything still works. Future PR though) |
Hopefully this has not broken the CI or Linux builds |
Looks good for me on Linux |
When joining a server, the implementation will now
The hole punching server was improved slightly, and is now included in this repository.
The server is currently running on api.citiesskylinesmultiplayer.com port 4240 (only IPv4 for now).
An additional feature introduced with this patch is the ability to change the API server through a mod setting (if someone wants to host their own setup).