Fix proxy-provider bypass: use ?provider=1 param instead of custom header
Custom header X-Proxy-Provider is not sent by ClashMi and other clients that don't support header: in proxy-providers. URL query param works in all clients universally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b846756a6d
commit
482749c966
+3
-3
@@ -417,9 +417,9 @@ map \$http_user_agent \$is_clash_ua {
|
||||
~*(clash|clashx|clashn|mihomo|stash|surfboard) 1;
|
||||
default 0;
|
||||
}
|
||||
# Serve clash.yaml only when: Clash UA AND no X-Proxy-Provider header
|
||||
# (proxy-provider refresh requests carry X-Proxy-Provider: true and must get the real sub)
|
||||
map "\$is_clash_ua:\$http_x_proxy_provider" \$serve_clash_yaml {
|
||||
# Serve clash.yaml only when: Clash UA AND no ?provider=1 query param
|
||||
# (proxy-provider refresh requests add ?provider=1 and must get the real sub)
|
||||
map "\$is_clash_ua:\$arg_provider" \$serve_clash_yaml {
|
||||
"1:" 1;
|
||||
default 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user