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

When an ethernet connection is active, the wifi connection stops working #26

Open
Rosentti opened this issue Aug 27, 2023 · 4 comments
Open

Comments

@Rosentti
Copy link

With Ethernet+WiFi (wlp1s0 addresses in use for proxy):

curl -x socks5://127.0.0.1:1080 http://api.ipify.org
(hangs)

With WiFi only (wlp1s0 addresses in use for proxy):

curl -x socks5://127.0.0.1:1080 http://api.ipify.org
85.XX.XX.XX

With Ethernet+Wifi (eno1 addresses in use for proxy):

curl -x socks5://127.0.0.1:1080 http://api.ipify.org
84.XXX.XXX.XXX

Using socks4 with any configuration results in curl: (97) Recv failure: Connection reset by peer.
Running on Arch Linux, have ethernet and wifi. Is this a kernel limitation or something wrong with rust's networking/this program?

@Rosentti
Copy link
Author

Doesn't seem to be a limitation of the kernel:

curl --interface eno1 http://api.ipify.org
84.XXX.XXX.XXX
curl --interface wlp1s0 http://api.ipify.org
85.XX.XX.XX

@Rosentti
Copy link
Author

cURL inhibits this behaviour too (only with specific ip, by interface name works as before):

curl --interface 192.168.0.106 http://api.ipify.org
84.XXX.XXX.XXX
curl --interface 192.168.172.224 http://api.ipify.org
(hangs)

@Rosentti
Copy link
Author

Fixed myself. Will create PR soon.

@Tom60chat
Copy link

Tom60chat commented Dec 19, 2023

I wanted to use your solution because I thought I might have the same problem as you.

So I compiled your source and :
image

It doesn't work on Windows because you're using a function that isn't implemented on Windows (check tokio TcpSocket doc), so I wouldn't recommend @alexkirsz to accept the PR #27 (You can use Conditional compilation to make it a Linux-only feature.)

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 a pull request may close this issue.

2 participants