mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-12 15:46:06 +00:00
fix(sockopt): rename interfaceName to interface so xray honors it
xray-core reads the bind-interface sockopt as json:"interface", but the schema and forms used interfaceName. Go's JSON unmarshal is case-insensitive, yet interfacename != interface, so the value never reached xray and interface binding silently did nothing. Rename the field across the schema, the inbound/outbound forms, and the golden fixture to match xray-core and the official docs.
This commit is contained in:
@@ -8,7 +8,7 @@ exports[`SockoptStreamSettingsSchema fixtures > parses defaults byte-stably 1`]
|
||||
"customSockopt": [],
|
||||
"dialerProxy": "",
|
||||
"domainStrategy": "AsIs",
|
||||
"interfaceName": "",
|
||||
"interface": "",
|
||||
"mark": 0,
|
||||
"penetrate": false,
|
||||
"tcpFastOpen": false,
|
||||
@@ -32,7 +32,7 @@ exports[`SockoptStreamSettingsSchema fixtures > parses full byte-stably 1`] = `
|
||||
"customSockopt": [],
|
||||
"dialerProxy": "out-proxy-tag",
|
||||
"domainStrategy": "UseIP",
|
||||
"interfaceName": "eth0",
|
||||
"interface": "eth0",
|
||||
"mark": 100,
|
||||
"penetrate": false,
|
||||
"tcpFastOpen": true,
|
||||
@@ -59,7 +59,7 @@ exports[`SockoptStreamSettingsSchema fixtures > parses tcp-tuning byte-stably 1`
|
||||
"customSockopt": [],
|
||||
"dialerProxy": "",
|
||||
"domainStrategy": "AsIs",
|
||||
"interfaceName": "",
|
||||
"interface": "",
|
||||
"mark": 0,
|
||||
"penetrate": false,
|
||||
"tcpFastOpen": true,
|
||||
@@ -83,7 +83,7 @@ exports[`SockoptStreamSettingsSchema fixtures > parses tproxy byte-stably 1`] =
|
||||
"customSockopt": [],
|
||||
"dialerProxy": "",
|
||||
"domainStrategy": "ForceIPv4",
|
||||
"interfaceName": "",
|
||||
"interface": "",
|
||||
"mark": 255,
|
||||
"penetrate": true,
|
||||
"tcpFastOpen": false,
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
"tcpcongestion": "cubic",
|
||||
"V6Only": false,
|
||||
"tcpWindowClamp": 600,
|
||||
"interfaceName": "eth0",
|
||||
"interface": "eth0",
|
||||
"trustedXForwardedFor": ["10.0.0.0/8", "192.168.0.0/16"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user