feat(xray): accept the TUN WFP leak ports of xray-core 26.10.31

xray-core 26.10.31 (#7288) widened a TUN inbound's
autoSystemWfpBlockLeak: "dns" now also blocks DNS over TLS/QUIC (port
853), "windnsclient" covers only Windows' DNS Client service, and any
"tcp/<port>" or "udp/<port>" keeps that port inside the TUN. Anything
else, such as "tcp/0" or "icmp/1", stops the core at startup.

The form offers windnsclient and takes typed port values, the hint
explains them in all 14 locales, and the inbound and template save
paths run the core's own ExpandWfpBlockLeak so a value it refuses is
refused at save instead of taking every inbound down.
This commit is contained in:
MHSanaei
2026-11-01 14:56:13 +01:00
parent ba27b74be8
commit 87749c1ee4
21 changed files with 83 additions and 17 deletions
+8
View File
@@ -38,6 +38,7 @@ import (
"github.com/xtls/xray-core/proxy/shadowsocks"
"github.com/xtls/xray-core/proxy/shadowsocks_2022"
"github.com/xtls/xray-core/proxy/trojan"
"github.com/xtls/xray-core/proxy/tun"
"github.com/xtls/xray-core/proxy/vless"
vlessEncryption "github.com/xtls/xray-core/proxy/vless/encryption"
vlessOutbound "github.com/xtls/xray-core/proxy/vless/outbound"
@@ -229,6 +230,13 @@ func ValidateOutboundConfig(outbound []byte) (err error) {
return validateHandlerSettings(built.ProxySettings)
}
// ValidateTunWfpBlockLeak runs the core's own check of a TUN inbound's autoSystemWfpBlockLeak,
// which xray-core 26.10.31 (#7288) widened to "windnsclient" and "tcp/<port>" / "udp/<port>".
func ValidateTunWfpBlockLeak(values []string) error {
_, err := tun.ExpandWfpBlockLeak(values)
return err
}
// validateXhttpDownloadSettings refuses what conf.Build() lets through but the core's XHTTP
// dialer panics on at every dial: a downloadSettings block without an address or not on xhttp.
func validateXhttpDownloadSettings(settings *serial.TypedMessage) error {