mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Enforce specific none flow for xtls vision
In the past, when user open xtls vision on the server side, plain vless+tls can connect. Pure tls is known to have certain tls in tls characters. Now server need to specify "xtls-rprx-vision,none" for it be able usable on the same port.
This commit is contained in:
parent
1d7c40d728
commit
2e30093ffd
2 changed files with 27 additions and 4 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
@ -52,7 +53,15 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
|
|||
}
|
||||
account.Id = u.String()
|
||||
|
||||
switch account.Flow {
|
||||
accountFlow := account.Flow
|
||||
flows := strings.Split(account.Flow, ",")
|
||||
for _, f := range flows {
|
||||
t := strings.TrimSpace(f)
|
||||
if t != "none" {
|
||||
accountFlow = t
|
||||
}
|
||||
}
|
||||
switch accountFlow {
|
||||
case "", vless.XRO, vless.XRD, vless.XRV:
|
||||
case vless.XRS:
|
||||
return nil, newError(`VLESS clients: inbound doesn't support "xtls-rprx-splice" in this version, please use "xtls-rprx-direct" instead`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue