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

fix dual-stack ipv6 listening on windows, add listen addr option #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lurenjiamax
Copy link

According to windows document, the sockets only operates over the IPv6 protocol by default, so we need to modify the socket before using it.
Also --listen-addr option is added to be able to bind on a certain address, default is [::].
Tested on win10 and linux.

Refs:
https://learn.microsoft.com/en-us/windows/win32/winsock/dual-stack-sockets
https://docs.rs/tokio/1.29.1/tokio/net/struct.TcpSocket.html
https://docs.rs/socket2/latest/socket2/struct.Socket.html#method.set_only_v6

@MeesJ

This comment was marked as spam.

Repository owner deleted a comment from Proxtate Dec 14, 2023
Repository owner deleted a comment from Proxtate Dec 14, 2023
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.

None yet

2 participants