mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-04-03 18:00:08 +03:00
Cedar/SM: Provide limited support for custom VPN Azure service
This commit is contained in:
parent
a202baf464
commit
7025c36553
@ -260,6 +260,8 @@ void SmAzureSetStatus(HWND hWnd, SM_AZURE *a)
|
|||||||
|
|
||||||
st.IsEnabled = IsChecked(hWnd, R_ENABLE);
|
st.IsEnabled = IsChecked(hWnd, R_ENABLE);
|
||||||
|
|
||||||
|
st.UseCustom = a->UseCustom;
|
||||||
|
|
||||||
if (CALL(hWnd, ScSetAzureStatus(a->s->Rpc, &st)) == false)
|
if (CALL(hWnd, ScSetAzureStatus(a->s->Rpc, &st)) == false)
|
||||||
{
|
{
|
||||||
EndDialog(hWnd, 0);
|
EndDialog(hWnd, 0);
|
||||||
@ -342,7 +344,9 @@ void SmAzureDlgRefresh(HWND hWnd, SM_AZURE *a)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CALL(hWnd, ScGetDDnsClientStatus(a->s->Rpc, &ddns)) == false)
|
a->UseCustom = st.UseCustom;
|
||||||
|
|
||||||
|
if (st.UseCustom == false && CALL(hWnd, ScGetDDnsClientStatus(a->s->Rpc, &ddns)) == false)
|
||||||
{
|
{
|
||||||
EndDialog(hWnd, 0);
|
EndDialog(hWnd, 0);
|
||||||
return;
|
return;
|
||||||
@ -360,14 +364,22 @@ void SmAzureDlgRefresh(HWND hWnd, SM_AZURE *a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetShow(hWnd, S_HOSTNAME_BORDER, st.IsEnabled);
|
SetShow(hWnd, S_HOSTNAME_BORDER, st.IsEnabled);
|
||||||
SetShow(hWnd, S_HOSTNAME_INFO, st.IsEnabled);
|
SetShow(hWnd, S_HOSTNAME_INFO, st.IsEnabled && st.UseCustom == false);
|
||||||
|
SetShow(hWnd, S_HOSTNAME_CUSTOM, st.IsEnabled && st.UseCustom);
|
||||||
SetShow(hWnd, B_CHANGE, st.IsEnabled);
|
SetShow(hWnd, B_CHANGE, st.IsEnabled);
|
||||||
|
SetEnable(hWnd, B_CHANGE, st.IsEnabled && st.UseCustom == false);
|
||||||
|
|
||||||
if (st.IsEnabled == false || IsEmptyStr(ddns.CurrentHostName))
|
if (st.IsEnabled)
|
||||||
{
|
{
|
||||||
Hide(hWnd, E_HOST);
|
if (st.UseCustom && IsEmptyStr(st.CurrentHostname) == false)
|
||||||
|
{
|
||||||
|
StrCpy(tmp, sizeof(tmp), st.CurrentHostname);
|
||||||
|
|
||||||
|
SetTextA(hWnd, E_HOST, tmp);
|
||||||
|
|
||||||
|
Show(hWnd, E_HOST);
|
||||||
}
|
}
|
||||||
else
|
else if (st.UseCustom == false && IsEmptyStr(ddns.CurrentHostName) == false)
|
||||||
{
|
{
|
||||||
StrCpy(tmp, sizeof(tmp), ddns.CurrentHostName);
|
StrCpy(tmp, sizeof(tmp), ddns.CurrentHostName);
|
||||||
StrCat(tmp, sizeof(tmp), AZURE_DOMAIN_SUFFIX);
|
StrCat(tmp, sizeof(tmp), AZURE_DOMAIN_SUFFIX);
|
||||||
@ -376,6 +388,15 @@ void SmAzureDlgRefresh(HWND hWnd, SM_AZURE *a)
|
|||||||
|
|
||||||
Show(hWnd, E_HOST);
|
Show(hWnd, E_HOST);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hide(hWnd, E_HOST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hide(hWnd, E_HOST);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// VPN Azure Setup screen
|
// VPN Azure Setup screen
|
||||||
@ -18403,10 +18424,21 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
|||||||
|
|
||||||
// VPN Azure client state acquisition
|
// VPN Azure client state acquisition
|
||||||
Zero(&sta, sizeof(sta));
|
Zero(&sta, sizeof(sta));
|
||||||
if (ScGetAzureStatus(p->Rpc, &sta) == ERR_NO_ERROR && sta.IsEnabled && IsEmptyStr(st.CurrentFqdn) == false)
|
if (ScGetAzureStatus(p->Rpc, &sta) == ERR_NO_ERROR && sta.IsEnabled)
|
||||||
{
|
{
|
||||||
char tmp[MAX_SIZE];
|
char tmp[MAX_SIZE];
|
||||||
|
|
||||||
|
if (sta.UseCustom && IsEmptyStr(sta.CurrentHostname) == false)
|
||||||
|
{
|
||||||
|
StrCpy(tmp, sizeof(tmp), sta.CurrentHostname);
|
||||||
|
|
||||||
|
SetTextA(hWnd, E_AZURE_HOST, tmp);
|
||||||
|
|
||||||
|
Show(hWnd, S_AZURE);
|
||||||
|
Show(hWnd, E_AZURE_HOST);
|
||||||
|
}
|
||||||
|
else if (sta.UseCustom == false && IsEmptyStr(st.CurrentFqdn) == false)
|
||||||
|
{
|
||||||
StrCpy(tmp, sizeof(tmp), st.CurrentHostName);
|
StrCpy(tmp, sizeof(tmp), st.CurrentHostName);
|
||||||
StrCat(tmp, sizeof(tmp), AZURE_DOMAIN_SUFFIX);
|
StrCat(tmp, sizeof(tmp), AZURE_DOMAIN_SUFFIX);
|
||||||
|
|
||||||
@ -18420,6 +18452,12 @@ void SmServerDlgRefresh(HWND hWnd, SM_SERVER *p)
|
|||||||
Hide(hWnd, S_AZURE);
|
Hide(hWnd, S_AZURE);
|
||||||
Hide(hWnd, E_AZURE_HOST);
|
Hide(hWnd, E_AZURE_HOST);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hide(hWnd, S_AZURE);
|
||||||
|
Hide(hWnd, E_AZURE_HOST);
|
||||||
|
}
|
||||||
|
|
||||||
SmServerDlgUpdate(hWnd, p);
|
SmServerDlgUpdate(hWnd, p);
|
||||||
}
|
}
|
||||||
|
@ -375,6 +375,7 @@ typedef struct SM_AZURE
|
|||||||
{
|
{
|
||||||
SM_SERVER *s;
|
SM_SERVER *s;
|
||||||
bool OnSetup;
|
bool OnSetup;
|
||||||
|
bool UseCustom;
|
||||||
} SM_AZURE;
|
} SM_AZURE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4498,6 +4498,7 @@ BEGIN
|
|||||||
CONTROL "@R_DISABLE",R_DISABLE,"Button",BS_AUTORADIOBUTTON,13,297,101,12
|
CONTROL "@R_DISABLE",R_DISABLE,"Button",BS_AUTORADIOBUTTON,13,297,101,12
|
||||||
GROUPBOX "@S_HOSTNAME_BORDER",S_HOSTNAME_BORDER,123,264,204,48
|
GROUPBOX "@S_HOSTNAME_BORDER",S_HOSTNAME_BORDER,123,264,204,48
|
||||||
LTEXT "@S_HOSTNAME_INFO",S_HOSTNAME_INFO,129,275,191,19
|
LTEXT "@S_HOSTNAME_INFO",S_HOSTNAME_INFO,129,275,191,19
|
||||||
|
LTEXT "@S_HOSTNAME_CUSTOM",S_HOSTNAME_CUSTOM,129,275,191,19
|
||||||
EDITTEXT E_HOST,129,295,118,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
EDITTEXT E_HOST,129,295,118,13,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
|
||||||
PUSHBUTTON "@B_CHANGE",B_CHANGE,252,293,67,15
|
PUSHBUTTON "@B_CHANGE",B_CHANGE,252,293,67,15
|
||||||
PUSHBUTTON "@B_WEB",B_WEB,332,261,72,30,BS_MULTILINE
|
PUSHBUTTON "@B_WEB",B_WEB,332,261,72,30,BS_MULTILINE
|
||||||
|
@ -1030,6 +1030,7 @@
|
|||||||
#define B_NEW 1521
|
#define B_NEW 1521
|
||||||
#define R_TRUST_DEFAULT 1521
|
#define R_TRUST_DEFAULT 1521
|
||||||
#define B_CLEAR 1522
|
#define B_CLEAR 1522
|
||||||
|
#define S_HOSTNAME_CUSTOM 1523
|
||||||
#define B_ONLINE 1655
|
#define B_ONLINE 1655
|
||||||
#define D_NM_CONNECT 1998
|
#define D_NM_CONNECT 1998
|
||||||
#define D_NM_MAIN 1999
|
#define D_NM_MAIN 1999
|
||||||
|
@ -4146,6 +4146,7 @@ R_ENABLE 启用 VPN Azure(&E)
|
|||||||
R_DISABLE 禁用 VPN Azure(&D)
|
R_DISABLE 禁用 VPN Azure(&D)
|
||||||
S_HOSTNAME_BORDER 当前 VPN Azure 主机名
|
S_HOSTNAME_BORDER 当前 VPN Azure 主机名
|
||||||
S_HOSTNAME_INFO VPN Azure 主机名与动态 DNS 主机名相同,但改变的域名后缀为“vpnazure.net”。
|
S_HOSTNAME_INFO VPN Azure 主机名与动态 DNS 主机名相同,但改变的域名后缀为“vpnazure.net”。
|
||||||
|
S_HOSTNAME_CUSTOM 自定义 VPN Azure 服务已启用。VPN Azure 主机名只能通过 vpncmd 命令更改。
|
||||||
B_CHANGE 变更主机名(&H)
|
B_CHANGE 变更主机名(&H)
|
||||||
B_WEB 如何使用 VPN Azure\r\n(访问网络)
|
B_WEB 如何使用 VPN Azure\r\n(访问网络)
|
||||||
IDCANCEL 确定(&O)
|
IDCANCEL 确定(&O)
|
||||||
|
@ -4134,6 +4134,7 @@ R_ENABLE &Enable VPN Azure
|
|||||||
R_DISABLE &Disable VPN Azure
|
R_DISABLE &Disable VPN Azure
|
||||||
S_HOSTNAME_BORDER Current VPN Azure Hostname
|
S_HOSTNAME_BORDER Current VPN Azure Hostname
|
||||||
S_HOSTNAME_INFO The VPN Azure hostname is same to the Dynamic DNS hostname, but altering the domain suffix to "vpnazure.net".
|
S_HOSTNAME_INFO The VPN Azure hostname is same to the Dynamic DNS hostname, but altering the domain suffix to "vpnazure.net".
|
||||||
|
S_HOSTNAME_CUSTOM Custom VPN Azure service is enabled. The VPN Azure hostname can only be changed from the vpncmd command.
|
||||||
B_CHANGE Change &Hostname
|
B_CHANGE Change &Hostname
|
||||||
B_WEB How to Use VPN Azure\r\n(Visit the Web)
|
B_WEB How to Use VPN Azure\r\n(Visit the Web)
|
||||||
IDCANCEL &OK
|
IDCANCEL &OK
|
||||||
|
@ -4139,6 +4139,7 @@ R_ENABLE VPN Azure を有効にする(&E)
|
|||||||
R_DISABLE VPN Azure を無効にする(&D)
|
R_DISABLE VPN Azure を無効にする(&D)
|
||||||
S_HOSTNAME_BORDER 現在の VPN Azure ホスト名
|
S_HOSTNAME_BORDER 現在の VPN Azure ホスト名
|
||||||
S_HOSTNAME_INFO VPN Azure ホスト名はダイナミック DNS サービスのホスト名のドメイン部分を "vpnazure.net" に変更したものが使用されます。
|
S_HOSTNAME_INFO VPN Azure ホスト名はダイナミック DNS サービスのホスト名のドメイン部分を "vpnazure.net" に変更したものが使用されます。
|
||||||
|
S_HOSTNAME_CUSTOM カスタム VPN Azure サービスが有効になっています。VPN Azure ホスト名は、vpncmd コマンドからのみ変更できます。
|
||||||
B_CHANGE ホスト名の変更(&H)
|
B_CHANGE ホスト名の変更(&H)
|
||||||
B_WEB VPN Azure の使い方\r\n(Web サイトを表示)
|
B_WEB VPN Azure の使い方\r\n(Web サイトを表示)
|
||||||
IDCANCEL &OK
|
IDCANCEL &OK
|
||||||
|
@ -4117,6 +4117,7 @@ R_ENABLE VPN Azure를 사용 (&E)
|
|||||||
R_DISABLE VPN Azure를 비활성화 (&D)
|
R_DISABLE VPN Azure를 비활성화 (&D)
|
||||||
S_HOSTNAME_BORDER 현재 VPN Azure 호스트 이름
|
S_HOSTNAME_BORDER 현재 VPN Azure 호스트 이름
|
||||||
S_HOSTNAME_INFO VPN Azure 호스트 이름은 동적 DNS 서비스 호스트 이름의 도메인 부분을 "vpnazure.net"로 변경 한 것이 사용됩니다.
|
S_HOSTNAME_INFO VPN Azure 호스트 이름은 동적 DNS 서비스 호스트 이름의 도메인 부분을 "vpnazure.net"로 변경 한 것이 사용됩니다.
|
||||||
|
S_HOSTNAME_CUSTOM Custom VPN Azure service is enabled. The VPN Azure hostname can only be changed from the vpncmd command.
|
||||||
B_CHANGE 호스트 이름 변경 (&H)
|
B_CHANGE 호스트 이름 변경 (&H)
|
||||||
B_WEB VPN Azure 사용 \r\n (Web 사이트보기)
|
B_WEB VPN Azure 사용 \r\n (Web 사이트보기)
|
||||||
IDCANCEL & OK
|
IDCANCEL & OK
|
||||||
|
@ -3863,6 +3863,7 @@ R_ENABLE &Ativar VPN Azure
|
|||||||
R_DISABLE &Desativar VPN Azure
|
R_DISABLE &Desativar VPN Azure
|
||||||
S_HOSTNAME_BORDER Nome do host atual da VPN Azure
|
S_HOSTNAME_BORDER Nome do host atual da VPN Azure
|
||||||
S_HOSTNAME_INFO O nome do host da VPN do Azure é igual ao nome do host do DNS dinâmico, mas alterando o sufixo do domínio para "vpnazure.net".
|
S_HOSTNAME_INFO O nome do host da VPN do Azure é igual ao nome do host do DNS dinâmico, mas alterando o sufixo do domínio para "vpnazure.net".
|
||||||
|
S_HOSTNAME_CUSTOM Custom VPN Azure service is enabled. The VPN Azure hostname can only be changed from the vpncmd command.
|
||||||
B_CHANGE Mudar &Hostname
|
B_CHANGE Mudar &Hostname
|
||||||
B_WEB Como usar o VPN Azure\r\n (Visite o site)
|
B_WEB Como usar o VPN Azure\r\n (Visite o site)
|
||||||
IDCANCEL &OK
|
IDCANCEL &OK
|
||||||
|
@ -4133,6 +4133,7 @@ R_ENABLE &Enable VPN Azure
|
|||||||
R_DISABLE &Disable VPN Azure
|
R_DISABLE &Disable VPN Azure
|
||||||
S_HOSTNAME_BORDER Current VPN Azure Hostname
|
S_HOSTNAME_BORDER Current VPN Azure Hostname
|
||||||
S_HOSTNAME_INFO The VPN Azure hostname is same to the Dynamic DNS hostname, but altering the domain suffix to "vpnazure.net".
|
S_HOSTNAME_INFO The VPN Azure hostname is same to the Dynamic DNS hostname, but altering the domain suffix to "vpnazure.net".
|
||||||
|
S_HOSTNAME_CUSTOM Custom VPN Azure service is enabled. The VPN Azure hostname can only be changed from the vpncmd command.
|
||||||
B_CHANGE Change &Hostname
|
B_CHANGE Change &Hostname
|
||||||
B_WEB How to Use VPN Azure\r\n(Visit the Web)
|
B_WEB How to Use VPN Azure\r\n(Visit the Web)
|
||||||
IDCANCEL &OK
|
IDCANCEL &OK
|
||||||
|
@ -4146,6 +4146,7 @@ R_ENABLE 啟用 VPN Azure(&E)
|
|||||||
R_DISABLE 禁用 VPN Azure(&D)
|
R_DISABLE 禁用 VPN Azure(&D)
|
||||||
S_HOSTNAME_BORDER 當前 VPN Azure 主機名稱
|
S_HOSTNAME_BORDER 當前 VPN Azure 主機名稱
|
||||||
S_HOSTNAME_INFO VPN Azure 主機名稱與動態 DNS 主機名稱相同,但改變的功能變數名稱尾碼為“vpnazure.net”。
|
S_HOSTNAME_INFO VPN Azure 主機名稱與動態 DNS 主機名稱相同,但改變的功能變數名稱尾碼為“vpnazure.net”。
|
||||||
|
S_HOSTNAME_CUSTOM 自定義 VPN Azure 服務已啟用。VPN Azure 主機名稱只能通過 vpncmd 命令更改。
|
||||||
B_CHANGE 變更主機名稱(&H)
|
B_CHANGE 變更主機名稱(&H)
|
||||||
B_WEB 如何使用 VPN Azure\r\n(訪問網路)
|
B_WEB 如何使用 VPN Azure\r\n(訪問網路)
|
||||||
IDCANCEL 確定(&O)
|
IDCANCEL 確定(&O)
|
||||||
|
Loading…
Reference in New Issue
Block a user