2022-07-08 18:10:39 +08:00
|
|
|
`socks` inbound is a socks4, socks4a, socks5 server.
|
|
|
|
|
|
|
|
### Structure
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"inbounds": [
|
|
|
|
{
|
|
|
|
"type": "socks",
|
|
|
|
"tag": "socks-in",
|
|
|
|
|
|
|
|
"listen": "::",
|
|
|
|
"listen_port": 2080,
|
|
|
|
"tcp_fast_open": false,
|
|
|
|
"sniff": false,
|
|
|
|
"sniff_override_destination": false,
|
|
|
|
"domain_strategy": "prefer_ipv6",
|
2022-08-23 23:15:56 +08:00
|
|
|
"proxy_protocol": false,
|
|
|
|
|
2022-07-08 18:10:39 +08:00
|
|
|
"users": [
|
|
|
|
{
|
|
|
|
"username": "admin",
|
|
|
|
"password": "admin"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-08-24 18:43:39 +08:00
|
|
|
### SOCKS Fields
|
2022-08-23 23:15:56 +08:00
|
|
|
|
|
|
|
#### users
|
|
|
|
|
|
|
|
SOCKS users.
|
|
|
|
|
|
|
|
No authentication required if empty.
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
### Listen Fields
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### listen
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
==Required==
|
2022-07-09 09:26:50 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Listen address.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### listen_port
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
==Required==
|
2022-07-09 09:26:50 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Listen port.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### tcp_fast_open
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Enable tcp fast open for listener.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### sniff
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Enable sniffing.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
See [Protocol Sniff](/configuration/route/sniff/) for details.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### sniff_override_destination
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Override the connection destination address with the sniffed domain.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
If the domain name is invalid (like tor), this will not work.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
|
|
|
#### domain_strategy
|
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
If set, the requested domain name will be resolved to IP before routing.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
If `sniff_override_destination` is in effect, its value will be taken as a fallback.
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-23 23:15:56 +08:00
|
|
|
#### proxy_protocol
|
2022-07-08 18:10:39 +08:00
|
|
|
|
2022-08-27 13:16:04 +08:00
|
|
|
Parse [Proxy Protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) in the connection header.
|