Browse Source

Update AI Hosts to Bypass Google Gemini HTTP 429

SukkaW 1 week ago
parent
commit
4cff6af899
1 changed files with 17 additions and 0 deletions
  1. 17 0
      Source/non_ip/ai.conf

+ 17 - 0
Source/non_ip/ai.conf

@@ -38,6 +38,23 @@ DOMAIN-SUFFIX,gemini.google
 DOMAIN-SUFFIX,gemini.google.com
 DOMAIN,aisandbox-pa.googleapis.com
 DOMAIN,robinfrontend-pa.googleapis.com
+# Here is how gemini.google.com doing HTTP 429 right now:
+#
+# without a special cookie, gemini.google.com will return HTTP 302 to the following URL with
+# a special state token URL parameter:
+# https://www.google.com/sorry/index?continue=https://gemini.google.com/...
+#
+# On https://www.google.com/sorry/index?continue=xxx, the CDN edge will validate this state token,
+# compare the client IPs, and reject the request with HTTP 429 if the IPs are mismatched
+#
+# If the IP matches, the CDN edge will return a HTTP 302 redirect back to https://gemini.google.com
+# with another special state token URL parameter telling gemini.google.com stop returning HTTP 302
+# back to www.google.com/sorry/index?continue=xxx and start serving the real content.
+#
+# We can simply matches www.google.com/sorry/index?continue=xxx and proxy this as well
+#
+# Note that you will need to enable MitM www.google.com for this rule to work.
+URL-REGEX,https://www\.google\.com/.*continue=https://gemini\.google\.com.+
 # DeepMind
 DOMAIN-SUFFIX,deepmind.com
 DOMAIN-SUFFIX,deepmind.google