Skip to content

Commit fb4d3c4

Browse files
committed
chore: simplify VlessFlow Option
1 parent e33d4a4 commit fb4d3c4

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

adapter/outbound/vless.go

+6-9
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,14 @@ func NewVless(option VlessOption) (*Vless, error) {
505505
var addons *vless.Addons
506506
if option.Network != "ws" && len(option.Flow) >= 16 {
507507
option.Flow = option.Flow[:16]
508-
switch option.Flow {
509-
case vless.XRV:
510-
log.Warnln("To use %s, ensure your server is upgrade to Xray-core v1.8.0+", vless.XRV)
511-
addons = &vless.Addons{
512-
Flow: option.Flow,
513-
}
514-
case vless.XRO, vless.XRD, vless.XRS:
515-
log.Fatalln("Legacy XTLS protocol %s is deprecated and no longer supported", option.Flow)
516-
default:
508+
if option.Flow != vless.XRV {
517509
return nil, fmt.Errorf("unsupported xtls flow type: %s", option.Flow)
518510
}
511+
512+
log.Warnln("To use %s, ensure your server is upgrade to Xray-core v1.8.0+", vless.XRV)
513+
addons = &vless.Addons{
514+
Flow: option.Flow,
515+
}
519516
}
520517

521518
switch option.PacketEncoding {

0 commit comments

Comments
 (0)