mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 10:44:58 +03:00
OpenVPN: Add packet scrambling/obfuscation feature
This allows an OpenVPN client to bypass a firewall which is aware of the protocol and is able to block it. The XOR mask set on the server has to be the same on the client, otherwise it will not be able to connect with certain obfuscation modes. A special OpenVPN client built with the "XOR patch" is required in order to use this function, because it has never been merged in the official OpenVPN repository. Two parameters are added to the server configuration: "OpenVPNObfuscationMethod" and "OpenVPNObfuscationMask". Their value can be retrieved with "OpenVpnObfuscationGet" and set with "OpenVpnObfuscationEnable" in the VPN Command Line Management Utility.
This commit is contained in:
@ -185,6 +185,12 @@
|
||||
#define OPENVPN_MODE_L2 1 // TAP (Ethernet)
|
||||
#define OPENVPN_MODE_L3 2 // TUN (IP)
|
||||
|
||||
// Scramble mode
|
||||
#define OPENVPN_SCRAMBLE_MODE_DISABLED 0 // No scramble
|
||||
#define OPENVPN_SCRAMBLE_MODE_XORMASK 1 // XOR the bytes with the specified string
|
||||
#define OPENVPN_SCRAMBLE_MODE_XORPTRPOS 2 // XOR each byte with its position in the buffer
|
||||
#define OPENVPN_SCRAMBLE_MODE_REVERSE 3 // Reverses bytes order, keeping the first byte unchanged
|
||||
#define OPENVPN_SCRAMBLE_MODE_OBFUSCATE 4 // Performs the above steps using the specified string for xormask
|
||||
|
||||
//// Type
|
||||
|
||||
@ -271,6 +277,7 @@ struct OPENVPN_SESSION
|
||||
OPENVPN_CHANNEL *Channels[OPENVPN_NUM_CHANNELS]; // Channels (up to 8)
|
||||
UINT LastCreatedChannelIndex; // Channel number that is created in the last
|
||||
UINT Mode; // Mode (L3 or L2)
|
||||
UINT ObfuscationMode; // Packet obfuscation/scrambling mode
|
||||
UINT LinkMtu; // link-mtu
|
||||
UINT TunMtu; // tun-mtu
|
||||
IPC_ASYNC *IpcAsync; // Asynchronous IPC connection
|
||||
|
Reference in New Issue
Block a user