pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy
ISC License
4.38k stars 252 forks source link

Suggestion for wireproxy config file #27

Closed fscarmen closed 2 years ago

fscarmen commented 2 years ago
# 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 = 10.200.200.2/32 # The subnet should be /32 and /128 for IPv4 and v6 respectively
# MTU = 1420 (optional)
PrivateKey = uCTIK+56CPyCvwJxmU5dBfuyJvPuSXAq1FzHdnIxe1Q=
DNS = 10.200.200.1

[Peer]
PublicKey = QP+A67Z2UBrMgvNIdHv8gPel5URWNLS4B3ZQ2hQIZlg=
# PresharedKey = UItQuvLsyh50ucXHfjF0bbR4IIpVBd74lwKc8uIPXXs= (optinal)
Endpoint = my.ddns.example.com:51820
# PersistentKeepalive = 25 (optinal)
....
....

How about replace all of the above with one parameter

# WireGuard profile path
Path = /etc/wireguard/wgcf.conf

Because every wgcf users must exist this file. In this way, the case of DNS does not need to be considered by wireproxy. All happy!

pufferffish commented 2 years ago

I think it will better to support both the current config and also implement your suggestion. I use wireproxy without wireguard, and it would be annoying to keep two files around. That said, I can also see the merits of your suggestion. Maybe when WGConfig = path is set, [Interface] and [Peer] would be read from the WGConfig path instead.