docker-wireguard-socks-proxy icon indicating copy to clipboard operation
docker-wireguard-socks-proxy copied to clipboard

Proxy times out when connecting over LAN

Open reeseovine opened this issue 4 years ago • 9 comments

I'm having trouble using the proxy over my local network. When I run the command

curl --socks5 127.0.0.1:1080 https://api.ipify.org

from the computer running the container I get the expected result, but if I run

curl --socks5 192.168.0.28:1080 https://api.ipify.org

from that computer or another on the same network it times out after about a minute with this error:

curl: (28) Failed to connect to 192.168.0.28 port 1080: Connection timed out

The port is open but it appears to leave connections hanging when they come through the machine's LAN IP address.

reeseovine avatar Jun 10 '21 21:06 reeseovine

Same issue here, have you figured it out?

zeyugao avatar Sep 26 '21 16:09 zeyugao

@zeyugao nope, but i ended up switching to gluetun instead which does everything i needed it to do!

reeseovine avatar Sep 26 '21 21:09 reeseovine

The problem (at least in my setup) was, the docker network MTU, you can set it inside a compose file (or globally in docker) checkout my fork where I have an example on how to fix it.

K0IN avatar Dec 23 '21 21:12 K0IN

Am also having the same issue... Scratching my head for few hours now... Tried the network with lower mtu, but didn't help... Is it working for someone ??

Tekka90 avatar Jul 13 '22 19:07 Tekka90

try change the internal ip inside the sockd.conf, you can bind to a ip(0.0.0.0) instead of interface(eth0), i will Provider more info when i got time.

check this https://github.com/Lozy/danted/issues/18#issuecomment-303126008

(not tested btw)

K0IN avatar Jul 17 '22 03:07 K0IN

Hi Koin, This was indeed the first thing I tried 😊 but did not help. I continued scratching my head and found a solution. You need to route the external network using iptable inside the container... I did a fork containing that plus the capacity to manage multiple connexions... https://github.com/Tekka90/docker-wireguard-socks-proxy

Tekka90 avatar Jul 17 '22 05:07 Tekka90

Hi Koin,

This was indeed the first thing I tried 😊 but did not help.

I continued scratching my head and found a solution. You need to route the external network using iptable inside the container...

I did a fork containing that plus the capacity to manage multiple connexions...

https://github.com/Tekka90/docker-wireguard-socks-proxy

It also works for me! Much Thanks.

UFervor avatar Jul 17 '22 12:07 UFervor