mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
Add VLite Client Support for Packet Armor
This commit is contained in:
parent
dae391fa41
commit
322c8cc663
@ -20,4 +20,5 @@ message UDPProtocolConfig {
|
||||
bool enable_fec = 5;
|
||||
bool enable_stabilization = 6;
|
||||
bool enable_renegotiation = 7;
|
||||
uint32 handshake_masking_padding_size = 8;
|
||||
}
|
@ -130,6 +130,11 @@ func createStatusFromConfig(config *UDPProtocolConfig) (*status, error) {
|
||||
|
||||
ctx = context.WithValue(ctx, interfaces.ExtraOptionsUDPMask, string(s.password))
|
||||
|
||||
if config.HandshakeMaskingPaddingSize != 0 {
|
||||
ctxv := &interfaces.ExtraOptionsUsePacketArmorValue{PacketArmorPaddingTo: int(config.HandshakeMaskingPaddingSize), UsePacketArmor: true}
|
||||
ctx = context.WithValue(ctx, interfaces.ExtraOptionsUsePacketArmor, ctxv)
|
||||
}
|
||||
|
||||
destinationString := fmt.Sprintf("%v:%v", config.Address.AsAddress().String(), config.Port)
|
||||
|
||||
s.udpdialer = udpClient.NewUdpClient(destinationString, ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user