mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-31 08:24:24 +03:00
Enable XUDP by default in VLESS
This commit is contained in:
@@ -58,14 +58,18 @@ func NewVLESS(ctx context.Context, router adapter.Router, logger log.ContextLogg
|
||||
return nil, E.Cause(err, "create client transport: ", options.Transport.Type)
|
||||
}
|
||||
}
|
||||
switch options.PacketEncoding {
|
||||
case "":
|
||||
case "packetaddr":
|
||||
outbound.packetAddr = true
|
||||
case "xudp":
|
||||
if options.PacketEncoding == nil {
|
||||
outbound.xudp = true
|
||||
default:
|
||||
return nil, E.New("unknown packet encoding: ", options.PacketEncoding)
|
||||
} else {
|
||||
switch *options.PacketEncoding {
|
||||
case "":
|
||||
case "packetaddr":
|
||||
outbound.packetAddr = true
|
||||
case "xudp":
|
||||
outbound.xudp = true
|
||||
default:
|
||||
return nil, E.New("unknown packet encoding: ", options.PacketEncoding)
|
||||
}
|
||||
}
|
||||
outbound.client, err = vless.NewClient(options.UUID, options.Flow, logger)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user