kizzx2 / docker-wireguard-socks-proxy

Expose a WireGuard tunnel as a SOCKS5 proxy
https://hub.docker.com/r/kizzx2/wireguard-socks-proxy
MIT License
151 stars 36 forks source link

socks5 cannot access UDP #7

Open deixl opened 1 year ago

deixl commented 1 year ago

I'm using your docker-openvpn-client-socksproject and I found a problem, Since I can't send issues at docker-openvpn-client-socks over there, I send them here The openvpn configuration files of tcp and udp can be connected, but after the connection, socks5 cannot access the udp network,


About docker-wireguard-socks-proxy Archive of previous questions,

My system is ubuntu20.04, Using kizzx2/docker-wireguard-socks-proxy cannot use IPV6, If I follow the method below, it will support IPV6, but the file is too large and takes up too many resources. I hope izzx2/docker-wireguard-socks-proxy can make Address = IPV6 and AllowedIPs = IPV6 work

docker run -dit -p 127.0.0.1:2333:2333 --name wgcf --cap-add NET_ADMIN --sysctl net.ipv6.conf.all.disable_ipv6=0 --sysctl net.ipv4.conf.all.src_valid_mark=1 ubuntu:focal docker exec -it wgcf bash -c " apt update apt install -y wireguard wget curl iproute2 resolvconf wget https://github.com/ViRb3/wgcf/releases/download/v2.2.2/wgcf_2.2.2_linux_amd64 -O /usr/bin/wgcf chmod +x /usr/bin/wgcf echo|wgcf register wgcf generate mkdir -p /etc/wireguard cp -f wgcf-profile.conf /etc/wireguard/wgcf.conf #sed -i 's/engage.cloudflareclient.com/162.159.192.1/' /etc/wireguard/wgcf.conf wget https://github.com/P3TERX/wireguard-go-builder/releases/download/0.0.20201118/wireguard-go-linux-amd64.tar.gz tar zxf wireguard-go-linux-amd64.tar.gz mv wireguard-go /usr/bin rm -f wireguard-go-linux-amd64.tar.gz wget https://github.com/ginuerzh/gost/releases/download/v2.11.2/gost-linux-amd64-2.11.2.gz gunzip gost-linux-amd64-2.11.2.gz mv gost-linux-amd64-2.11.2 /usr/bin/gost chmod +x /usr/bin/gost" docker exec -it wgcf bash -c "ipv4=`ip route get 1.1.1.1 2>/dev/null | grep -oP 'src \K\S+'` ip -4 rule add from $ipv4 lookup main prio 18 wg-quick up wgcf nohup /usr/bin/gost -L=:2333 2>&1 & #nohup /usr/bin/gost -L=:admin:123456@2333 2>&1 &"

This project also supports ipv6, but cannot use socks5, so I hope you can find inspiration from these two methods to make docker-wireguard-socks-proxy also support ipv6

https://github.com/Neilpang/wgcf-docker