{"record":{"id":"7562f9bf8fccd046","repo":"XX-net/XX-Net","slug":"602","errorCode":"602","errorMessage":"ip not support GAE","messagePattern":"ip not support GAE","errorType":"exception","errorClass":"GAE_Exception","httpStatus":null,"severity":"error","filePath":"code/default/gae_proxy/local/gae_handler.py","lineNumber":361,"sourceCode":"            xlog.warning('APPID %r out of Quota, remove it. %s',\n                         appid, response.ssl_sock.ip_str)\n            front.appid_manager.report_out_of_quota(appid)\n            # google_ip.report_connect_closed(response.ssl_sock.ip_str, \"out of quota\")\n            response.worker.close(\"appid out of quota:%s\" % appid)\n            raise GAE_Exception(604, \"appid out of quota:%s\" % appid)\n\n        server_type = response.getheader(b\"Server\", b\"\")\n        if (b\"gws\" not in server_type and b\"Google Frontend\" not in server_type and b\"GFE\" not in server_type) or \\\n                response.status == 403 or response.status == 405:\n\n            # some ip can connect, and server type can be gws\n            # but can't use as GAE server\n            # so we need remove it immediately\n\n            xlog.warn(\"IP:%s not support GAE, headers:%s status:%d\", response.ssl_sock.ip_str, response.headers,\n                      response.status)\n            response.worker.close(\"ip not support GAE\")\n            raise GAE_Exception(602, \"ip not support GAE\")\n\n        response.gps = response.getheader(b\"x-server\", b\"\")\n\n        if response.status > 300:\n            raise GAE_Exception(605, \"status:%d\" % response.status)\n\n        if response.status != 200:\n            xlog.warn(\"GAE %s appid:%s status:%d\", response.ssl_sock.ip_str,\n                      appid, response.status)\n\n        return response\n    except GAE_Exception as e:\n        if e.error_code not in (600, 603, 604) and hasattr(response, \"ssl_sock\"):\n            front.ip_manager.recheck_ip(response.ssl_sock.ip_str, first_report=False)\n        raise e\n\n\ndef request_gae_proxy(method, url, headers, body, timeout=None):","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/gae_proxy/local/gae_handler.py#L343-L379","documentation":"GAE_Exception 602 raised when the responding server is not a Google frontend: the Server header lacks 'gws'/'Google Frontend'/'GFE', or status is 403/405. The IP connects but cannot serve GAE, so the worker is closed and the IP is effectively rejected for GAE use.","triggerScenarios":"request_gae_proxy landing on a non-Google server (hijacked IP, wrong scan result), or a Google IP that refuses the GAE app path with 403/405. The check runs on every response's Server header.","commonSituations":"DNS poisoning / IP hijack returning a captive portal, CDN or other service occupying the IP, GFW interference, IP ranges reassigned away from Google.","solutions":["Let the IP manager rescan / remove bad IPs; restart XX-Net to trigger re-scanning","Verify the IP actually belongs to Google (whois / curl to https://ip)","Update XX-Net — IP evaluation logic improves over versions","Use a cleaner network path (different ISP route, VPN) if hijacking is systematic"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = request_gae_proxy(...)\nexcept GAE_Exception as e:\n    if e.code == 602:  # non-Google server; retry picks another IP\n        report_bad_ip_current()\n        resp = request_gae_proxy(...)\n    else:\n        raise","preventionTips":["Trust the built-in Server-header validation; never disable it","Use uncensored DNS to reduce landing on hijacked IPs","Periodically let the IP scanner re-qualify the pool"],"tags":["gae-proxy","ip-validation","hijack","server-header"],"backgroundTag":"server-identity-mismatch","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}