pufferffish / wireproxy

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

TCP #71

Closed Su-Du closed 10 months ago

Su-Du commented 1 year ago

Hello, dear author. Thank you for your contribution. There's a question I haven't quite understood. I have established a connection between wireguard-US (server) and my local wireguard-CH (client). On my US-VPS, I have set up wireproxy and configured its listening address to use Wireguard, allowing me to switch networks through ports. However, I'm unsure whether this setup is based on UDP or TCP. I need both of them. If I want wireproxy to use TCP, how should I proceed? I will paste my server configuration below and hope to receive your assistance. I'm a networking novice. Lastly, I wish you good health, and by the way, I hope your wishes come true.

WireProxy-----conf

[Interface]

JP

PrivateKey = XXXXXXXXXX Address = 10.10.0.2/32 DNS = 1.1.1.1

[Peer] PublicKey = BBBBBBBBBBB AllowedIPs = 0.0.0.0/0 Endpoint = 2.2.2.2:51820 PersistentKeepalive = 25

[Socks5] BindAddress = 10.10.6.1:10033 (Wireguard-US)

pufferffish commented 1 year ago

The underlying wireguard connection is based on UDP. TCP traffic is proxied via the socks5 server which wireproxy exposes, and is transmitted to the other wireguard peer via UDP.

Su-Du commented 1 year ago

I need to use tcp, how do I set it up so that the traffic becomes TCP, can I give an edit according to my example? Thank you!

pufferffish commented 1 year ago

I need to use tcp, how do I set it up so that the traffic becomes TCP, can I give an edit according to my example? Thank you!

Wireguard can only work over UDP