XX-net/XX-Net · warning
request not supported command mode:%d
Error message
request not supported command mode:%d
What it means
SOCKS5 CONNECT-stage command was neither 1 (TCP connect) nor 3 (UDP associate). The proxy replies 0x07 command not supported and returns.
Source
Thrown at code/default/smart_router/local/proxy_handler.py:291
domain_len_pack = self.read_bytes(1)[0:1]
domain_len = ord(domain_len_pack)
domain = self.read_bytes(domain_len)
addr_pack = domain_len_pack + domain
addr = domain
elif addrtype == 4: # IPv6
addr_pack = self.read_bytes(16)
addr = socket.inet_ntop(socket.AF_INET6, addr_pack)
else:
xlog.warn("request address type unknown:%d", addrtype)
sock.send(b"\x05\x07\x00\x01") # Command not supported
return
port = struct.unpack('>H', self.rfile.read(2))[0]
if command == 3: # 3. UDP associate
return self.handle_udp_associate(sock, addr, port, addrtype_pack, addr_pack)
if command != 1: # 1. Tcp connect
xlog.warn("request not supported command mode:%d", command)
sock.send(b"\x05\x07\x00\x01") # Command not supported
return
# xlog.debug("socks5 %r connect to %s:%d", self.client_address, addr, port)
reply = b"\x05\x00\x00" + addrtype_pack + addr_pack + struct.pack(">H", port)
sock.send(reply)
if addrtype in [1, 4]:
handle_ip_proxy(sock, addr, port, self.client_address)
else:
handle_domain_proxy(sock, addr, port, self.client_address)
def https_handler(self):
line = self.read_crlf_line()
line = line
words = line.split()
if len(words) == 3:
command, path, version = wordsView on GitHub (pinned to cfa5bc17b6)
Solutions
- Configure the client to use CONNECT-only mode / passive transfers
- Use SOCKS5 UDP associate if UDP is the actual need
- Choose a proxy implementation that supports BIND if the app requires it
Defensive patterns
Strategy: validation
Validate before calling
if command not in (1,3): send 0x07 reply and close
Prevention
- Avoid SOCKS BIND through this proxy
- Use UDP associate for UDP needs
When it happens
Trigger: SOCKS5 client issues CMD 0x02 (BIND) at the request stage.
Common situations: FTP active mode, some P2P or remote-admin clients requesting BIND through SOCKS5.
Related errors
- Socks4 cmd:%d not supported
- request address type unknown:%d
- request not supported command mode:%d
- 600
- request version:%d error
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/95c4de2b62145413.
Report an issue: GitHub.