{"record":{"id":"85889d5a459243eb","repo":"XX-net/XX-Net","slug":"s-domain-s-fail-r","errorCode":null,"errorMessage":"%s domain:%s fail:%r","messagePattern":"(.+?) domain:(.+?) fail:%r","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/smart_router/local/smart_route.py","lineNumber":439,"sourceCode":"                    do_gae(sock, host, port, client_address, left_buf)\n                    return\n                except DontFakeCA:\n                    continue\n                except NotSupported as e:\n                    req = e.req\n                    left_bufs = [req.raw_requestline]\n                    for k in req.headers:\n                        v = req.headers[k]\n                        left_bufs.append(b\"%s: %s\\r\\n\" % (k, v))\n                    left_bufs.append(b\"\\r\\n\")\n                    left_buf = b\"\".join(left_bufs)\n\n                    return do_unwrap_socks(e.sock, host, port, client_address, req, left_buf=left_buf)\n                except SniNotExist:\n                    xlog.debug(\"%s domain:%s get sni fail\", scense, host)\n                    continue\n                except (SslWrapFail, simple_http_server.ParseReqFail) as e:\n                    xlog.warn(\"%s domain:%s fail:%r\", scense, host, e)\n                    g.domain_cache.report_gae_deny(host, port)\n                    sock.close()\n                    return\n                except simple_http_server.GetReqTimeout:\n                    # Happen sometimes, don't known why.\n                    xlog.debug(\"%s host:%s:%d try gae, GetReqTimeout:%d\", scense, host, port,\n                             (time.time() - start_time) * 1000)\n                    sock.close()\n                    return\n                except Exception as e:\n                    xlog.exception(\"%s host:%s:%d rule:%s except:%r\", scense, host, port, rule, e)\n                    g.domain_cache.report_gae_deny(host, port)\n                    sock.close()\n                    return\n\n            elif rule == \"socks\":\n                if not g.x_tunnel or not g.x_tunnel.proxy_session.login_process():\n                    continue","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/smart_router/local/smart_route.py#L421-L457","documentation":"During try_loop, the GAE/direct attempt for a domain raised SslWrapFail or ParseReqFail. The domain is reported as GAE-denied (cached) and the socket is closed — routing stops for this request.","triggerScenarios":"An SSL wrap failure or HTTP request-parse failure occurs while attempting the connection for host; caught as (SslWrapFail, simple_http_server.ParseReqFail).","commonSituations":"Target site with broken TLS (bad cert chain, TLS-version-only endpoints), server sending non-HTTP responses, or interference dropping/mangling the handshake.","solutions":["Check the domain's TLS configuration with openssl s_client -connect host:443 -servername host","Clear/inspect domain_cache so a transient deny is not sticky","Adjust the ssl_context (CA bundle, TLS versions) used for wrapping","Route this domain via a different rule (proxy/direct) explicitly"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"openssl s_client check or a pre-flight TLS probe before committing the route","typeGuard":null,"tryCatchPattern":"Catch (SslWrapFail, ParseReqFail); report deny to cache and try another transport.","preventionTips":["Clear domain_cache after fixing a domain's TLS","Maintain per-domain overrides for problematic TLS sites"],"tags":["ssl","gae","domain-cache","routing"],"backgroundTag":"ssl-handshake-failure","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}