2022-07-08 10:48:43 +00:00
|
|
|
`socks` outbound is a socks4/socks4a/socks5 client.
|
|
|
|
|
|
|
|
### Structure
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"outbounds": [
|
|
|
|
{
|
|
|
|
"type": "socks",
|
|
|
|
"tag": "socks-out",
|
2022-08-01 09:02:13 +00:00
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
"server": "127.0.0.1",
|
|
|
|
"server_port": 1080,
|
|
|
|
"version": "5",
|
|
|
|
"username": "sekai",
|
|
|
|
"password": "admin",
|
|
|
|
"network": "udp",
|
2022-08-12 09:55:52 +00:00
|
|
|
"udp_over_tcp": false,
|
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
"detour": "upstream-out",
|
|
|
|
"bind_interface": "en0",
|
2022-08-22 06:28:23 +00:00
|
|
|
"bind_address": "0.0.0.0",
|
2022-07-08 10:48:43 +00:00
|
|
|
"routing_mark": 1234,
|
|
|
|
"reuse_addr": false,
|
|
|
|
"connect_timeout": "5s",
|
|
|
|
"tcp_fast_open": false,
|
|
|
|
"domain_strategy": "prefer_ipv6",
|
|
|
|
"fallback_delay": "300ms"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
### SOCKS Fields
|
2022-07-08 10:48:43 +00:00
|
|
|
|
|
|
|
#### server
|
|
|
|
|
2022-07-09 01:26:50 +00:00
|
|
|
==Required==
|
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
The server address.
|
|
|
|
|
|
|
|
#### server_port
|
|
|
|
|
2022-07-09 01:26:50 +00:00
|
|
|
==Required==
|
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
The server port.
|
|
|
|
|
|
|
|
#### version
|
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
The SOCKS version, one of `4` `4a` `5`.
|
2022-07-08 10:48:43 +00:00
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
SOCKS5 used by default.
|
2022-07-08 10:48:43 +00:00
|
|
|
|
|
|
|
#### username
|
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
SOCKS username.
|
2022-07-08 10:48:43 +00:00
|
|
|
|
|
|
|
#### password
|
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
SOCKS5 password.
|
2022-07-08 10:48:43 +00:00
|
|
|
|
|
|
|
#### network
|
|
|
|
|
|
|
|
Enabled network
|
|
|
|
|
|
|
|
One of `tcp` `udp`.
|
|
|
|
|
|
|
|
Both is enabled by default.
|
|
|
|
|
2022-08-12 09:55:52 +00:00
|
|
|
#### udp_over_tcp
|
|
|
|
|
|
|
|
Enable the UDP over TCP protocol.
|
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
### Dial Fields
|
|
|
|
|
|
|
|
#### detour
|
|
|
|
|
|
|
|
The tag of the upstream outbound.
|
|
|
|
|
|
|
|
Other dial fields will be ignored when enabled.
|
|
|
|
|
|
|
|
#### bind_interface
|
|
|
|
|
|
|
|
The network interface to bind to.
|
|
|
|
|
2022-08-22 06:28:23 +00:00
|
|
|
#### bind_address
|
|
|
|
|
|
|
|
The address to bind to.
|
|
|
|
|
2022-07-08 10:48:43 +00:00
|
|
|
#### routing_mark
|
|
|
|
|
2022-07-27 04:03:07 +00:00
|
|
|
!!! error ""
|
2022-07-08 10:48:43 +00:00
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
Only supported on Linux.
|
2022-07-27 04:03:07 +00:00
|
|
|
|
2022-08-24 13:02:28 +00:00
|
|
|
Set netfilter routing mark.
|
2022-07-08 10:48:43 +00:00
|
|
|
|
|
|
|
#### reuse_addr
|
|
|
|
|
|
|
|
Reuse listener address.
|
|
|
|
|
|
|
|
#### connect_timeout
|
|
|
|
|
|
|
|
Connect timeout, in golang's Duration format.
|
|
|
|
|
|
|
|
A duration string is a possibly signed sequence of
|
|
|
|
decimal numbers, each with optional fraction and a unit suffix,
|
|
|
|
such as "300ms", "-1.5h" or "2h45m".
|
|
|
|
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
|
|
|
|
|
|
|
#### domain_strategy
|
|
|
|
|
|
|
|
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
|
|
|
|
|
|
|
|
If set, the server domain name will be resolved to IP before connecting.
|
|
|
|
|
|
|
|
`dns.strategy` will be used if empty.
|
|
|
|
|
|
|
|
#### fallback_delay
|
|
|
|
|
|
|
|
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
|
|
|
|
That is, is the amount of time to wait for IPv6 to succeed before assuming
|
|
|
|
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
|
|
|
|
If zero, a default delay of 300ms is used.
|
|
|
|
|
|
|
|
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.
|