mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-13 12:56:38 -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
|
st = protocol.SecurityType_AUTO
|
||||||
case "none":
|
case "none":
|
||||||
st = protocol.SecurityType_NONE
|
st = protocol.SecurityType_NONE
|
||||||
|
case "zero":
|
||||||
|
st = protocol.SecurityType_ZERO
|
||||||
default:
|
default:
|
||||||
st = protocol.SecurityType_AUTO
|
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)
|
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
|
input := link.Reader
|
||||||
output := link.Writer
|
output := link.Writer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user