Config: Outbound proxy config no need to be nested (#5124)

Like https://github.com/XTLS/Xray-core/commit/eda8be601f56c788b1ad176c7d68d8e2ce22c7ca
This commit is contained in:
𐲓𐳛π³ͺ𐳂𐳐 𐲀𐳒𐳦𐳫𐳒 π²₯𐳔𐳛π³ͺπ³Œπ³‘π³–π³‡
2025-09-11 21:48:20 +08:00
committed by GitHub
parent 1a48453bea
commit 83c5370eec
8 changed files with 237 additions and 21 deletions
+33
View File
@@ -57,6 +57,39 @@ func TestVLessOutbound(t *testing.T) {
},
},
},
{
Input: `{
"address": "example.com",
"port": 443,
"id": "27848739-7e62-4138-9fd3-098a63964b6b",
"flow": "xtls-rprx-vision-udp443",
"encryption": "none",
"level": 0
}`,
Parser: loadJSON(creator),
Output: &outbound.Config{
Vnext: []*protocol.ServerEndpoint{
{
Address: &net.IPOrDomain{
Address: &net.IPOrDomain_Domain{
Domain: "example.com",
},
},
Port: 443,
User: []*protocol.User{
{
Account: serial.ToTypedMessage(&vless.Account{
Id: "27848739-7e62-4138-9fd3-098a63964b6b",
Flow: "xtls-rprx-vision-udp443",
Encryption: "none",
}),
Level: 0,
},
},
},
},
},
},
})
}