SagerNet / SagerNet/sing-box

SFA中,package_name规则在访问维基等网站时无法命中

Open
#2,160 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
38.1k
Forks
4.6k
Avg merge
19d 15h
Merged PRs (30d)
1

Description

操作系统

Android

系统版本

Android14 ColorOS14.0

安装类型

sing-box for Android 图形客户端程序

如果您使用图形客户端程序,请提供该程序版本。

1.10.0-beta.11

版本

No response

描述

在route.rule中把夸克浏览器的包名(com.quark.browser)设置了直连,但是访问维基等网站依旧走了代理

重现方式

config.json

日志
+0800 2024-10-06 04:06:36 INFO [1334704845 3ms] router: found package name: com.quark.browser
+0800 2024-10-06 04:06:36 INFO [616630920 0ms] inbound/tun[tun-in]: inbound connection to 199.16.158.12:443
+0800 2024-10-06 04:06:36 DEBUG [1334704845 4ms] router: match[0] protocol=dns => dns-out
+0800 2024-10-06 04:06:36 INFO [3361856292 0ms] inbound/tun[tun-in]: inbound connection from 172.18.0.1:45256
+0800 2024-10-06 04:06:36 INFO [3361856292 0ms] inbound/tun[tun-in]: inbound connection to 198.35.26.112:443
+0800 2024-10-06 04:06:36 DEBUG [346217848 12ms] router: sniffed protocol: tls, domain: applog.lc.quark.cn
+0800 2024-10-06 04:06:36 INFO [590957600 0ms] inbound/tun[tun-in]: inbound connection from 172.18.0.1:59392
+0800 2024-10-06 04:06:36 INFO [590957600 0ms] inbound/tun[tun-in]: inbound connection to 203.119.175.215:443
+0800 2024-10-06 04:06:36 INFO [346217848 13ms] router: failed to search process: Attempt to invoke virtual method 'byte[] java.net.InetAddress.getAddress()' on a null object reference
+0800 2024-10-06 04:06:36 DEBUG [346217848 13ms] router: match[3] rule_set=privateip => direct-out
+0800 2024-10-06 04:06:36 INFO [346217848 13ms] outbound/direct[direct-out]: outbound connection to applog.lc.quark.cn:443
+0800 2024-10-06 04:06:36 INFO [2119525423 0ms] inbound/tun[tun-in]: inbound packet connection from 172.18.0.1:59482
+0800 2024-10-06 04:06:36 INFO [2119525423 0ms] inbound/tun[tun-in]: inbound packet connection to 172.18.0.2:53
+0800 2024-10-06 04:06:36 DEBUG [2119525423 0ms] router: sniffed packet protocol: dns
+0800 2024-10-06 04:06:36 INFO [2119525423 1ms] router: found package name: com.quark.browser
+0800 2024-10-06 04:06:36 DEBUG [2119525423 1ms] router: match[0] protocol=dns => dns-out
+0800 2024-10-06 04:06:36 DEBUG [2119525423 1ms] dns: exchange zh.m.wikipedia.org. IN A
+0800 2024-10-06 04:06:36 INFO [2119525423 2ms] outbound/direct[direct-out]: outbound connection to 120.53.53.53:443
+0800 2024-10-06 04:06:36 DEBUG [1334704845 18ms] dns: exchange upload.wikimedia.org. IN A
+0800 2024-10-06 04:06:36 INFO [1334704845 18ms] outbound/direct[direct-out]: outbound connection to 120.53.53.53:443
+0800 2024-10-06 04:06:36 INFO [286929020 0ms] inbound/tun[tun-in]: inbound connection from 172.18.0.1:39392
+0800 2024-10-06 04:06:36 INFO [286929020 0ms] inbound/tun[tun-in]: inbound connection to 59.82.34.22:443
+0800 2024-10-06 04:06:36 DEBUG [286929020 7ms] router: sniffed protocol: tls, domain: hp-cms.quark.cn
+0800 2024-10-06 04:06:36 INFO [286929020 8ms] router: failed to search process: Attempt to invoke virtual method 'byte[] java.net.InetAddress.getAddress()' on a null object reference
+0800 2024-10-06 04:06:36 DEBUG [286929020 8ms] router: match[6] rule_set=[cnip cnsite] => direct-out
+0800 2024-10-06 04:06:36 INFO [286929020 8ms] outbound/direct[direct-out]: outbound connection to hp-cms.quark.cn:443
+0800 2024-10-06 04:06:36 DEBUG [2119525423 126ms] dns: exchanged zh.m.wikipedia.org NOERROR 232
+0800 2024-10-06 04:06:36 INFO [2119525423 126ms] dns: exchanged zh.m.wikipedia.org A zh.m.wikipedia.org. 232 IN A 157.240.17.35
+0800 2024-10-06 04:06:36 INFO [2119525423 126ms] dns: exchanged zh.m.wikipedia.org OPT OPT PSEUDOSECTION: EDNS: version 0 flags: MBZ: 0x00e8, udp: 0 SUBNET: 1.0.1.0/32/24 PADDING: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+0800 2024-10-06 04:06:36 INFO [2453899300 144ms] router: failed to search process: android: connection owner not found
+0800 2024-10-06 04:06:36 INFO [2453899300 144ms] outbound/vless[az-sg-direct-三网直连]: outbound connection to 199.16.158.12:443
+0800 2024-10-06 04:06:36 INFO [2420884921 0ms] inbound/tun[tun-in]: inbound connection from 172.18.0.1:42782
+0800 2024-10-06 04:06:36 INFO [2420884921 0ms] inbound/tun[tun-in]: inbound connection to 157.240.17.35:443
+0800 2024-10-06 04:06:36 INFO [616630920 156ms] router: failed to search process: android: connection owner not found
+0800 2024-10-06 04:06:36 INFO [616630920 156ms] outbound/vless[az-sg-direct-三网直连]: outbound connection to 199.16.158.12:443
+0800 2024-10-06 04:06:36 INFO [1381623212 0ms] inbound/tun[tun-in]: inbound connection from 172.18.0.1:42794
+0800 2024-10-06 04:06:36 INFO [1381623212 0ms] inbound/tun[tun-in]: inbound connection to 157.240.17.35:443
+0800 2024-10-06 04:06:36 DEBUG [2420884921 40ms] router: sniffed protocol: tls, domain: zh.m.wikipedia.org
+0800 2024-10-06 04:06:36 DEBUG [1381623212 2ms] router: sniffed protocol: tls, domain: zh.m.wikipedia.org
+0800 2024-10-06 04:06:36 INFO [1381623212 2ms] router: failed to search process: Attempt to invoke virtual method 'byte[] java.net.InetAddress.getAddress()' on a null object reference
+0800 2024-10-06 04:06:36 INFO [2420884921 41ms] router: failed to search process: Attempt to invoke virtual method 'byte[] java.net.InetAddress.getAddress()' on a null object reference
+0800 2024-10-06 04:06:36 INFO [1381623212 3ms] outbound/vless[az-sg-direct-三网直连]: outbound connection to zh.m.wikipedia.org:443
+0800 2024-10-06 04:06:36 INFO [2420884921 41ms] outbound/vless[az-sg-direct-三网直连]: outbound connection to zh.m.wikipedia.org:443
+0800 2024-10-06 04:06:36 INFO [2453899300 262ms] outbound/vless[az-sg-direct-三网直连]: outbound connection to 199.16.158.12:443
+0800 2024-10-06 04:06:36 DEBUG [2453899300 263ms] inbound/tun[tun-in]: connection closed: read payload: EOF
支持我们
完整性要求
  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached config.json and its route.rule package_name entry, then compare the Android TUN log entries for com.quark.browser with the selected outbound. Reproduce the Wikipedia request using the reported Android and sing-box versions; done means the package-name rule consistently selects the configured direct route instead of the proxy.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, go
Domain
mobile-dev, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.