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

[IPV6] Support setting multiple listeners and reported endpoints #590

Merged
merged 6 commits into from Jan 1, 2023

Conversation

alanmcgovern
Copy link
Owner

@alanmcgovern alanmcgovern commented Jan 1, 2023

Default to creating an IPV4 and IPV6 listener, bound to IPAddress.Any/IPV6Any, and port 0. Additionally, allow configuring an alternative reported IP address for both IPV4 and IPV6.

Partially fixes #588

It's normal enough to listen on an ipv4 endpoint and
also an ipv6 endpoint.

Extend the ability to specify an arbitrary IPEndPoint
to instead allow specifying arbitrary IPEndPoints.

By default the engine attempts to bind to IPAddress.Any
and IPAddress.IPv6Any.
The 'ListenEndpoints' is what we configure the engine to listen for
incoming connections on. The endpoint can be ipv4, ipv6, or both.

'ReportedListenEndPoints' is what we inform the tracker/dht of. This
can differ from the bound IP address and port.
Don't rely on dictionary ordering too :)
Whenever we start/stop a listener we also want to map/unmap it's
ports.
If the user configures an override which uses port '0', then that
means the *real* listen port should be used.
@alanmcgovern alanmcgovern merged commit fb05f30 into master Jan 1, 2023
@alanmcgovern alanmcgovern deleted the better-ipv6 branch January 1, 2023 14:35
@alanmcgovern alanmcgovern mentioned this pull request Jan 7, 2023
8 tasks
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.

Complete IPV6 support
1 participant