XX-net/XX-Net · error
https create conn to %s:%d fail
Error message
https create conn to %s:%d fail
What it means
HTTP CONNECT handshake parsed, but proxy_session.create_conn failed to create a tunnel to host:port, so the proxy replies 'HTTP/1.1 500 Fail' and closes.
Source
Thrown at code/default/x_tunnel/local/proxy_handler.py:317
version = b"HTTP/1.1"
else:
xlog.warn("https req line fail:%s", line)
return
if command != "ONNECT":
xlog.warn("https req line fail:%s", line)
return
host, _, port = path.rpartition(':')
host = host.encode()
port = int(port)
header_block = self.read_headers()
sock = self.connection
conn_id = proxy_session.create_conn(sock, host, port)
if not conn_id:
xlog.warn("https create conn to %s:%d fail", host, port)
sock.send(b'HTTP/1.1 500 Fail\r\n\r\n')
return
xlog.info("https %r connect to %s:%d conn:%d", self.client_address, host, port, conn_id)
try:
sock.send(b'HTTP/1.1 200 OK\r\n\r\n')
except:
xlog.warn("https %r connect to %s:%d conn:%d closed.", self.client_address, host, port, conn_id)
if (len(self.read_buffer) - self.buffer_start) > 0:
g.session.conn_list[conn_id].transfer_received_data(self.read_buffer[self.buffer_start:])
g.session.conn_list[conn_id].start(block=True)
def http_handler(self, first_char):
req_line = self.read_crlf_line()
words = req_line.split()
if len(words) == 3:View on GitHub (pinned to cfa5bc17b6)
Solutions
- Verify x-tunnel login/session is up
- Check balance and front availability (see errors 223/227)
- Restart the client if the session is wedged
Defensive patterns
Strategy: fallback
Validate before calling
if not g.session:
establish_session_first() Prevention
- Verify login/quota/fronts before browsing HTTPS
When it happens
Trigger: HTTPS browsing while the x-tunnel session is down, not logged in, quota exhausted, or fronts unavailable so create_conn returns nothing.
Common situations: Session expired/never established, missing account config, all fronts blocked.
Related errors
- https req line fail:%s
- https req line fail:%s
- Socks4 connect fail, no conn_id
- socks5 create conn to %s:%d fail
- https %r connect to %s:%d conn:%d closed.
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/a4a927dd0a3029ba.
Report an issue: GitHub.