You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need EXCLUDE_SNI_REWRITE_SUBDOMAINS_LIST for app_script mode #719
Hi, thank you for the recent changes. The setup works perfectly in full_node mode with an exit node.
However as i mentioned in #701 , when using the Google Script -> CF Worker flow (i.e., running the app in app_script mode), Google hosts cannot be proxied as expected.
The root cause:
In app_script mode, all Google subdomains have their SNI rewritten by default. This becomes problematic when trying to reach Google AI Studio because we are connecting to it with our real IP from Iran which will be blocked. so we can bypass the sanctions by connecting to it through app_script proxy, not directly from the Google Script itself, but when a Cloudflare Worker is used as the endpoint of the chain (via Code.cfw.gs).
To successfully connect to Google AI Studio through the app_script -> CF Worker chain, we need to bypass SNI rewriting for certain Google subdomains, so they can be properly proxied and thus circumvent sanctions.
Proposed fix:
Add an EXCLUDE_SNI_REWRITE_SUBDOMAINS_LIST configuration option for app_script mode. This would allow users to specify addresses like Google AI Studio, ensuring they are proxied through the Google Script -> CF Worker pipeline without SNI modification. A similar strategy to what is being used for youtube_through_relay option, but as a list for EXCLUDE SNI REWRITE SUBDOMAINS.
سلام من نمیتونم سرور رایگان یا val. رو بسازم ...امکانش هست شما برام انجام بدین ؟ مثلا یوزر و پسورد رو بهتون بدم زحمتشو بکشید یا هر روش دیگری که ممکنه ....
سلام من نمیتونم سرور رایگان یا val. رو بسازم ...امکانش هست شما برام انجام بدین ؟ مثلا یوزر و پسورد رو بهتون بدم زحمتشو بکشید یا هر روش دیگری که ممکنه ....
@TKZ700 — feature request makes sense. Concept: disable_sni_rewrite_hosts: Vec<String> config field that takes precedence over the built-in SNI_REWRITE_SUFFIXES list, forcing matched hosts through the Apps Script relay (→ CF Worker chain) instead of the GFE SNI-rewrite tunnel.
The precedent already exists in code: youtube_via_relay does exactly this for youtube.com / youtu.be / youtube-nocookie.com / youtubei.googleapis.com. Adding a generic user-configurable list is mostly:
Add field to Config (src/config.rs)
Add a check at the top of matches_sni_rewrite() (src/proxy_server.rs) — if host matches any entry in the user list, return false (= don't SNI-rewrite, fall through to relay path).
UI checkbox / list editor (src/bin/ui.rs)
Tests for both apps_script + apps_script→cfw chain shape.
Queued — will tag an issue for tracking. Thanks for the clear root-cause writeup; this is the kind of feature ask that's easy to land because the ask is concrete and the architecture already supports it. Leaving open as the tracking issue.
For your AI Studio use case in the meantime: workaround is editing src/proxy_server.rs locally — change googleapis.com and google.com to be more specific (e.g. scripts.googleapis.com only, drop the broad googleapis.com). But that's unmaintainable across upgrades — better to wait for the proper config knob.
Closing this for now because there has been no follow-up from the issue opener for more than 7 days after the maintainer response.
If this is still happening on the latest release, please open a fresh issue with the current version, platform, mode, config with secrets removed, and the relevant logs.
Activity
o0Fara0o commentedon May 4, 2026
سلام من نمیتونم سرور رایگان یا val. رو بسازم ...امکانش هست شما برام انجام بدین ؟ مثلا یوزر و پسورد رو بهتون بدم زحمتشو بکشید یا هر روش دیگری که ممکنه ....
o0Fara0o commentedon May 4, 2026
سلام من نمیتونم سرور رایگان یا val. رو بسازم ...امکانش هست شما برام انجام بدین ؟ مثلا یوزر و پسورد رو بهتون بدم زحمتشو بکشید یا هر روش دیگری که ممکنه ....
therealaleph commentedon May 7, 2026
Reviewed via Anthropic Claude.
@TKZ700 — feature request makes sense. Concept:
disable_sni_rewrite_hosts: Vec<String>config field that takes precedence over the built-inSNI_REWRITE_SUFFIXESlist, forcing matched hosts through the Apps Script relay (→ CF Worker chain) instead of the GFE SNI-rewrite tunnel.The precedent already exists in code:
youtube_via_relaydoes exactly this foryoutube.com/youtu.be/youtube-nocookie.com/youtubei.googleapis.com. Adding a generic user-configurable list is mostly:Config(src/config.rs)matches_sni_rewrite()(src/proxy_server.rs) — if host matches any entry in the user list, return false (= don't SNI-rewrite, fall through to relay path).src/bin/ui.rs)Queued — will tag an issue for tracking. Thanks for the clear root-cause writeup; this is the kind of feature ask that's easy to land because the ask is concrete and the architecture already supports it. Leaving open as the tracking issue.
For your AI Studio use case in the meantime: workaround is editing
src/proxy_server.rslocally — changegoogleapis.comandgoogle.comto be more specific (e.g.scripts.googleapis.comonly, drop the broadgoogleapis.com). But that's unmaintainable across upgrades — better to wait for the proper config knob.therealaleph commentedon May 25, 2026
Closing this for now because there has been no follow-up from the issue opener for more than 7 days after the maintainer response.
If this is still happening on the latest release, please open a fresh issue with the current version, platform, mode, config with secrets removed, and the relevant logs.
Answered via LLM, Supervised @therealaleph