Skip to content
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

Local sockets #2093

Merged
merged 6 commits into from
Dec 29, 2023
Merged

Local sockets #2093

merged 6 commits into from
Dec 29, 2023

Conversation

lmoureaux
Copy link
Contributor

@lmoureaux lmoureaux commented Dec 27, 2023

This PR restores #888 (rolled back in #913). It introduces the ability to run a server on a "local" socket: a UNIX local domain socket on Linux and a named pipe on Windows. This should allow local games on Windows without annoying firewall interference.

Closes #1051.

@lmoureaux lmoureaux requested a review from jwrober December 27, 2023 04:25
@lmoureaux lmoureaux marked this pull request as draft December 27, 2023 04:25
Local sockets won't trigger any firewall rules.
Local sockets correspond to UNIX domain sockets on UNIX and named pipes on
Windows.  No networking operations are attempted in this case (not event the
UDP announcements), and the server is strictly restricted to serving the
socket.
This support is a bit hidden, it is enabled by using the fc21+local URL scheme.
This looks much less suspicious to the Windows firewall.
As commented in longturn#888, it didn't improve readability -- rather the opposite.
@lmoureaux lmoureaux marked this pull request as ready for review December 27, 2023 04:29
@jwrober
Copy link
Collaborator

jwrober commented Dec 27, 2023

I can't tell if this is working. On my Msys2 local I can invoke the server with the --local option, but the client does not see it running and only shows connection options for a regular TCP connection.

@lmoureaux
Copy link
Contributor Author

I can't tell if this is working. On my Msys2 local I can invoke the server with the --local option, but the client does not see it running and only shows connection options for a regular TCP connection.

That's how it should be -- a server started on a local socket isn't meant to be used by the "outside world". The client can only connect to such a server when it starts it by itself. If single-player works and starting a single-player game doesn't trigger any firewall/antivirus popup (which it normally does the first time in my Windows VM), then this PR is working.

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the conversation I tried a local game from the client. Works as described.

@jwrober jwrober merged commit 90a7cb2 into longturn:master Dec 29, 2023
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix issues with #888
2 participants