Skip to content
Jason Lyu edited this page Apr 6, 2023 · 13 revisions

tun2socks

Welcome

Welcome to the official Wiki page for xjasonlyu/tun2socks.

Quickstart

  • Download precompiled binary from Releases
tun2socks --device tun://tun0 --proxy socks5://1.2.3.4:1080

For detailed examples, see this.

Usage

Usage of tun2socks:
  -config string
        YAML format configuration file
  -device string
        Use this device [driver://]name
  -fwmark int
        Set firewall MARK (Linux only)
  -interface string
        Use network INTERFACE (Linux/MacOS only)
  -loglevel string
        Log level [debug|info|warning|error|silent] (default "info")
  -mtu int
        Set device maximum transmission unit (MTU)
  -proxy string
        Use this proxy [protocol://]host[:port]
  -restapi string
        HTTP statistic server listen address
  -tcp-auto-tuning
        Enable TCP receive buffer auto-tuning
  -tcp-rcvbuf string
        Set TCP receive buffer size for netstack
  -tcp-sndbuf string
        Set TCP send buffer size for netstack
  -tun-post-up string
        Execute a command after TUN device setup
  -tun-pre-up string
        Execute a command before TUN device setup
  -udp-timeout duration
        Set timeout for each UDP session
  -version
        Show version and then quit

License

This software is released under the GPL-3.0 open-source license.

Clone this wiki locally