wiki/linux/tun2socks/Proxy-Models.md

63 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2024-10-18 05:39:50 +03:00
## Syntax of Supported Proxy Models
### HTTP
> HTTP proxy server must support **CONNECT** method!
`-proxy http://server_host:port`
### Socks4
> Socks4 only support **USERID** auth.
`-proxy socks4://<userid>@server_host:port`
### Socks5
`-proxy socks5://<username>:<password>@server_host:port`
Or for Unix Domain Socket (UDS)
`-proxy socks5:///path/to/file`
> Please note that connecting with UDS is not a standard Socks5 protocol and requires server-side support.
### Shadowsocks
`-proxy ss://method:password@server_host:port/<?obfs=http;obfs-host=xxx>`
or in [SIP002](http://shadowsocks.org/en/wiki/SIP002-URI-Scheme.html) URI scheme:
`-proxy ss://base64_encode(method:password)@server_host:port/<?obfs=http;obfs-host=xxx>`
P.S. Leave method and password empty to use none cipher mode.
### Relay
> Latest [GOST](https://github.com/go-gost/gost) version is required for better compatibility.
`-proxy relay://<username>:<password>@server_host:port?<nodelay=false>`
### Direct
> Note that `Direct` is usually used for testing purposes.
`-proxy direct://`
### Reject
> `Reject` simply blocks all outgoing connections.
`-proxy reject://`
## UDP Support Table
| Proxy | UDP Support | UDP Type |
| ----- | :---: | :---: |
| HTTP | ❌ | N/A |
| Socks4 | ❌ | N/A |
| Socks5 | ✅ | UDP |
| Shadowsocks | ✅ | UDP |
| Relay | ✅ | UDP over TCP |
| Direct | ✅ | UDP |
| Reject | N/A | N/A |