From 7b1203ca969c6aa911b25f41f64fe625c09bda73 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Thu, 14 Apr 2022 22:54:32 +0100 Subject: [PATCH] Add Packet Scramble Support for VLite UDP Client --- proxy/vlite/outbound/outbound.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/vlite/outbound/outbound.go b/proxy/vlite/outbound/outbound.go index fc49fa594..01561604c 100644 --- a/proxy/vlite/outbound/outbound.go +++ b/proxy/vlite/outbound/outbound.go @@ -128,6 +128,10 @@ func createStatusFromConfig(config *UDPProtocolConfig) (*status, error) { ctx = context.WithValue(ctx, interfaces.ExtraOptionsUDPFECEnabled, true) } + if config.ScramblePacket { + ctx = context.WithValue(ctx, interfaces.ExtraOptionsUDPShouldMask, true) + } + ctx = context.WithValue(ctx, interfaces.ExtraOptionsUDPMask, string(s.password)) if config.HandshakeMaskingPaddingSize != 0 {