diff --git a/infra/conf/vmess.go b/infra/conf/vmess.go index 8e6a88662..4c330d0d5 100644 --- a/infra/conf/vmess.go +++ b/infra/conf/vmess.go @@ -31,6 +31,8 @@ func (a *VMessAccount) Build() *vmess.Account { st = protocol.SecurityType_AUTO case "none": st = protocol.SecurityType_NONE + case "zero": + st = protocol.SecurityType_ZERO default: st = protocol.SecurityType_AUTO } diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 7b48df637..c41f767ce 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -110,6 +110,12 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte request.Option.Set(protocol.RequestOptionGlobalPadding) } + if request.Security == protocol.SecurityType_ZERO { + request.Security = protocol.SecurityType_NONE + request.Option.Clear(protocol.RequestOptionChunkStream) + request.Option.Clear(protocol.RequestOptionChunkMasking) + } + input := link.Reader output := link.Writer