1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-09 11:46:42 -05:00

Imaginary Security Lever: zero: turn off all security on payload data

This commit is contained in:
Shelikhoo 2021-03-01 15:39:52 +00:00
parent 770a2bc1a3
commit 1368e92605
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
2 changed files with 8 additions and 0 deletions

View File

@ -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
}

View File

@ -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