heiher / hev-socks5-tunnel

A high-performance tun2socks for Linux/Android/FreeBSD/macOS/iOS/WSL2 (IPv4/IPv6/TCP/UDP)
MIT License
651 stars 132 forks source link

Get it to work on macOS #39

Closed smukee closed 8 months ago

smukee commented 1 year ago

Here's my config.yml

tunnel:
  # Interface name
  name: uutun0
  # Interface MTU
  mtu: 8500
  # Multi-queue
  multi-queue: false
  # IPv4 address
  ipv4: 198.18.0.1
  # IPv6 address
  ipv6: 'fc00::1'

socks5:
  # Socks5 server port
  port: 1081
  # Socks5 server address (ipv4/ipv6)
  address: 127.0.0.1
  # Socks5 UDP relay mode (tcp|udp)
  udp: 'udp'

Despite tun interface being declared as "uutun0", it creates a device named "utun2"--not a problem so far. Then I do: sudo ./hev-socks5-tunnel config.yml and it starts: [2023-05-04 16:00:10] [W] set limit nofile Here's how I set the default route: sudo route change default 198.18.0.1 -hopcount 1

So far it won't work and I get lots of [2023-05-04 16:02:02] [E] 0x7faf187044f0 socks5 client connect and nothing else.... I don't understand the "bypass" part and how to do it on macOS please explain.

Thank you.

heiher commented 1 year ago

I'm not sure how to set the default route to tun on macOS without affecting access to upstream servers. The functionality test only routes specific addresses on macOS.

tozik commented 1 year ago

looking on my end of macos

cattyhouse commented 4 months ago

@smukee https://github.com/heiher/hev-socks5-tunnel/discussions/104