pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When i use both IPv4 and v6 address. How to force the v4/v6 traffic?

fscarmen opened this issue · comments

My config file is as follow:

# The [Interface] and [Peer] configurations follow the same semantics and meaning
# of a wg-quick configuration. To understand what these fields mean, please refer to:
# https://wiki.archlinux.org/title/WireGuard#Persistent_configuration
# https://www.wireguard.com/#simple-network-interface
[Interface]
Address = 172.16.0.2/32
Address = 2606:4700:110:80de:c842:7e76:69e5:59e1/128 # The subnet should be /32 and /128 for IPv4 and v6 respectively
MTU = 1420
PrivateKey = cFQfJrir2UskpSlmyZgviLp3SWq5WVoGyESpd2s8q2M=
DNS = 1.1.1.1,8.8.8.8,8.8.4.4,2606:4700:4700::1111,2001:4860:4860::8888,2001:4860:4860::8844

[Peer]
PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
# PresharedKey = UItQuvLsyh50ucXHfjF0bbR4IIpVBd74lwKc8uIPXXs= (optional)
Endpoint = 162.159.195.18:1018
# PersistentKeepalive = 25 (optional)

.........

And my checking ip result is as follow. It seems the v4 / v6 is random

root@ubuntu:~# while [ "$i" != 10 ]; do curl -x socks5h://localhost:40000 -ksm5 -A Mozilla https://ifconfig.co/ip; ((i++));sleep 1; done
104.28.230.105
104.28.230.105
104.28.230.105
2a09:bac1:1120:18::61:289
2a09:bac1:1120:18::61:289
2a09:bac1:1120:18::61:289
2a09:bac1:1120:18::61:289
104.28.230.105
2a09:bac1:1120:18::61:289
104.28.230.105


root@ubuntu:~:~# unset i; while [ "$i" != 10 ]; do curl -x socks5h://localhost:40000 -ksm5 -A Mozilla https://api64.ipify.org; echo ''; ((i++)); done
2a09:bac1:1100:18::61:289
104.28.230.105
2a09:bac1:1100:18::61:289
2a09:bac1:1100:18::61:289
104.28.230.105
2a09:bac1:1100:18::61:289
2a09:bac1:1100:18::61:289
104.28.230.105
104.28.230.105
2a09:bac1:1100:18::61:289

I think ther is a bug in DNS. Please fix it . Thanks.