Forwarded from Surge TestFlight Feed
根据用户报告和反复测试,仅配置 2000::/3 路由对该特定 app 的 IPv6 请求问题的没有作用,下个版本将回滚代码取消该参数。
请尽量不要使用 ipv6-vif=always
请尽量不要使用 ipv6-vif=always
#Mac #Beta
Version 5.8.3-2970
- The shadowsocks protocol adds support for the 2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2970
- The shadowsocks protocol adds support for the 2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Forwarded from Surge TestFlight Feed
新的订阅功能 Pre-matching
(Mac 版本不需要订阅)
用于描述使用
[Rule]
DOMAIN,ad.com,REJECT,pre-matching
被标记了
该功能的意义是,由于 Surge 的规则系统可判断的内容非常多,所以规则判定需要在收到首个 TCP 数据包后才可以进行,对于应对风暴请求或者去广告需求,产生了过多不必要的开销。
所有被标记了
同时,对于每条规则,每 30 分钟仅会在最近请求列表中出现一次,避免因为大量请求刷屏。
可以使用
- DOMAIN 类型:DOMAIN,DOMAIN-SUFFIX,DOMAIN-KEYWORD,DOMAIN-SET,DOMAIN-WILDCARD。与 DOMAIN 类型联用时,不可以同时配置 extended-matching。
- IP 类型:IP-CIDR,IP-CIDR6,GEOIP,IP-ASN。与 IP 类型联用时,必须同时配置 no-resolve。
- 逻辑规则:AND,OR,NOT
- 其他:SUBNET,DEST-PORT,IN-PORT,SRC-PORT,SRC-IP
RULSET 也可以使用,但是其内容同样受到上述限制。
举例来说,对于最近米家 App 的疯狂请求,就可以靠配置
[Rule]
DEST-PORT,5222,pre-matching
在低开销的情况下进行屏蔽。
--------------
以上内容为设计草案,有待修改。
(Mac 版本不需要订阅)
用于描述使用
REJECT 策略的规则,如 [Rule]
DOMAIN,ad.com,REJECT,pre-matching
被标记了
pre-matching 的规则,将在正常的规则匹配流程前就提前生效,因此该规则相当于拥有最高优先级。该功能的意义是,由于 Surge 的规则系统可判断的内容非常多,所以规则判定需要在收到首个 TCP 数据包后才可以进行,对于应对风暴请求或者去广告需求,产生了过多不必要的开销。
所有被标记了
pre-matching 的规则将会被提取出来进行优先匹配,在 DNS 解析与 TCP SYN 阶段就执行判断。若 DNS 域名命中,则直接返回 NXDOMAIN,若 TCP SYN 阶段命中,将直接产生 ICMP REFUSED 响应,大量请求时升级至丢包,UDP 同样处理。同时,对于每条规则,每 30 分钟仅会在最近请求列表中出现一次,避免因为大量请求刷屏。
可以使用
pre-matching 标记的规则类型有:- DOMAIN 类型:DOMAIN,DOMAIN-SUFFIX,DOMAIN-KEYWORD,DOMAIN-SET,DOMAIN-WILDCARD。与 DOMAIN 类型联用时,不可以同时配置 extended-matching。
- IP 类型:IP-CIDR,IP-CIDR6,GEOIP,IP-ASN。与 IP 类型联用时,必须同时配置 no-resolve。
- 逻辑规则:AND,OR,NOT
- 其他:SUBNET,DEST-PORT,IN-PORT,SRC-PORT,SRC-IP
RULSET 也可以使用,但是其内容同样受到上述限制。
举例来说,对于最近米家 App 的疯狂请求,就可以靠配置
[Rule]
DEST-PORT,5222,pre-matching
在低开销的情况下进行屏蔽。
--------------
以上内容为设计草案,有待修改。
Forwarded from Surge TestFlight Feed
相比最初版本进行了修订,不再限制 DOMAIN 类型不带有 extended-matching 标记, 不再限制 IP 类型一定需要 no-resolve 标记。
Surge Mac Beta Build 2971 已经可以开始测试该机制。
Surge Mac Beta Build 2971 已经可以开始测试该机制。
#Mac #Beta
Version 5.8.3-2971
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2971
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
#Mac #Beta
Version 5.8.3-2972
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2972
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
#iOS #TestFlight #订阅功能
Surge 5 5.100.0 (3345) is ready to test on iOS.
What to Test:
新的订阅功能 Pre-matching
用于描述使用 REJECT 策略的规则,如
[Rule]
DOMAIN,ad.com,REJECT,pre-matching
被标记了 pre-matching 的规则,将在正常的规则匹配流程前就提前生效,因此该规则相当于拥有最高优先级。
该功能的意义是,由于 Surge 的规则系统可判断的内容非常多,所以规则判定需要在收到首个 TCP 数据包后才可以进行,对于应对风暴请求或者去广告需求,产生了过多不必要的开销。
所有被标记了 pre-matching 的规则将会被提取出来进行优先匹配,在 DNS 解析与 TCP SYN 阶段就执行判断。若 DNS 域名命中,则直接返回 NXDOMAIN,若 TCP SYN 阶段命中,将直接产生 ICMP REFUSED 响应,大量请求时升级至丢包,UDP 同样处理。
同时,对于每条规则,每 30 分钟仅会在最近请求列表中出现一次,避免因为大量请求刷屏。
可以使用 pre-matching 标记的规则类型有:
- DOMAIN 类型:DOMAIN,DOMAIN-SUFFIX,DOMAIN-KEYWORD,DOMAIN-SET,DOMAIN-WILDCARD。
- IP 类型:IP-CIDR,IP-CIDR6,GEOIP,IP-ASN。
- 逻辑规则:AND,OR,NOT
- 其他:SUBNET,DEST-PORT,SRC-PORT,SRC-IP
RULSET 也可以使用,但是其内容同样受到上述限制。
举例来说,对于最近米家 App 的疯狂请求,就可以靠配置
[Rule]
DEST-PORT,5222,REJECT,pre-matching
在低开销的情况下进行屏蔽。
注:未续订的情况下,该标记不会影响 Surge 开启,只是会无法生效,避免造成困扰。
Official Channel: @SurgeTestFlightFeed
Surge 5 5.100.0 (3345) is ready to test on iOS.
What to Test:
新的订阅功能 Pre-matching
用于描述使用 REJECT 策略的规则,如
[Rule]
DOMAIN,ad.com,REJECT,pre-matching
被标记了 pre-matching 的规则,将在正常的规则匹配流程前就提前生效,因此该规则相当于拥有最高优先级。
该功能的意义是,由于 Surge 的规则系统可判断的内容非常多,所以规则判定需要在收到首个 TCP 数据包后才可以进行,对于应对风暴请求或者去广告需求,产生了过多不必要的开销。
所有被标记了 pre-matching 的规则将会被提取出来进行优先匹配,在 DNS 解析与 TCP SYN 阶段就执行判断。若 DNS 域名命中,则直接返回 NXDOMAIN,若 TCP SYN 阶段命中,将直接产生 ICMP REFUSED 响应,大量请求时升级至丢包,UDP 同样处理。
同时,对于每条规则,每 30 分钟仅会在最近请求列表中出现一次,避免因为大量请求刷屏。
可以使用 pre-matching 标记的规则类型有:
- DOMAIN 类型:DOMAIN,DOMAIN-SUFFIX,DOMAIN-KEYWORD,DOMAIN-SET,DOMAIN-WILDCARD。
- IP 类型:IP-CIDR,IP-CIDR6,GEOIP,IP-ASN。
- 逻辑规则:AND,OR,NOT
- 其他:SUBNET,DEST-PORT,SRC-PORT,SRC-IP
RULSET 也可以使用,但是其内容同样受到上述限制。
举例来说,对于最近米家 App 的疯狂请求,就可以靠配置
[Rule]
DEST-PORT,5222,REJECT,pre-matching
在低开销的情况下进行屏蔽。
注:未续订的情况下,该标记不会影响 Surge 开启,只是会无法生效,避免造成困扰。
Official Channel: @SurgeTestFlightFeed
Forwarded from Surge TestFlight Feed
关于 Pre-Matching 功能的一些补充说明:
Pre-Matching 规则的 REJECT 策略依然有意义,对于 REJECT/REJECT-NO-DROP 策略,TCP 请求会在 SYN 时立刻收到 TCP RST(客户端表现为 Connection refused),DNS 请求会收到 NXDOMAIN 响应。
而对于 REJECT-DROP 策略,TCP 的 SYN 包与 DNS 查询包将被直接丢弃,不做任何响应。
REJECT 同样会在一定频次后(30 秒内 50 次触发),自动升级为 REJECT-DROP。
除有明确的特殊需求外,建议使用默认的 REJECT,没必要主动使用 REJECT-DROP。
Pre-Matching 规则的 REJECT 策略依然有意义,对于 REJECT/REJECT-NO-DROP 策略,TCP 请求会在 SYN 时立刻收到 TCP RST(客户端表现为 Connection refused),DNS 请求会收到 NXDOMAIN 响应。
而对于 REJECT-DROP 策略,TCP 的 SYN 包与 DNS 查询包将被直接丢弃,不做任何响应。
REJECT 同样会在一定频次后(30 秒内 50 次触发),自动升级为 REJECT-DROP。
除有明确的特殊需求外,建议使用默认的 REJECT,没必要主动使用 REJECT-DROP。
Forwarded from Surge TestFlight Feed
更新中加入了对代理模式接管的请求的 pre-matching 处理,REJECT 行为是进行 TCP RST,DROP 行为是将 socket 挂起。
#Mac #Beta
Version 5.8.3-2973
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2973
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
#Mac #Beta
Version 5.8.3-2974
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2974
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Forwarded from Surge TestFlight Feed
REJECT-NO-DROP 改进
接到部分用户回报,在用于去广告等用途时,如果 DNS 返回 NXDOMAIN 可能导致应用等待,而返回 127.0.0.1 会使得应用立刻认为请求失败。
出现该区别的原因,是因为应用开发者对于不同错误的处理逻辑不同。然而在 DNS 中返回 127.0.0.1 进行屏蔽,是一项非常不标准的行为,本质是将请求导向了回环网络 lo0,由本地系统产生一个 TCP refused 响应拒绝请求。
1. 如果本地系统上正好监听了访问的端口,会导致对应监听服务收到该请求,产生非预期结果。
2. 如果被屏蔽的应用重试逻辑非常暴力,由于 connect 127.0.0.1 会被系统极快的拒绝,可能导致 CPU 占用 100%。(即手机发热)
为此 Surge 提供了一个全新的解决方案,对于使用 REJECT-NO-DROP 的请求,Surge DNS 将固定返回特殊 IP 地址 198.18.0.244。对于该地址的所有 TCP 请求,将由 Surge VIF 产生 TCP refused,同时当发现往该地址的 TCP SYN 极高时,进行丢包处理以避免引发高 CPU 占用。
这种处理方式既保留了返回 127.0.0.1 的优点,同时消灭了可能导致的副作用。如果在使用 REJECT 时,出现了 app 等待过长的问题,可尝试使用 REJECT-NO-DROP。
接到部分用户回报,在用于去广告等用途时,如果 DNS 返回 NXDOMAIN 可能导致应用等待,而返回 127.0.0.1 会使得应用立刻认为请求失败。
出现该区别的原因,是因为应用开发者对于不同错误的处理逻辑不同。然而在 DNS 中返回 127.0.0.1 进行屏蔽,是一项非常不标准的行为,本质是将请求导向了回环网络 lo0,由本地系统产生一个 TCP refused 响应拒绝请求。
1. 如果本地系统上正好监听了访问的端口,会导致对应监听服务收到该请求,产生非预期结果。
2. 如果被屏蔽的应用重试逻辑非常暴力,由于 connect 127.0.0.1 会被系统极快的拒绝,可能导致 CPU 占用 100%。(即手机发热)
为此 Surge 提供了一个全新的解决方案,对于使用 REJECT-NO-DROP 的请求,Surge DNS 将固定返回特殊 IP 地址 198.18.0.244。对于该地址的所有 TCP 请求,将由 Surge VIF 产生 TCP refused,同时当发现往该地址的 TCP SYN 极高时,进行丢包处理以避免引发高 CPU 占用。
这种处理方式既保留了返回 127.0.0.1 的优点,同时消灭了可能导致的副作用。如果在使用 REJECT 时,出现了 app 等待过长的问题,可尝试使用 REJECT-NO-DROP。
❤1
#Mac #Beta
Version 5.8.3-2975
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2975
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
#iOS #TestFlight
Surge 5 5.100.0 (3347) is ready to test on iOS.
What to Test:
REJECT 规则相关优化,详见频道说明
Official Channel: @SurgeTestFlightFeed
Surge 5 5.100.0 (3347) is ready to test on iOS.
What to Test:
REJECT 规则相关优化,详见频道说明
Official Channel: @SurgeTestFlightFeed
❤1
#Mac #Beta
Version 5.8.3-2977
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2977
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Forwarded from Surge TestFlight Feed
Surge Mac & iOS Beta 更新日志
- 增加 pre-matching 标记规则的校验,在不支持的规则上配置该标记将直接产生配置错误。(请注意 PROTOCOL 语句不可用,逻辑规则的子规则也会被校验,但是 RULE-SET 的子规则若不支持仅会不生效而不会报错)
- 对 TCP RST 拒绝方式增加了全局防御,当 3 秒内触发 100 次后,将临时暂停以避免应用死循环导致 CPU 异常,同时输出日志
- pre-matching 的请求日志,由每 30 分钟一条,下调至 5 分钟
- [iOS] 为 iOS 18.1 下,Poor Network Quality 无法被从通知中心自动消除的问题加入了一个 workaround
- 增加 pre-matching 标记规则的校验,在不支持的规则上配置该标记将直接产生配置错误。(请注意 PROTOCOL 语句不可用,逻辑规则的子规则也会被校验,但是 RULE-SET 的子规则若不支持仅会不生效而不会报错)
- 对 TCP RST 拒绝方式增加了全局防御,当 3 秒内触发 100 次后,将临时暂停以避免应用死循环导致 CPU 异常,同时输出日志
- pre-matching 的请求日志,由每 30 分钟一条,下调至 5 分钟
- [iOS] 为 iOS 18.1 下,Poor Network Quality 无法被从通知中心自动消除的问题加入了一个 workaround
❤1⚡1
#iOS #TestFlight
Surge 5 5.100.0 (3348) is ready to test on iOS.
What to Test:
- 增加 pre-matching 标记规则的校验,在不支持的规则上配置该标记将直接产生配置错误。(请注意 PROTOCOL 语句不可用,逻辑规则的子规则也会被校验,但是 RULE-SET 的子规则若不支持仅会不生效而不会报错)
- 对 TCP RST 拒绝方式增加了全局防御,当 3 秒内触发 100 次后,将临时暂停以避免应用死循环导致 CPU 异常,同时输出日志
- pre-matching 的请求日志,由每 30 分钟一条,下调至 5 分钟
- 为 iOS 18.1 下,Poor Network Quality 无法被从通知中心自动消除的问题加入了一个 workaround
Official Channel: @SurgeTestFlightFeed
Surge 5 5.100.0 (3348) is ready to test on iOS.
What to Test:
- 增加 pre-matching 标记规则的校验,在不支持的规则上配置该标记将直接产生配置错误。(请注意 PROTOCOL 语句不可用,逻辑规则的子规则也会被校验,但是 RULE-SET 的子规则若不支持仅会不生效而不会报错)
- 对 TCP RST 拒绝方式增加了全局防御,当 3 秒内触发 100 次后,将临时暂停以避免应用死循环导致 CPU 异常,同时输出日志
- pre-matching 的请求日志,由每 30 分钟一条,下调至 5 分钟
- 为 iOS 18.1 下,Poor Network Quality 无法被从通知中心自动消除的问题加入了一个 workaround
Official Channel: @SurgeTestFlightFeed
#Mac #Beta
Version 5.8.3-2978
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2978
- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Forwarded from Surge TestFlight Feed
关于 Pre-matching REJECT 的说明已加入到手册中:https://manual.nssurge.com/policy/reject.html
Nssurge
REJECT Policy · GitBook
#Mac #Beta
Version 5.8.3-2979
- Added
- The URL-REGEX rule now supports
- The shadowsocks protocol adds support for the
- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed
Version 5.8.3-2979
- Added
pre-matching feature for low-overhead request rejection. Please refer to the documentation for details. https://manual.nssurge.com/policy/reject.html- The URL-REGEX rule now supports
extended-matching tags.- The shadowsocks protocol adds support for the
2022-blake3-aes-256-gcm and 2022-blake3-aes-128-gcm encryption modes- Allow the use of Ponte policy as an underlying proxy.
- Fix the issue where DNS requests cannot select the correct interface according to the routing table in enhanced mode.
Official Channel: @SurgeTestFlightFeed