oauthutil: listen on ipv4 & ipv6 with mulitlistener #8733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this change?
Support IPv6 Bind Address for Oauth authentication server. This allows for e2e IPv6 connections.
ssh -6 -L53682:localhost:53682
[::1]
addresses are shownSee also #7537 a previous attempt with some discussion. This approach by using multilistener is cleaner.
About
dualstack/multilistener
About IPV4 / IPV6 listening on localhost being tricky
Apprently this challenge goes down to the kernel level in
net/ipv6/af_inet6.c
that listening to all interfaces e..g[::]
would support dual stack, but a specific net addr would be only single-stack. There seems to have been a lot of discussion about single stack loopbacke.g.
Alternatives
middleware/FirewallListener
. this would the simplest and easiest to debug.Part of IPv6 E2E support for Rclone:
Was the change discussed in an issue or in the forum before?
https://forum.rclone.org/t/ipv6-guide-review-with-google-drive-ec2-s3/43218
Testing
go run . config
and configure "drive" backend withHit CTRL-Z to background the process
Run
netstat
(below) to confirmtcp6
You should see
tcp6
and"[::1]:*"
innetstat
when binding with ipv6 addressChecklist