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

Prefer IPv6. #184

Open
fernvenue opened this issue Aug 28, 2022 · 5 comments
Open

Prefer IPv6. #184

fernvenue opened this issue Aug 28, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@fernvenue
Copy link
Contributor

Feature Proposed
Hi, thanks for the great tool! Sometimes I will use IPv6 only servers or services, and I have tried to use a IPv6 only address like ipv6.icanhazip.com, but unfortunately, rathole will still request A type first. So, could you please add a feature like prefer_ipv6 or ipv6_only for each connection or all connections?

Use Case
As I said above, we can use this feature for IPv6 only servers or services :)

@fernvenue fernvenue added the enhancement New feature or request label Aug 28, 2022
@rapiz1
Copy link
Owner

rapiz1 commented Nov 30, 2022

Do you mean ipv6.icanhazip.com does not have an A-type record and you want to avoid the unnecessary DNS request? I see the usefulness of preferring ipv6 over ipv4 when A and AAAA both exist but don't think an additional A-type query will cause problems.

BTW, DNS lookup is currently handled by tokio::net::lookup_host

@fernvenue
Copy link
Contributor Author

Sorry for the late reply. The problem here is that rathole will always request for an A type first. Now, if I want rathole to prefer IPv6, I have to disable resolving A type requests for a specific domain. Although this solves my problem to some extent, when I do this, rathole will continue to send meaningless type A requests and lose the ability to fall back to IPv4 in an environment where both IPv4 and IPv6 exist.

@rapiz1
Copy link
Owner

rapiz1 commented Dec 9, 2022 via email

@Stennsen
Copy link

I recently stumbled upon this project and tried to set it up on my machines.
I also got a Problem, with ipv4 being preferred by rathole and thus rathole tries to communicate with my ISPs NAT.
Is that feature already in development by someone? If not, I would be interested in contributing.

@fernvenue
Copy link
Contributor Author

Hi @Stennsen, thanks for your reply! Currently there is no one working on this feature, I think that will be so great if you can contribute, and if you need someone to help you test anything, I'm glad to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants