pufferffish / wireproxy

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

Some questions #10

Closed fscarmen closed 2 years ago

fscarmen commented 2 years ago

I have some questions:

  1. Does wireproxy support warp IPv6. If yes, how is the config file set?
  2. Does wireproxy support pass parameters? ----Now i run nohup ./wireproxy /etc/wireguard/wireproxy >/dev/null 2>&1 & to create the socks5 and kill -9 $(pgrep -f wireproxy) to close it.
  3. Does wireproxy support ARM64? It runs fine on AMD64. But it seems a little wrong on ARM64.
    root@phoenix4:~# arch
    aarch64
    root@phoenix4:~# ss -nltp | grep wireproxy
    LISTEN    0         4096             127.0.0.1:25565            0.0.0.0:*        users:(("wireproxy",pid=2140933,fd=12))                                        
    LISTEN    0         4096             127.0.0.1:25344            0.0.0.0:*        users:(("wireproxy",pid=2140933,fd=11))                                        
    root@phoenix4:~# curl -s4m5 --socks5 127.0.0.1:25344 https://ip.gs
    root@phoenix4:~# 
  4. What are the usage scenarios of TCPClientTunnel and TCPServerTunnel? Can you give a specific example?

Ths your repo. It 's very useful.

pufferffish commented 2 years ago
  1. I haven't tested it with IPv6, but in theory it should work. A sample config snippet would probably look like this:
    SelfEndpoint = fe80::1
    PeerEndpoint = [fc80::1]:53
  2. No, it merely takes a path to a config file and that's it. No pass paramteres.
  3. So in #3 @MuratovAS mentioned that they have tested wireproxy in a ARM64 settings, so I'd imagine it would work. I'm gonna test it on termux in my phone and see if it works or not.

Edit: I've tested it on my phone on termux and it works on ARM64.

fscarmen commented 2 years ago

Thanks for your reply, it's really a great REPO. I have a one click script that installs WARP. And I have integrated the functionality of wireproxy. Before, I installed warp in alpine docker and used 'gost' to create a socks5 proxy to the host. Or use iptables + dnsmasq + ipset to divert some websites to warp.

Here is my REPO: https://github.com/fscarmen/warp

pufferffish commented 2 years ago

Just realized I missed question 4. Those are essentially static TCP tunnels. TCPClientTunnel allows you to host a TCP server on your localhost, and any traffic received will be forwarded to the specified endpoint over wireguard. TCPServerTunnel is the opposite, hosting a TCP server in the wireguard network and forwarding any received traffic on a localhost.

This can be useful when you have an application that doesn't support socks5, but the destination endpoint is already known beforehand. Or receiving incoming TCP traffic over wireguard, without configuring firewalls at kernel space.

pufferffish commented 2 years ago
  1. I haven't tested it with IPv6, but in theory it should work. A sample config snippet would probably look like this:
SelfEndpoint = fe80::1
PeerEndpoint = [fc80::1]:53
  1. No, it merely takes a path to a config file and that's it. No pass paramteres.
  2. So in Docker container implementation #3 @MuratovAS mentioned that they have tested wireproxy in a ARM64 settings, so I'd imagine it would work. I'm gonna test it on termux in my phone and see if it works or not.

Edit: I've tested it on my phone on termux and it works on ARM64.

So apparently IPv6 wasn't working and I figured out why. In the newest commit I've added support for IPv6 and I have tested it on ipv6.google.com and test-ipv6.com with cloudflare warp. Here's my config:


[Interface]
PrivateKey = censored
Address = 172.16.0.2/32
Address = fd01:5ca1:ab1e:8d86:bd6:e0d3:8ad9:1c81/128
MTU = 1280
DNS = 1.1.1.1

[Peer]
PublicKey = censored
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = engage.cloudflareclient.com:2408

[Socks5]
BindAddress = 127.0.0.1:25344

[TCPClientTunnel]
BindAddress = 127.0.0.1:25565
Target = play.cubecraft.net:25565