Proxy all Google domains (#8287)

* Proxy all Google domains

Default geosite-cn(dat/srs) used by v2rayN contains google@cn, which performs poorly in certain user environments.

* Resolve all Google domains via remote server

* fix typo

* Add google to default geofiles
This commit is contained in:
MkQtS 2025-11-12 19:08:36 +08:00 committed by GitHub
parent df7ca81837
commit f677934257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 25 deletions

View file

@ -458,7 +458,7 @@ download_geo_assets() {
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true "https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
done done
for f in \ for f in \
geosite-cn.srs geosite-gfw.srs geosite-greatfire.srs \ geosite-cn.srs geosite-gfw.srs geosite-google.srs geosite-greatfire.srs \
geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
curl -fsSL -o "$srss_dir/$f" \ curl -fsSL -o "$srss_dir/$f" \
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true "https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true

View file

@ -13,20 +13,19 @@
"api.ip.sb" "api.ip.sb"
] ]
}, },
{
"remarks": "Google cn",
"outboundTag": "proxy",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{ {
"remarks": "阻断udp443", "remarks": "阻断udp443",
"outboundTag": "block", "outboundTag": "block",
"port": "443", "port": "443",
"network": "udp" "network": "udp"
}, },
{
"remarks": "代理Google",
"outboundTag": "proxy",
"domain": [
"geosite:google"
]
},
{ {
"remarks": "绕过局域网IP", "remarks": "绕过局域网IP",
"outboundTag": "direct", "outboundTag": "direct",

View file

@ -1,18 +1,17 @@
[ [
{
"remarks": "Google cn",
"outboundTag": "proxy",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{ {
"remarks": "阻断udp443", "remarks": "阻断udp443",
"outboundTag": "block", "outboundTag": "block",
"port": "443", "port": "443",
"network": "udp" "network": "udp"
}, },
{
"remarks": "代理Google",
"outboundTag": "proxy",
"domain": [
"geosite:google"
]
},
{ {
"remarks": "绕过局域网IP", "remarks": "绕过局域网IP",
"outboundTag": "direct", "outboundTag": "direct",

View file

@ -14,9 +14,8 @@
], ],
"rules": [ "rules": [
{ {
"domain_suffix": [ "rule_set": [
"googleapis.cn", "geosite-google"
"gstatic.com"
], ],
"server": "remote", "server": "remote",
"strategy": "prefer_ipv4" "strategy": "prefer_ipv4"

View file

@ -8,8 +8,7 @@
"address": "1.1.1.1", "address": "1.1.1.1",
"skipFallback": true, "skipFallback": true,
"domains": [ "domains": [
"domain:googleapis.cn", "geosite:google"
"domain:gstatic.com"
] ]
}, },
{ {

View file

@ -14,9 +14,8 @@
], ],
"rules": [ "rules": [
{ {
"domain_suffix": [ "rule_set": [
"googleapis.cn", "geosite-google"
"gstatic.com"
], ],
"server": "remote", "server": "remote",
"strategy": "prefer_ipv4" "strategy": "prefer_ipv4"

View file

@ -396,6 +396,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
} }
//append dns items TODO //append dns items TODO
geoSiteFiles.Add("google");
geoSiteFiles.Add("cn"); geoSiteFiles.Add("cn");
geoSiteFiles.Add("geolocation-cn"); geoSiteFiles.Add("geolocation-cn");
geoSiteFiles.Add("category-ads-all"); geoSiteFiles.Add("category-ads-all");