1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 01:59:53 +03:00

Cedar: Add "DefaultGateway" and "DefaultSubnet" virtual hub options

WireGuard does not provide any configuration messages, meaning that we cannot push the IP address we receive from the DHCP server to the client.

In order to overcome the limitation we don't perform any DHCP operations and instead just extract the source IP address from the first IPv4 packet we receive in the tunnel.

The gateway address and the subnet mask can be set using the new "SetStaticNetwork" command. The values can be retrieved using "OptionsGet".

In future we will add a "allowed source IP addresses" function, similar to what the original WireGuard implementation provides.

================================================================================

SetStaticNetwork command - Set Virtual Hub static IPv4 network parameters
Help for command "SetStaticNetwork"

Purpose:
  Set Virtual Hub static IPv4 network parameters

Description:
  Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions).
  You can get the current settings by using the OptionsGet command.

Usage:
  SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]

Parameters:
  /GATEWAY - Specify the IP address of the gateway that will be used for internet communication.
  /SUBNET  - Specify the subnet mask, required to determine the size of the local VPN network.
This commit is contained in:
Davide Beatrici 2020-09-01 03:04:14 +02:00
parent decfcecc97
commit afe576dcdc
14 changed files with 171 additions and 10 deletions

View File

@ -9061,9 +9061,12 @@ UINT StGetHub(ADMIN *a, RPC_CREATE_HUB *t)
{
StrCpy(t->HubName, sizeof(t->HubName), h->Name);
t->Online = h->Offline ? false : true;
t->HubType = h->Type;
t->HubOption.DefaultGateway = h->Option->DefaultGateway;
t->HubOption.DefaultSubnet = h->Option->DefaultSubnet;
t->HubOption.MaxSession = h->Option->MaxSession;
t->HubOption.NoEnum = h->Option->NoEnum;
t->HubType = h->Type;
}
Unlock(h->lock);
@ -9090,7 +9093,6 @@ UINT StSetHub(ADMIN *a, RPC_CREATE_HUB *t)
return ERR_INVALID_PARAMETER;
}
CHECK_RIGHT;
NO_SUPPORT_FOR_BRIDGE;
@ -9175,8 +9177,12 @@ UINT StSetHub(ADMIN *a, RPC_CREATE_HUB *t)
else
{
h->Type = t->HubType;
h->Option->DefaultGateway = t->HubOption.DefaultGateway;
h->Option->DefaultSubnet = t->HubOption.DefaultSubnet;
h->Option->MaxSession = t->HubOption.MaxSession;
h->Option->NoEnum = t->HubOption.NoEnum;
if (IsZero(t->HashedPassword, sizeof(t->HashedPassword)) == false &&
IsZero(t->SecurePassword, sizeof(t->SecurePassword)) == false)
{
@ -9234,8 +9240,6 @@ UINT StCreateHub(ADMIN *a, RPC_CREATE_HUB *t)
return ERR_NOT_FARM_CONTROLLER;
}
if (IsEmptyStr(t->HubName) || IsSafeStr(t->HubName) == false)
{
return ERR_INVALID_PARAMETER;
@ -9279,6 +9283,8 @@ UINT StCreateHub(ADMIN *a, RPC_CREATE_HUB *t)
// Create a hub object
Zero(&o, sizeof(o));
o.DefaultGateway = t->HubOption.DefaultGateway;
o.DefaultSubnet = t->HubOption.DefaultSubnet;
o.MaxSession = t->HubOption.MaxSession;
o.NoEnum = t->HubOption.NoEnum;
@ -12885,6 +12891,8 @@ void InRpcHubOption(RPC_HUB_OPTION *t, PACK *p)
}
Zero(t, sizeof(RPC_HUB_OPTION));
t->DefaultGateway = PackGetInt(p, "DefaultGateway");
t->DefaultSubnet = PackGetInt(p, "DefaultSubnet");
t->MaxSession = PackGetInt(p, "MaxSession");
t->NoEnum = PackGetBool(p, "NoEnum");
}
@ -12896,6 +12904,8 @@ void OutRpcHubOption(PACK *p, RPC_HUB_OPTION *t)
return;
}
PackAddInt(p, "DefaultGateway", t->DefaultGateway);
PackAddInt(p, "DefaultSubnet", t->DefaultSubnet);
PackAddInt(p, "MaxSession", t->MaxSession);
PackAddBool(p, "NoEnum", t->NoEnum);
}

View File

@ -229,6 +229,8 @@ struct RPC_KEY_PAIR
// HUB option
struct RPC_HUB_OPTION
{
UINT DefaultGateway; // Default gateway address
UINT DefaultSubnet; // Default subnet mask
UINT MaxSession; // Maximum number of sessions
bool NoEnum; // Not listed
};

View File

@ -7493,6 +7493,7 @@ void PsMain(PS *ps)
{"Hub", PsHub},
{"Online", PsOnline},
{"Offline", PsOffline},
{"SetStaticNetwork", PsSetStaticNetwork},
{"SetMaxSession", PsSetMaxSession},
{"SetHubPassword", PsSetHubPassword},
{"SetEnumAllow", PsSetEnumAllow},
@ -11143,6 +11144,53 @@ UINT PsOffline(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
return 0;
}
// Set the static IPv4 network parameters for the Virtual HUB
UINT PsSetStaticNetwork(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
{
LIST *o;
PS *ps = (PS *)param;
UINT ret = 0;
RPC_CREATE_HUB t;
PARAM args[] =
{
{"GATEWAY", CmdPrompt, _UU("CMD_SetStaticNetwork_Prompt_GATEWAY"), CmdEvalIp, NULL},
{"SUBNET", CmdPrompt, _UU("CMD_SetStaticNetwork_Prompt_SUBNET"), CmdEvalIp, NULL}
};
if (ps->HubName == NULL)
{
c->Write(c, _UU("CMD_Hub_Not_Selected"));
return ERR_INVALID_PARAMETER;
}
o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0]));
if (o == NULL)
{
return ERR_INVALID_PARAMETER;
}
Zero(&t, sizeof(t));
StrCpy(t.HubName, sizeof(t.HubName), ps->HubName);
ret = ScGetHub(ps->Rpc, &t);
if (ret != ERR_NO_ERROR)
{
goto FINAL;
}
t.HubOption.DefaultGateway = StrToIP32(GetParamStr(o, "GATEWAY"));
t.HubOption.DefaultSubnet = StrToIP32(GetParamStr(o, "SUBNET"));
ret = ScSetHub(ps->Rpc, &t);
FINAL:
if (ret != ERR_NO_ERROR)
{
CmdPrintError(c, ret);
}
FreeParamValueList(o);
return ret;
}
// Set the maximum number of concurrent connecting sessions of the Virtual HUB
UINT PsSetMaxSession(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
{
@ -11420,6 +11468,12 @@ UINT PsOptionsGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
CtInsert(ct, _UU("CMD_OptionsGet_TYPE"), GetHubTypeStr(t.HubType));
IPToUniStr32(tmp, sizeof(tmp), t.HubOption.DefaultGateway);
CtInsert(ct, _UU("CMD_OptionsGet_GATEWAY"), tmp);
IPToUniStr32(tmp, sizeof(tmp), t.HubOption.DefaultSubnet);
CtInsert(ct, _UU("CMD_OptionsGet_SUBNET"), tmp);
CtFree(ct, c);
}

View File

@ -456,6 +456,7 @@ UINT PsHubList(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsHub(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsOnline(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsOffline(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsSetStaticNetwork(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsSetMaxSession(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsSetHubPassword(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);
UINT PsSetEnumAllow(CONSOLE *c, char *cmd_name, wchar_t *str, void *param);

View File

@ -116,6 +116,8 @@ struct HUB_PA
struct HUB_OPTION
{
// Standard options
UINT DefaultGateway; // Used in IPC when DHCP cannot be used (e.g. WireGuard sessions)
UINT DefaultSubnet; // Used in IPC when DHCP cannot be used (e.g. WireGuard sessions)
UINT MaxSession; // Maximum number of simultaneous connections
bool NoEnum; // Excluded from the enumeration
// Advanced options

View File

@ -242,6 +242,7 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
UINT layer)
{
IPC *ipc;
HUB *hub;
UINT dummy_int = 0;
SOCK *a;
SOCK *s;
@ -466,6 +467,13 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
PackGetStr(p, "IpcHubName", ipc->HubName, sizeof(ipc->HubName));
Debug("IPC Hub Name: %s\n", ipc->HubName);
hub = GetHub(cedar, ipc->HubName);
if (hub != NULL)
{
UINTToIP(&ipc->DefaultGateway, hub->Option->DefaultGateway);
UINTToIP(&ipc->SubnetMask, hub->Option->DefaultSubnet);
}
MacToStr(macstr, sizeof(macstr), ipc->MacAddress);
Debug("IPC: Session = %s, Connection = %s, Mac = %s\n", ipc->SessionName, ipc->ConnectionName, macstr);

View File

@ -2279,6 +2279,8 @@ void SiSetDefaultHubOption(HUB_OPTION *o)
return;
}
o->DefaultGateway = SetIP32(192, 168, 30, 1);
o->DefaultSubnet = SetIP32(255, 255, 255, 0);
o->MaxSession = 0;
o->VlanTypeId = MAC_PROTO_TAGVLAN;
o->NoIPv6DefaultRouterInRAWhenIPv6 = true;
@ -3757,6 +3759,8 @@ void SiLoadHubOptionCfg(FOLDER *f, HUB_OPTION *o)
return;
}
o->DefaultGateway = CfgGetIp32(f, "DefaultGateway");
o->DefaultSubnet = CfgGetIp32(f, "DefaultSubnet");
o->MaxSession = CfgGetInt(f, "MaxSession");
o->NoArpPolling = CfgGetBool(f, "NoArpPolling");
o->NoIPv6AddrPolling = CfgGetBool(f, "NoIPv6AddrPolling");
@ -3904,6 +3908,8 @@ void SiWriteHubOptionCfg(FOLDER *f, HUB_OPTION *o)
return;
}
CfgAddIp32(f, "DefaultGateway", o->DefaultGateway);
CfgAddIp32(f, "DefaultSubnet", o->DefaultSubnet);
CfgAddInt(f, "MaxSession", o->MaxSession);
CfgAddBool(f, "NoArpPolling", o->NoArpPolling);
CfgAddBool(f, "NoIPv6AddrPolling", o->NoIPv6AddrPolling);

View File

@ -5100,6 +5100,16 @@ CMD_Offline_Help 如果您正在管理的虚拟 HUB 在线,设置成脱机
CMD_Offline_Args Offline
# SetStaticNetwork 命令
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession 命令
CMD_SetMaxSession 设定虚拟 HUB 的最大同时在线用户数量
CMD_SetMaxSession_Help 设定现在正在管理的虚拟 HUB 的最大同时在线客户数量。当超过这个数量时,如果从 VPN Client 和 VPN Bridge 连接的时候,超过了最大并发会话数,更多的客户将无法连接。最大同时在线客户数的限制不包括本地的网桥,虚拟的 NAT级联连接等生成连接不包括在内。\n设置同时在线最大数目可以通过运行 OptionsGet 命令获得。\n此命令在 VPN Bridge 中不会运行。\n此命令在集群虚拟 HUB 中不能运行。
@ -5136,7 +5146,8 @@ CMD_OptionsGet_ENUM 对于匿名用户的虚拟 HUB 的显示
CMD_OptionsGet_MAXSESSIONS 最大同时在线客户数
CMD_OptionsGet_STATUS 状态
CMD_OptionsGet_TYPE 虚拟 HUB 的类型
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet 命令

View File

@ -5082,6 +5082,16 @@ CMD_Offline_Help Use this when the Virtual Hub currently being managed is onlin
CMD_Offline_Args Offline
# SetStaticNetwork command
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession command
CMD_SetMaxSession Set the Max Number of Concurrently Connected Sessions for Virtual Hub
CMD_SetMaxSession_Help Use this to set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. When there are more sessions than the maximum number of concurrently connected sessions that are being connected from the VPN Client or VPN Bridge, when the maximum number of sessions is reached, clients will no longer be able to connect. This limit on the maximum number of concurrently connected sessions does not include sessions generated in the Virtual Hub by Local Bridges, Virtual NAT, and Cascade Connections. \nYou can get the current setting for the max number of concurrently connected sessions by using the OptionsGet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster.
@ -5118,7 +5128,8 @@ CMD_OptionsGet_ENUM Enumeration of Virtual Hub for Anonymous User
CMD_OptionsGet_MAXSESSIONS Max Number of Sessions
CMD_OptionsGet_STATUS Status
CMD_OptionsGet_TYPE Virtual Hub Type
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet command

View File

@ -5084,6 +5084,16 @@ CMD_Offline_Help 現在管理している仮想 HUB がオンラインになっ
CMD_Offline_Args Offline
# SetStaticNetwork command
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession コマンド
CMD_SetMaxSession 仮想 HUB の最大同時接続セッション数を設定する
CMD_SetMaxSession_Help 現在管理している仮想 HUB の、最大同時接続セッション数を設定します。最大同時接続セッション数を越えたセッションが、VPN Client や VPN Bridge から接続された場合、最大同時接続セッション数を上回った時点で、それ以上クライアントは接続できなくなります。この最大同時接続セッション数の制限には、ローカルブリッジ、仮想 NAT、カスケード接続などによって仮想 HUB 内に生成されるセッションは含まれません。\n現在の最大同時接続セッション数の設定は、OptionsGet コマンドによって取得することができます。\nこのコマンドは、VPN Bridge では実行できません。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。
@ -5120,7 +5130,8 @@ CMD_OptionsGet_ENUM 匿名ユーザーに対する仮想 HUB の列挙
CMD_OptionsGet_MAXSESSIONS 最大同時接続セッション数
CMD_OptionsGet_STATUS 状態
CMD_OptionsGet_TYPE 仮想 HUB の種類
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet コマンド

View File

@ -5062,6 +5062,16 @@ CMD_Offline_Help 현재 관리하고있는 가상 HUB가 온라인 상태 인
CMD_Offline_Args Offline
# SetStaticNetwork 명령
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession 명령
CMD_SetMaxSession 가상 HUB 최대 동시 연결 세션 수를 설정하려면
CMD_SetMaxSession_Help 현재 관리하고있는 가상 HUB의 최대 동시 세션 수를 설정합니다. 최대 동시 세션 수를 초과 한 세션이 VPN Client 및 VPN Bridge에서 연결된 경우 최대 동시 세션 수를 초과 한 시점에서 더 이상 클라이언트는 연결할 수 없습니다. 이 최대 동시 세션 수의 제한 로컬 브리지 가상 NAT 계단식 등에 의해 가상 HUB에 생성 된 세션은 포함되지 않습니다. \n 현재 최대 동시 세션 수 설정은 OptionsGet 명령에서 얻을 수 있습니다. \n이 명령은 VPN Bridge에서는 실행되지 않습니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다.
@ -5098,7 +5108,8 @@ CMD_OptionsGet_ENUM 익명 사용자에 대한 가상 HUB의 열거
CMD_OptionsGet_MAXSESSIONS 최대 동시 세션 수
CMD_OptionsGet_STATUS 상태
CMD_OptionsGet_TYPE 가상 HUB의 종류
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet 명령

View File

@ -4809,6 +4809,16 @@ CMD_Offline_Help Use this when the Virtual Hub currently being managed is online
CMD_Offline_Args Offline
# SetStaticNetwork command
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession command
CMD_SetMaxSession Set the Max Number of Concurrently Connected Sessions for Virtual Hub
CMD_SetMaxSession_Help Use this to set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. When there are more sessions than the maximum number of concurrently connected sessions that are being connected from the VPN Client or VPN Bridge, when the maximum number of sessions is reached, clients will no longer be able to connect. This limit on the maximum number of concurrently connected sessions does not include sessions generated in the Virtual Hub by Local Bridges, Virtual NAT, and Cascade Connections. \nYou can get the current setting for the max number of concurrently connected sessions by using the OptionsGet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster.
@ -4845,6 +4855,8 @@ CMD_OptionsGet_ENUM Enumeration of Virtual Hub for Anonymous User
CMD_OptionsGet_MAXSESSIONS Max Number of Sessions
CMD_OptionsGet_STATUS Status
CMD_OptionsGet_TYPE Virtual Hub Type
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet command

View File

@ -5083,6 +5083,16 @@ CMD_Offline_Help Use this when the Virtual Hub currently being managed is onlin
CMD_Offline_Args Offline
# SetStaticNetwork command
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession command
CMD_SetMaxSession Set the Max Number of Concurrently Connected Sessions for Virtual Hub
CMD_SetMaxSession_Help Use this to set the maximum number of sessions that can be concurrently connected to the Virtual Hub that is currently being managed. When there are more sessions than the maximum number of concurrently connected sessions that are being connected from the VPN Client or VPN Bridge, when the maximum number of sessions is reached, clients will no longer be able to connect. This limit on the maximum number of concurrently connected sessions does not include sessions generated in the Virtual Hub by Local Bridges, Virtual NAT, and Cascade Connections. \nYou can get the current setting for the max number of concurrently connected sessions by using the OptionsGet command. \nThis command cannot be run on VPN Bridge. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster.
@ -5119,7 +5129,8 @@ CMD_OptionsGet_ENUM Enumeration of Virtual Hub for Anonymous User
CMD_OptionsGet_MAXSESSIONS Max Number of Sessions
CMD_OptionsGet_STATUS Status
CMD_OptionsGet_TYPE Virtual Hub Type
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet command

View File

@ -5101,6 +5101,16 @@ CMD_Offline_Help 如果您正在管理的虛擬 HUB 線上,設置成離線
CMD_Offline_Args Offline
# SetStaticNetwork 命令
CMD_SetStaticNetwork Set Virtual Hub static IPv4 network parameters
CMD_SetStaticNetwork_Help Set the static IPv4 network parameters for the Virtual Hub. They are used when DHCP is not available (e.g. WireGuard sessions). \nYou can get the current settings by using the OptionsGet command.
CMD_SetStaticNetwork_Args SetStaticNetwork [/GATEWAY:gateway] [/SUBNET:subnet]
CMD_SetStaticNetwork_GATEWAY Specify the IP address of the gateway that will be used for internet communication.
CMD_SetStaticNetwork_SUBNET Specify the subnet mask, required to determine the size of the local VPN network.
CMD_SetStaticNetwork_Prompt_GATEWAY Gateway:
CMD_SetStaticNetwork_Prompt_SUBNET Subnet mask:
# SetMaxSession 命令
CMD_SetMaxSession 設定虛擬 HUB 的最大同時線上用戶數量
CMD_SetMaxSession_Help 設定現在正在管理的虛擬 HUB 的最大同時線上客戶數量。當超過這個數量時,如果從 VPN Client 和 VPN Bridge 連接的時候,超過了最大併發會話數,更多的客戶將無法連接。最大同時線上客戶數的限制不包括本地的橋接器,虛擬的 NAT級聯連接等生成連接不包括在內。\n設置同時線上最大數目可以通過運行 OptionsGet 命令獲得。\n此命令在 VPN Bridge 中不會運行。\n此命令在集群虛擬 HUB 中不能運行。
@ -5137,7 +5147,8 @@ CMD_OptionsGet_ENUM 對於匿名使用者的虛擬 HUB 的顯示
CMD_OptionsGet_MAXSESSIONS 最大同時線上客戶數
CMD_OptionsGet_STATUS 狀態
CMD_OptionsGet_TYPE 虛擬 HUB 的類型
CMD_OptionsGet_GATEWAY Default gateway
CMD_OptionsGet_SUBNET Default subnet
# RadiusServerSet 命令