From 6b4d35ae90280f39f4b95a76c3a61b33a43e9fd8 Mon Sep 17 00:00:00 2001 From: Conners Hua Date: Sun, 9 Jan 2022 18:32:44 +0800 Subject: [PATCH] feat: add local DNS mapping --- Quantumult/Outbound.conf | 18 +++++++++++------- Surge/Module/General.sgmodule | 19 +++++++++++++++++++ Surge/Outbound.conf | 19 +++++++++++++------ 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/Quantumult/Outbound.conf b/Quantumult/Outbound.conf index 2f54f7f..196bab1 100644 --- a/Quantumult/Outbound.conf +++ b/Quantumult/Outbound.conf @@ -85,17 +85,22 @@ server=119.29.29.29 ;doh-server=https://223.6.6.6/dns-query # 本地 DNS 映射 -# Firebase Cloud Messaging +# > Firebase Cloud Messaging address=/mtalk.google.com/108.177.125.188 -# Google Dl +# > Google Dl server=/dl.google.com/119.29.29.29 server=/dl.l.google.com/119.29.29.29 +server=/update.googleapis.com/119.29.29.29 -# TP-Link -server=/tplogin.cn/system -server=/tplinklogin.net/system -server=/melogin.cn/system +# > PlayStation +server=/*.dl.playstation.net/119.29.29.29 + +# > Router Admin Panel server=/falogin.cn/system +server=/melogin.cn/system +server=/router.asus.com/system +server=/tplinklogin.net/system +server=/tplogin.cn/system ;server=8.8.4.4:53 ;server=/example0.com/system @@ -105,7 +110,6 @@ server=/falogin.cn/system ;address=/example5.com/192.168.16.18 ;address=/example6.com/[2001:8d3:8d3:8d3:8d3:8d3:8d3:8d3] - [policy] # # 需要策略图标的在策略后加上:img-url=http://example.com/icon.png diff --git a/Surge/Module/General.sgmodule b/Surge/Module/General.sgmodule index 3e48b23..2b37ffd 100644 --- a/Surge/Module/General.sgmodule +++ b/Surge/Module/General.sgmodule @@ -23,6 +23,25 @@ always-real-ip = %APPEND% msftconnecttest.com, msftncsi.com, *.msftconnecttest.c # > VIF Excluded Routes tun-excluded-routes = %APPEND% 239.255.255.250/32 +[Host] +# > Firebase Cloud Messaging +mtalk.google.com = 108.177.125.188 + +# > Google Dl +dl.google.com = server:119.29.29.29 +dl.l.google.com = server:119.29.29.29 +update.googleapis.com = server:119.29.29.29 + +# > PlayStation +*.dl.playstation.net = server:119.29.29.29 + +# > Router Admin Panel +falogin.cn = server:syslib +melogin.cn = server:syslib +router.asus.com = server:syslib +tplinklogin.net = server:syslib +tplogin.cn = server:syslib + [URL Rewrite] # Redirect Google Search Service ^https?:\/\/(www.)?(g|google)\.cn https://www.google.com 302 diff --git a/Surge/Outbound.conf b/Surge/Outbound.conf index 63dded7..0651b5f 100644 --- a/Surge/Outbound.conf +++ b/Surge/Outbound.conf @@ -160,16 +160,23 @@ GEOIP,CN,🌐Direct FINAL,🧭Final,dns-failed [Host] -# Firebase Cloud Messaging +# > Firebase Cloud Messaging mtalk.google.com = 108.177.125.188 -# Google Dl + +# > Google Dl dl.google.com = server:119.29.29.29 dl.l.google.com = server:119.29.29.29 -# TP-Link -tplogin.cn = server:syslib -tplinklogin.net = server:syslib -melogin.cn = server:syslib +update.googleapis.com = server:119.29.29.29 + +# > PlayStation +*.dl.playstation.net = server:119.29.29.29 + +# > Router Admin Panel falogin.cn = server:syslib +melogin.cn = server:syslib +router.asus.com = server:syslib +tplinklogin.net = server:syslib +tplogin.cn = server:syslib # 解锁了「模块」功能的用户可以使用 General.sgmodule 后可移除 [URL Rewrite] 及 [MITM] 的「hostname = www.google.cn,api.abema.io」部分 # 建议使用 General.sgmodule,其他 .sgmodule 按需加入