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

Do not attempt to dial loopback address #23

Open
binarybaron opened this issue Nov 20, 2024 · 1 comment
Open

Do not attempt to dial loopback address #23

binarybaron opened this issue Nov 20, 2024 · 1 comment

Comments

@binarybaron
Copy link
Contributor

We shouldn't even attempt to dial a loopback address (e.g 127.0.0.1) because this cannot be successfull. We should do something along the line of:

https://github.com/UnstoppableSwap/core/blob/d0108fd857c559ea7b2667c05598a55e45cb63a4/swap/src/network/tor_transport.rs#L159-L166

@umgefahren
Copy link
Owner

I agree but this problem is more complicated than it seems. For just the loopback address it's true but this should then also be implemented for local addresses and that's pretty hard to determine.
However, if you are interested, I made a PR to rust to detect those special cases for IPv6 too: rust-lang/rust#129238
I would suggest waiting until that is merged before we go forward.

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

No branches or pull requests

2 participants