mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-02 19:25:05 +03:00
fix(xray): keep legacy-private unencrypted outbounds on cores before 26.10.29
xray-core 26.10.29 (#7249) narrowed the "private" addresses an unencrypted vless/trojan outbound may reach to RFC 1918, loopback and link-local, so 100.64.0.0/10 (CGNAT, Tailscale), 198.18.0.0/15 and the other ranges of the old geoip:private list are now refused. The embedded validator follows the new core, which made the template save and outbound subscriptions refuse such an outbound even when the panel still runs an older core that accepts it. The legacy skip now also lets through, on a core from 26.7.11 up to 26.10.28, an outbound whose server address (flat, vnext or servers) is an IP in that core's wider private set. Unknown versions stay strict.
This commit is contained in:
@@ -41,7 +41,7 @@ func filterOutboundsRejectedByCore(label string, outbounds []any) ([]any, []stri
|
||||
for _, ob := range outbounds {
|
||||
raw, err := json.Marshal(ob)
|
||||
if err == nil {
|
||||
if buildErr := xray.ValidateOutboundConfig(raw); buildErr != nil && !shouldSkipLegacyUnencryptedOutboundRejection(coreVersion, buildErr) {
|
||||
if buildErr := xray.ValidateOutboundConfig(raw); buildErr != nil && !shouldSkipLegacyUnencryptedOutboundRejection(coreVersion, raw, buildErr) {
|
||||
tag := ""
|
||||
if m, ok := ob.(map[string]any); ok {
|
||||
tag, _ = m["tag"].(string)
|
||||
|
||||
Reference in New Issue
Block a user