SagerNet / SagerNet

The universal proxy toolchain for Android

Home Page:https://sagernet.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

部分路由规则无法生效

EsuRt opened this issue · comments

commented

知情同意表

本知情同意表格适用于希望提交错误报告的用户。本表格意在确保您知晓并理解以下内容:提交报告的的风险、收益、其他可选选项、用户义务、以及您应注意的事项;

您应该已经了解到提交报告并非解决错误的唯一方式, 就像染色体和性器官并不能定义您的性别身份一样, 提交报告并不是问题是否能够被解决的决定性因素;

您应该首先尝试学习文档, 了解一些操作系统与网络通信的基本常识, 并与其他用户充分讨论, 以确保这是 SagerNet 而不是您的设置或其他程序 (如 v2ray-core) 的错误;

我们建议您首先花足够的时间通过提问, 阅读, 研究等方式了解 SagerNet, 并考虑使用本软件可能对您和您生活产生的影响.

若您有任何关于本同意书的问题, 或在应用使用期间产生任何问题, 请向用户群组提出问题而不是滥用 issues 区, 您也可以随时选择停止使用 SagerNet —— 不用通知我们.


请于下方括号中填写 y 以确认.

(y) 本人 (填写名称或网名) 为 SagerNet 最新版本 之用户,并希望提交错误报告.

(y) 我理解 Project S 作者为业余开发者, 对计算机科学与网络通信的研究尚不充分, 没有任何专业支持为我提供. 如果可能, 我将自己解决问题并提交拉取请求.

(y) 我理解 SagerNet 为自由软件且没有非自由依赖, 我有发布、研究、修改和改进软件的自由, 但不得将修改版本作为专有软件发布 (包括不发布或更新源代码、混淆源代码、引入专有依赖).

(y) 我理解 SagerNet 为免费发行之软件, 除非另有书面说明, 全部的风险, 如绕过网络审查产生的以下法律的风险, 且其中一些可能造成财产损失甚至生命危险 (均有真实事件), 都由您来承担:

  • 教育训诫
  • 依法控制
  • 拘留
  • 免职
  • 传唤警告
  • 执行指定居所监视居住
  • 警告处罚
  • 拘役
  • 有期徒刑
  • 不公开审理

描述问题

Google Play无法浏览和下载,启用日志后,发现部分域名被国内DNS解析到国内地址,将这些域名指定为代理后,日志中仍通过国内DNS解析,域名重写设置后依然这样。SagerNet全局模式正常。

如何复现

1、相关设置
路由资源更新源:Loyalsoldier/v2ray-rules-dat
远程DNS:https://1.1.1.1/dns-query
不使用本地DNS作为直连DNS
直连DNS:https+local://223.5.5.5/dns-query
域名重写:domain:googleapis.cn googleapis.com

路由规则(从上到下):
geosite:geolocation-!cn 代理
geosite:cn 绕过
geoip:cn 绕过

2、打开Google Play,会提示无法连接到互联网,随意查看几个app的页面后,可以发现日志中的connectivitycheck.gstatic.comservices.googleapis.cn均通过https+local://223.5.5.5/dns-query解析。
connectivitycheck.gstatic.comLoyalsoldier/v2ray-rules-datgoogle-cn中,但是geosite:google-cngeosite:geolocation-!cn的子集,默认应该是走远程DNS。
1

20774 24689 D v2ray-core: app/dns: domain connectivitycheck.gstatic.com matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 24689 D v2ray-core: app/dns: domain connectivitycheck.gstatic.com will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20811 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: connectivitycheck.gstatic.com -> TypeA [203.208.40.98]

3、路由中添加googleapis.cn,设置为代理。
2

4、重复第二步,发现services.googleapis.cn仍通过https+local://223.5.5.5/dns-query解析。

20774 24689 D v2ray-core: app/dns: domain services.googleapis.cn matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 24689 D v2ray-core: app/dns: domain services.googleapis.cn will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20868 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: services.googleapis.cn -> TypeA [180.163.151.162]

调试信息

关于 -> 导出调试信息

如果您不直接发送文件, 请使用 Markdown code 块格式, 否则您的 issue 将被直接关闭!

--------- beginning of main
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 0
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: handleAppVisibility mAppVisible = true visible = false
20825 20872 D OpenGLRenderer: setSurface called with nullptr
20825 20872 D OpenGLRenderer: setSurface() destroyed EGLSurface
20825 20872 D OpenGLRenderer: destroyEglSurface
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: performTraversals mFirst=false windowShouldResize=false viewVisibilityChanged=true mForceNextWindowRelayout=false params=null
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)8 dur=5 res=0x2 s={false 0x0} ch=true seqId=0
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: stopped(true) old = false
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: WindowStopped on io.nekohasekai.sagernet/io.nekohasekai.sagernet.ui.MainActivity set to true
20825 20825 I MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@6f2094e[MainActivity]
20825 20825 D InputTransport: Input channel destroyed: 'ClientS', fd=122
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: performTraversals mFirst=false windowShouldResize=false viewVisibilityChanged=false mForceNextWindowRelayout=false params={(0,0)(fillxfill) sim={adjust=pan} ty=BASE_APPLICATION wanim=0x1030309
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fl=81810100
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   pfl=12020040
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   vsysui=500
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   bhv=DEFAULT
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fitSides= naviIconColor=0}
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)8 dur=4 res=0x2 s={false 0x0} ch=false seqId=0
20774 20868 W v2ray-core: app/dispatcher: default route for udp:142.250.72.174:443
20774 20868 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:xxx.xxxx.com:39333
20774 20868 D v2ray-core: app/dns: domain xxx.xxxx.com matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 20868 D v2ray-core: app/dns: domain xxx.xxxx.com will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20868 W v2ray-core: app/dispatcher: default route for udp:142.250.189.22:443
20774 20868 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:xxx.xxxx.com:39333
20774 20867 D v2ray-core: app/dns: domain xxx.xxxx.com matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 20867 D v2ray-core: app/dns: domain xxx.xxxx.com will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20868 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: xxx.xxxx.com -> TypeA [xxx.xxx.xxx.xxxx]
20774 20868 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: xxx.xxxx.com -> TypeA [xxx.xxx.xxx.xxxx]
20774 24689 I v2ray-core: proxy/vmess/outbound: tunneling request to udp:142.250.189.22:443 via tcp:xxx.xxxx.com:39333
20774 20867 I v2ray-core: proxy/vmess/outbound: tunneling request to udp:142.250.72.174:443 via tcp:xxx.xxxx.com:39333
20774 20868 I v2ray-core: app/dispatcher: taking detour [dns-out] for [udp:172.19.0.2:53]
20774 20868 I v2ray-core: proxy/dns: handling DNS traffic to tcp:1.1.1.1:53
20774 20867 D v2ray-core: app/dns: domain play.googleapis.com will use DNS in order: [DOH//https://1.1.1.1/dns-query]
20774 20811 W v2ray-core: app/dispatcher: default route for tcp:1.1.1.1:443
20774 20811 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:xxx.xxxx.com:39333
20774 20811 D v2ray-core: app/dns: dns cache HIT xxx.xxxx.com -> [xxx.xxx.xxx.xxxx]
20774 20867 I v2ray-core: proxy/vmess/outbound: tunneling request to tcp:1.1.1.1:443 via tcp:xxx.xxxx.com:39333
20774 20867 D v2ray-core: app/dns: DOH//https://1.1.1.1/dns-query got answer: play.googleapis.com -> TypeA [142.250.188.234 142.250.68.106 142.250.176.10 142.250.72.170 142.250.217.138 142.250.72.234 142.250.68.74 142.250.68.10 142.250.68.42 172.217.14.74 142.250.72.138 142.251.40.42 142.250.189.10]
20774 24689 D v2ray-core: app/dispatcher: dispatch conn to tcp:142.250.188.234:443
20774 24689 W v2ray-core: app/dispatcher: default route for tcp:142.250.188.234:443
20774 24689 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:xxx.xxxx.com:39333
20774 24689 D v2ray-core: app/dns: dns cache HIT xxx.xxxx.com -> [xxx.xxx.xxx.xxxx]
20774 20811 I v2ray-core: proxy/vmess/outbound: tunneling request to tcp:142.250.188.234:443 via tcp:xxx.xxxx.com:39333
20774 24689 I v2ray-core: app/dispatcher: taking detour [dns-out] for [udp:172.19.0.2:53]
20774 24689 I v2ray-core: proxy/dns: handling DNS traffic to tcp:1.1.1.1:53
20774 24689 D v2ray-core: app/dns: domain connectivitycheck.gstatic.com matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 24689 D v2ray-core: app/dns: domain connectivitycheck.gstatic.com will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20811 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: connectivitycheck.gstatic.com -> TypeA [203.208.40.98]
20774 24689 D v2ray-core: app/dispatcher: dispatch conn to tcp:203.208.40.98:443
20774 24689 D v2ray-core: app/dispatcher: dispatch conn to tcp:203.208.40.98:443
20774 24689 I v2ray-core: app/dispatcher: taking detour [bypass] for [tcp:203.208.40.98:443]
20774 24689 I v2ray-core: app/dispatcher: taking detour [bypass] for [tcp:203.208.40.98:443]
20774 24689 I v2ray-core: proxy/freedom: opening connection to tcp:203.208.40.98:443
20774 24689 I v2ray-core: proxy/freedom: opening connection to tcp:203.208.40.98:443
20774 24689 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:203.208.40.98:443
20774 24689 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:203.208.40.98:443
20774 24689 I v2ray-core: app/dispatcher: taking detour [dns-out] for [udp:172.19.0.2:53]
20774 24689 I v2ray-core: proxy/dns: handling DNS traffic to tcp:1.1.1.1:53
20774 24689 D v2ray-core: app/dns: domain services.googleapis.cn matches following rules: [[full:xxx.xxxx.com geosite:cn](DNS idx:1)]
20774 24689 D v2ray-core: app/dns: domain services.googleapis.cn will use DNS in order: [DOHL////223.5.5.5/dns-query]
20774 20868 D v2ray-core: app/dns: DOHL////223.5.5.5/dns-query got answer: services.googleapis.cn -> TypeA [180.163.151.162]
20774 20867 D v2ray-core: app/dispatcher: dispatch conn to tcp:180.163.151.162:443
20774 20867 I v2ray-core: app/dispatcher: taking detour [bypass] for [tcp:180.163.151.162:443]
20774 20867 I v2ray-core: proxy/freedom: opening connection to tcp:180.163.151.162:443
20774 20867 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:180.163.151.162:443
20774 24689 I v2ray-core: app/dispatcher: taking detour [dns-out] for [udp:172.19.0.2:53]
20774 24689 I v2ray-core: proxy/dns: handling DNS traffic to tcp:1.1.1.1:53
20774 20811 D v2ray-core: app/dns: domain rr4---sn-ni57rn7d.xn--ngstr-lra8j.com will use DNS in order: [DOH//https://1.1.1.1/dns-query]
20774 20868 D v2ray-core: app/dns: DOH//https://1.1.1.1/dns-query got answer: rr4---sn-ni57rn7d.xn--ngstr-lra8j.com -> TypeA [180.163.150.5]
20774 20811 D v2ray-core: app/dispatcher: dispatch conn to tcp:180.163.150.5:443
20774 20811 I v2ray-core: app/dispatcher: taking detour [bypass] for [tcp:180.163.150.5:443]
20774 20811 I v2ray-core: proxy/freedom: opening connection to tcp:180.163.150.5:443
20774 20811 I v2ray-core: transport/internet/tcp: dialing TCP to tcp:180.163.150.5:443
20774 24689 I v2ray-core: app/proxyman/outbound: failed to process outbound traffic > readfrom tcp4 172.19.0.1:36315->180.163.150.5:41716: splice: broken pipe
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: handleAppVisibility mAppVisible = false visible = true
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: stopped(false) old = true
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: WindowStopped on io.nekohasekai.sagernet/io.nekohasekai.sagernet.ui.MainActivity set to false
20825 20825 I MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@6f2094e[MainActivity]
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: stopped(false) old = false
20825 20825 I DecorView: notifyKeepScreenOnChanged: keepScreenOn=false
20825 20825 I MSHandlerLifeCycle: removeMultiSplitHandler: no exist. decor=DecorView@6f2094e[MainActivity]
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: performTraversals params={(0,0)(fillxfill) sim={adjust=resize forwardNavigation} ty=BASE_APPLICATION wanim=0x1030309
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fl=81810100
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   pfl=12020040
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   vsysui=500
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   bhv=DEFAULT
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fitSides= naviIconColor=0}
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: performTraversals mFirst=false windowShouldResize=false viewVisibilityChanged=true mForceNextWindowRelayout=false params={(0,0)(fillxfill) sim={adjust=resize forwardNavigation} ty=BASE_APPLICATION wanim=0x1030309
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fl=81810100
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   pfl=12020040
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   vsysui=500
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   bhv=DEFAULT
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]:   fitSides= naviIconColor=0}
20825 20825 D BLASTBufferQueue: new BLASTBufferQueue, mNativeObject= 0x6f15652b90 name= ViewRootImpl@a59ee2b[MainActivity] sc.mNativeObject= 0x6ea56fc080 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:2789 android.view.ViewRootImpl.relayoutWindow:9635 android.view.ViewRootImpl.performTraversals:3759 android.view.ViewRootImpl.doTraversal:2991 android.view.ViewRootImpl$TraversalRunnable.run:10665 android.view.Choreographer$CallbackRecord.run:1301 android.view.Choreographer$CallbackRecord.run:1309 android.view.Choreographer.doCallbacks:923 android.view.Choreographer.doFrame:852 android.view.Choreographer$FrameDisplayEventReceiver.run:1283 
20825 20825 D BLASTBufferQueue: update, w= 1080 h= 2400 mNativeObject= 0x6f15652b90 sc.mNativeObject= 0x6ea56fc080 format= -1 caller= android.graphics.BLASTBufferQueue.<init>:76 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:2789 android.view.ViewRootImpl.relayoutWindow:9635 android.view.ViewRootImpl.performTraversals:3759 android.view.ViewRootImpl.doTraversal:2991 android.view.ViewRootImpl$TraversalRunnable.run:10665 
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=8 res=0x3 s={true 0x6fa564a090} ch=true seqId=0
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: mThreadedRenderer.initialize() mSurface={isValid=true 0x6fa564a090} hwInitialized=true
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: reportNextDraw android.view.ViewRootImpl.performTraversals:4313 android.view.ViewRootImpl.doTraversal:2991 android.view.ViewRootImpl$TraversalRunnable.run:10665 android.view.Choreographer$CallbackRecord.run:1301 android.view.Choreographer$CallbackRecord.run:1309 
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: Setup new sync id=9
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: Setting syncFrameCallback
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: registerCallbacksForSync syncBuffer=false
20825 20872 D OpenGLRenderer: eglCreateWindowSurface
20825 20889 D ViewRootImpl@a59ee2b[MainActivity]: Received frameDrawingCallback syncResult=0 frameNum=1.
20825 20889 D ViewRootImpl@a59ee2b[MainActivity]: Setting up sync and frameCommitCallback
20825 20872 D BLASTBufferQueue: [ViewRootImpl@a59ee2b[MainActivity]#9](f:0,a:0) onFrameAvailable the first frame is available
20825 20872 D ViewRootImpl@a59ee2b[MainActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: onSyncComplete
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: setupSync seqId=0 mSyncId=9 fn=1 caller=android.view.ViewRootImpl$$ExternalSyntheticLambda11.accept:6 android.window.SurfaceSyncer.lambda$setupSync$1$android-window-SurfaceSyncer:128 android.window.SurfaceSyncer$$ExternalSyntheticLambda1.accept:8 android.window.SurfaceSyncer$SyncSet.checkIfSyncIsComplete:382 android.window.SurfaceSyncer$SyncSet.markSyncReady:359 android.window.SurfaceSyncer.markSyncReady:151 android.view.ViewRootImpl.performTraversals:4373 
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: reportDrawFinished seqId=0 mSyncId=-1 fn=1 mSurfaceChangedTransaction=0x6ed565a8b0
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 0
20825 20825 D ViewRootImpl@a59ee2b[MainActivity]: mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0x6fa564a090}
20825 20825 D InputMethodManager: startInputInner - Id : 0
20825 20825 I InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 0
20825 20825 I GestureDetector: obtain mCurrentDownEvent. id: 95806087 caller: com.termux.view.GestureAndScaleRecognizer.onTouchEvent:1 com.termux.view.TerminalView.onTouchEvent:24 android.view.View.dispatchTouchEvent:15533 
20825 20825 I GestureDetector: obtain mCurrentMotionEventRaw. action: 2 id: 536241915
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 1
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 0
20825 20825 I GestureDetector: obtain mCurrentDownEvent. id: 118119035 caller: com.termux.view.GestureAndScaleRecognizer.onTouchEvent:1 com.termux.view.TerminalView.onTouchEvent:24 android.view.View.dispatchTouchEvent:15533 
20825 20825 I GestureDetector: obtain mCurrentMotionEventRaw. action: 2 id: 365732534
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 1
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 0
20825 20825 I GestureDetector: obtain mCurrentDownEvent. id: 938633840 caller: com.termux.view.GestureAndScaleRecognizer.onTouchEvent:1 com.termux.view.TerminalView.onTouchEvent:24 android.view.View.dispatchTouchEvent:15533 
20825 20825 I GestureDetector: obtain mCurrentMotionEventRaw. action: 2 id: 396738529
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 1
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 0
20825 20825 I ViewRootImpl@a59ee2b[MainActivity]: ViewPostIme pointer 1

预期行为

规则能够正常分流,Google Play能够正常使用。

屏幕截图

如果适用, 请添加屏幕截图以帮助解释您的问题.

设备信息

  • 内核版本: v5.0.17
  • 设备型号: 三星S21
  • 操作系统:OneUI5.0 Android 13

附加上下文

在此处添加有关该问题的任何其他上下文.