pufferffish / wireproxy

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

one and only one [Interface] is expected #35

Closed mirrormirage0 closed 2 years ago

mirrormirage0 commented 2 years ago

Managed to get it up and running on Debian bullseye with no issues.

However , on Macbook Pro M1 (arm64), using the same conf file, I am getting this error one and only one [Interface] is expected

Any suggestions for troubleshooting?

pufferffish commented 2 years ago

Odd, this error should only occur when you have 2 [Interface]s in your config. Do you have an example config that can reproduce the problem?

mirrormirage0 commented 2 years ago

I used the same config file on both Debian Linux and M1 Mac.

Update: TLDR : was using an older version of wireproxy on debian which uses the older format of config file. compiled latest version of wireproxy on m1 mac, and copy pasted the older config file. this issue is resolved by changing to newer format of config file

# SelfSecretKey is the secret key of your wireguard peer
SelfSecretKey = #MYSECRETKEY
# SelfEndpoint is the IP of your wireguard peer
SelfEndpoint = 10.13.13.6 #From peer.conf file on wireguard server
# PeerPublicKey is the public key of the wireguard server you want to connec to
PeerPublicKey = #MYPEERPUBLICKEY
# PeerEndpoint is the endpoint of the wireguard server you want to connec to
PeerEndpoint = #MYSERVERIP:MYPORT
# DNS is the nameservers that will be used by wireproxy.
# Multple nameservers can be specified as such: DNS = 1.1.1.1, 1.0.0.1
DNS = 10.13.13.1
# KeepAlive is the persistent keep alive interval of the wireguard device
# usually not needed
# KeepAlive = 25
# PreSharedKey is the pre shared key of your wireguard device
# if you don't know what this is you don't need it
# PreSharedKey = #DONTNEEDTHIS
# TCPClientTunnel is a tunnel listening on your machine, and
# forward any TCP traffic received to the specified target via wireguard
# some applications on your LAN -> 127.0.0.1:25565 --wireguard--> play.cubecraft.net:25565
#[TCPClientTunnel]
#BindAddress = 127.0.0.1:25565
#Target = play.cubecraft.net:25565

# TCPServerTunnel is a tunnel listening on wireguard, and
# forward any TCP traffic received to the specified target via local network
# some applications on your wireguard network --wireguard--> 172.16.31.2:3422 -> localhost:25545
#[TCPServerTunnel]
#ListenPort = 3422
#Target = localhost:25545

# Socks5 create a socks5 proxy on your LAN, and any traffic would be routed via wireguard
[Socks5]
BindAddress = 127.0.0.1:25344
mirrormirage0 commented 2 years ago

I figured out that this was because I was using an older version of the wireproxy config format. After updating my config file to match the new format (having the [interface] tag, all works fine, and as expected.

The following config works fine for me.

[Interface]
Address = 10.13.13.6/32 
PrivateKey = #MYPRIVATEKEY 
DNS = 10.13.13.1 

[Peer]
PublicKey = #MYPUBLICKEY
Endpoint = #MYSERVER:MYPORT

# Socks5 create a socks5 proxy on your LAN, and any traffic would be routed via wireguard
[Socks5]
BindAddress = 0.0.0.0:25344