Mixed
SOCKS5 and HTTP on one port. A connection whose first byte is 0x05 goes to SOCKS5, anything else to HTTP. Built by core, not a module.
Structure
json
{
"tag": "mixed-in",
"listen": "127.0.0.1",
"port": 2080,
"transport": [{ "type": "tcp" }],
"protocol": {
"type": "mixed",
"settings": {
"users": [{ "name": "alice", "password": "correct horse" }],
"socks5": { "udp_relay": true },
"http": {},
"first_byte_timeout": "10s"
}
}
}The other keys are those of every inbound.
Fields
users
list of users
One list for both protocols, each user with a name and a password. A user must suit both, so a name with : (HTTP) or over 255 bytes (SOCKS5) is refused. With none, no login is asked. See Users.
socks5
object
SOCKS5 inbound settings, without users.
http
object
HTTP inbound settings, without users.
first_byte_timeout
durationDefault: 10s
How long a client may take to send its first byte. Then the chosen protocol's own handshake_timeout applies.
SOCKS4 is not supported: its first byte goes to HTTP, which refuses it.