Skip to content

Bug/Feature Request: Google AI services (Gemini/AI Studio) leak local IP in Cloudflare/Apps Script mode #1294

@Reza050

Description

@Reza050

Description:
I am using the project in apps_script / cloudflare mode. While the relay works for most sites, I've noticed that specific Google services, particularly Gemini (gemini.google.com) and AI Studio (aistudio.google.com), still detect my original local IP (Iran), causing them to remain blocked or restricted.
The Problem:
It seems that in the current Rust implementation, these subdomains are either being bypassed or are not being correctly routed through the relay. Since these services are highly sensitive to regional IPs, any leakage or direct SNI handling causes them to fail.
Reference Solution:
Other similar projects, such as mhr-cfw, have solved this issue by implementing a specific routing logic for Google subdomains. They use a configuration to explicitly "exclude" certain Google hosts from direct connection and force them through the relay.
Here is the logic used in their config.json which effectively fixes the issue:

"direct_google_exclude": [
    "gemini.google.com",
    "aistudio.google.com",
    "notebooklm.google.com",
    "labs.google.com",
    "meet.google.com",
    "accounts.google.com",
    "ogs.google.com",
    "mail.google.com",
    "calendar.google.com",
    "drive.google.com",
    "docs.google.com",
    "chat.google.com",
    "maps.google.com",
    "play.google.com",
    "translate.google.com",
    "assistant.google.com",
    "lens.google.com"
],
"direct_google_allow": [
    "www.google.com",
    "safebrowsing.google.com"
]

Requested Change:
Could you please implement a similar routing mechanism or "Exclude List" in this Rust version? We need a way to force these specific Google subdomains to go through the relay instead of being handled by the default Google IP/Fronting logic, which currently results in an IP leak.
Environment:
Mode: apps_script / cloudflare
Client: MasterHttpRelayVPN-RUST

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions