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:
parent
770a2bc1a3
commit
1368e92605
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user