SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
19.97k stars 2.37k forks source link

将"process_name"类型headless-rule编译进.srs文件启动后不生效 #1181

Closed crazyhandofnoth closed 11 months ago

crazyhandofnoth commented 11 months ago

Operating system

Windows

System version

windows11 23H2

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

No response

Version

```console sing-box version 1.8.0-alpha.10 Environment: go1.21.4 windows/amd64 Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api Revision: 26adcd0f4663b067f4ecee58a8e9a0582324006c CGO: disabled ```

Description

将"process_name"类型headless-rule编译进.srs文件启动内核后不生效

终端日志不显示路径

yacd不显示process name

image

Reproduction

rules

 {
        "rule_set": ["direct"],
        "outbound": "direct"
      },

rule-set ["direct"] source-format

{
  "version": 1,
  "rules": [

    {
      "process_name": [
        "Thunder.exe",
        "DownloadSDKServer.exe",
        "BitComet.exe",
        "aria2c.exe",
        "baidunetdisk.exe",
        "WeChat.exe"
      ]
    }
  ]
}

Logs

```console +0800 2023-12-03 19:26:22 DEBUG [2244827453 0ms] router: sniffed protocol: http, domain: tracker.darmowy-torrent.pl +0800 2023-12-03 19:26:22 INFO [2244827453 0ms] outbound/vless[proxy]: outbound connection to tracker.darmowy-torrent.pl:80 +0800 2023-12-03 19:26:22 INFO [2219958082 487ms] outbound/vless[proxy]: outbound connection to tracker.bt4g.com:2095 +0800 2023-12-03 19:26:22 TRACE [2604327772 300ms] router: sniffed no protocol: unexpected EOF | tls: first record does not look like a TLS handshake | invalid method "\x04\x00\x00\x00\x80\x02\x00\x00\x03\x00\x00\x00\xbe3" +0800 2023-12-03 19:26:22 DEBUG [2604327772 300ms] router: found reserve mapped domain: 4th.rcv.sandai.net +0800 2023-12-03 19:26:22 DEBUG [2604327772 300ms] router: match[5] rule_set=[geosite-tracker geosite-apple geosite-cn geoip-cn] => direct +0800 2023-12-03 19:26:22 INFO [2604327772 300ms] outbound/direct[direct]: outbound connection to 180.163.203.56:80 +0800 2023-12-03 19:26:22 INFO [4147054165 0ms] inbound/tun[0]: inbound connection from 172.19.0.1:4133 +0800 2023-12-03 19:26:22 INFO [4147054165 0ms] inbound/tun[0]: inbound connection to 183.135.154.113:5642 +0800 2023-12-03 19:26:22 DEBUG [2835641384 846ms] inbound/tun[0]: connection closed: download: ws closed: 1005 | upload: read tcp4 172.19.0.1:2957->172.19.0.2:10691: use of closed network connection +0800 2023-12-03 19:26:22 INFO [559606438 0ms] inbound/tun[0]: inbound connection from 172.19.0.1:4134 +0800 2023-12-03 19:26:22 INFO [559606438 0ms] inbound/tun[0]: inbound connection to 198.18.0.204:6969 +0800 2023-12-03 19:26:22 DEBUG [559606438 0ms] router: found fakeip domain: www.freerainbowtables.com +0800 2023-12-03 19:26:22 DEBUG [559606438 0ms] router: sniffed protocol: http, domain: www.freerainbowtables.com +0800 2023-12-03 19:26:22 INFO [559606438 0ms] outbound/vless[proxy]: outbound connection to www.freerainbowtables.com:6969 +0800 2023-12-03 19:26:22 INFO [3765347955 502ms] outbound/vless[proxy]: outbound connection to tracker.tasvideos.org:6969 +0800 2023-12-03 19:26:22 ERROR [2604327772 393ms] inbound/tun[0]: download: read tcp 192.168.6.159:4131->180.163.203.56:80: wsarecv: An existing connection was forcibly closed by the remote host. +0800 2023-12-03 19:26:22 INFO [2325332318 0ms] inbound/tun[0]: inbound connection from 172.19.0.1:4137 +0800 2023-12-03 19:26:22 INFO [2325332318 0ms] inbound/tun[0]: inbound connection to 104.19.22.22:8080 +0800 2023-12-03 19:26:22 DEBUG [2325332318 0ms] router: sniffed protocol: http, domain: tracker1.itzmx.com +0800 2023-12-03 19:26:22 DEBUG [2325332318 0ms] router: match[5] rule_set=[geosite-tracker geosite-apple geosite-cn geoip-cn] => direct +0800 2023-12-03 19:26:22 INFO [2325332318 0ms] outbound/direct[direct]: outbound connection to 104.19.22.22:8080 ```
crazyhandofnoth commented 11 months ago

试了一下 source json的可以使用 binary 的srs就不能用