Legends never die (#1725)

This commit is contained in:
yuhan6665 2023-03-04 05:39:26 -05:00 committed by GitHub
parent 4c8ee0af50
commit 9e5bc07bf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 71 additions and 1773 deletions

View file

@ -53,11 +53,7 @@ func (c *TrojanClientConfig) Build() (proto.Message, error) {
}
switch account.Flow {
case "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443":
case "xtls-rprx-splice", "xtls-rprx-splice-udp443":
if runtime.GOOS != "linux" && runtime.GOOS != "android" {
return nil, newError(`Trojan servers: "` + account.Flow + `" only support linux in this version`)
}
case "":
default:
return nil, newError(`Trojan servers: "flow" doesn't support "` + account.Flow + `" in this version`)
}
@ -119,9 +115,7 @@ func (c *TrojanServerConfig) Build() (proto.Message, error) {
}
switch account.Flow {
case "", "xtls-rprx-origin", "xtls-rprx-direct":
case "xtls-rprx-splice":
return nil, newError(`Trojan clients: inbound doesn't support "xtls-rprx-splice" in this version, please use "xtls-rprx-direct" instead`)
case "":
default:
return nil, newError(`Trojan clients: "flow" doesn't support "` + account.Flow + `" in this version`)
}