mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-09-25 20:59:20 +03:00
Rename "OpenVPN_UdpPortList" to "PortsUDP", store ports in a LIST
Now that Proto supports UDP, the server can handle multiple protocols on each UDP port. The UDP ports are specified by the "OpenVPN_UdpPortList" configuration setting, because: - OpenVPN is currently the only UDP protocol supported by SoftEther VPN to allow a custom port number. - Before Proto was introduced, a unified interface for the protocols didn't exist; each protocol implementation had to create its own listener. In preparation for the upcoming WireGuard implementation, this commit renames "OpenVPN_UdpPortList" to "PortsUDP", which should clarify that the setting is global. The change is reflected in the code. Also, the ports are now stored in a LIST rather than a string. The conversion between string and LIST only happens when loading/saving the configuration. The default UDP ports are now the same as the TCP ones (443, 992, 1194, 5555).
This commit is contained in:
@ -147,7 +147,6 @@ struct SYSLOG_SETTING
|
||||
struct OPENVPN_SSTP_CONFIG
|
||||
{
|
||||
bool EnableOpenVPN; // OpenVPN is enabled
|
||||
char OpenVPNPortList[MAX_SIZE]; // OpenVPN UDP port number list
|
||||
bool OpenVPNObfuscation; // OpenVPN: Obfuscation mode
|
||||
char OpenVPNObfuscationMask[MAX_SIZE]; // OpenVPN: String (mask) for XOR obfuscation
|
||||
bool EnableSSTP; // SSTP is enabled
|
||||
@ -159,6 +158,7 @@ struct SERVER
|
||||
UINT ServerType; // Type of server
|
||||
UINT UpdatedServerType; // Type of updated server
|
||||
LIST *ServerListenerList; // Server listener list
|
||||
LIST *PortsUDP; // The ports used by Proto's UDP listener
|
||||
UCHAR HashedPassword[SHA1_SIZE]; // Password
|
||||
char ControllerName[MAX_HOST_NAME_LEN + 1]; // Controller name
|
||||
UINT ControllerPort; // Controller port
|
||||
@ -244,7 +244,6 @@ struct SERVER
|
||||
|
||||
PROTO *Proto; // Protocols handler
|
||||
IPSEC_SERVER *IPsecServer; // IPsec server function
|
||||
char OpenVpnServerUdpPorts[MAX_SIZE]; // UDP port list string
|
||||
DDNS_CLIENT *DDnsClient; // DDNS client feature
|
||||
LOCK *OpenVpnSstpConfigLock; // Lock OpenVPN and SSTP configuration
|
||||
|
||||
|
Reference in New Issue
Block a user