diff --git a/src/Cedar/Admin.c b/src/Cedar/Admin.c index fdb1c5aa..0fd520fc 100644 --- a/src/Cedar/Admin.c +++ b/src/Cedar/Admin.c @@ -8988,6 +8988,7 @@ void InRpcInternetSetting(INTERNET_SETTING *t, PACK *p) t->ProxyPort = PackGetInt(p, "ProxyPort"); PackGetStr(p, "ProxyUsername", t->ProxyUsername, sizeof(t->ProxyUsername)); PackGetStr(p, "ProxyPassword", t->ProxyPassword, sizeof(t->ProxyPassword)); + PackGetStr(p, "CustomHttpHeader", t->CustomHttpHeader, sizeof(t->CustomHttpHeader)); } void OutRpcInternetSetting(PACK *p, INTERNET_SETTING *t) { @@ -9002,6 +9003,7 @@ void OutRpcInternetSetting(PACK *p, INTERNET_SETTING *t) PackAddInt(p, "ProxyPort", t->ProxyPort); PackAddStr(p, "ProxyUsername", t->ProxyUsername); PackAddStr(p, "ProxyPassword", t->ProxyPassword); + PackAddStr(p, "CustomHttpHeader", t->CustomHttpHeader); } // RPC_AZURE_STATUS diff --git a/src/Cedar/CM.c b/src/Cedar/CM.c index 634238ec..31e47d0d 100644 --- a/src/Cedar/CM.c +++ b/src/Cedar/CM.c @@ -7830,6 +7830,290 @@ UINT CmEditAccountDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, voi return 0; } +// Update the custom proxy HTTP header dialog +void CmProxyHttpHeaderDlgUpdate(HWND hWnd) +{ + UINT i = 0; + bool ok = true; + LIST *names_list; + // Validate arguments + if (hWnd == NULL) + { + return; + } + + names_list = NewList(NULL); + + for (; i < LvNum(hWnd, L_VALUES_LIST); i++) + { + wchar_t *str = LvGetStr(hWnd, L_VALUES_LIST, i, 0); + UniTrim(str); + if (IsEmptyUniStr(str) || IsInListUniStr(names_list, str)) + { + Free(str); + ok = false; + break; + } + + Add(names_list, str); + } + + FreeStrList(names_list); + SetEnable(hWnd, IDOK, ok); +} + +// Update the custom proxy HTTP header dialog content +void CmProxyHttpHeaderDlgRefresh(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d) +{ + UINT i = 0; + LIST *list; + LVB *b; + CLIENT_OPTION *a; + // Validate arguments + if (hWnd == NULL || d == NULL) + { + return; + } + + a = (CLIENT_OPTION *)d->ClientOption; + + list = NewEntryList(a->CustomHttpHeader, "\r\n", ":"); + + b = LvInsertStart(); + + for (; i < LIST_NUM(list); i++) + { + INI_ENTRY *e = LIST_DATA(list, i); + wchar_t *name = CopyStrToUni(e->Key); + wchar_t *value = CopyStrToUni(e->Value); + UniTrimLeft(value); + + LvInsertAdd(b, 0, NULL, 2, name, value); + + Free(name); + Free(value); + } + + LvInsertEnd(b, hWnd, L_VALUES_LIST); + FreeEntryList(list); +} + +// Initialize the custom proxy HTTP header dialog +void CmProxyHttpHeaderDlgInit(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d) +{ + // Validate arguments + if (hWnd == NULL || d == NULL) + { + return; + } + + LvSetEnhanced(hWnd, L_VALUES_LIST, true); + LvInitEx(hWnd, L_VALUES_LIST, true); + LvInsertColumn(hWnd, L_VALUES_LIST, 0, _UU("CM_HTTP_HEADER_COLUMN_0"), 150); + LvInsertColumn(hWnd, L_VALUES_LIST, 1, _UU("CM_HTTP_HEADER_COLUMN_1"), 150); + + LvSetStyle(hWnd, L_VALUES_LIST, LVS_EX_GRIDLINES); + + CmProxyHttpHeaderDlgRefresh(hWnd, d); +} + +// Custom proxy HTTP header dialog control +UINT CmProxyHttpHeaderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) +{ + CM_PROXY_HTTP_HEADER_DLG *d = (CM_PROXY_HTTP_HEADER_DLG *)param; + CLIENT_OPTION *a = (d == NULL ? NULL : d->ClientOption); + UINT i = INFINITE; + // Validate arguments + if (hWnd == NULL || d == NULL || a == NULL) + { + return 0; + } + + switch (msg) + { + case WM_INITDIALOG: + CmProxyHttpHeaderDlgInit(hWnd, d); + break; + case WM_CLOSE: + EndDialog(hWnd, false); + break; + case WM_NOTIFY: + { + switch (((LPNMHDR)lParam)->code) + { + // Header divider being dragged (resizing columns) + case HDN_ITEMCHANGINGA: + case HDN_ITEMCHANGINGW: + if (d->EditBox != NULL) + { + RECT rect; + ListView_GetSubItemRect(DlgItem(hWnd, L_VALUES_LIST), d->CurrentItem, d->CurrentSubItem, LVIR_LABEL, &rect); + MoveWindow(d->EditBox, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, true); + RedrawWindow(d->EditBox, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW); + } + break; + case LVN_ITEMCHANGED: + if (((LPNMHDR)lParam)->idFrom == L_VALUES_LIST) + { + CmProxyHttpHeaderDlgUpdate(hWnd); + } + break; + case NM_DBLCLK: + { + RECT rect; + LPNMLISTVIEW list_view = (LPNMLISTVIEW)lParam; + wchar_t *str; + + d->CurrentItem = list_view->iItem; + d->CurrentSubItem = list_view->iSubItem; + str = LvGetStr(DlgItem(hWnd, L_VALUES_LIST), 0, d->CurrentItem, d->CurrentSubItem); + ListView_GetSubItemRect(DlgItem(hWnd, L_VALUES_LIST), d->CurrentItem, d->CurrentSubItem, LVIR_LABEL, &rect); + + d->EditBox = CreateWindowExW(0, L"EDIT", str, WS_BORDER | WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | ES_LEFT | ES_MULTILINE | ES_WANTRETURN, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, DlgItem(hWnd, L_VALUES_LIST), NULL, GetModuleHandle(NULL), NULL); + Free(str); + + DlgFont(d->EditBox, 0, 8, false); + EditBoxSetEnhanced(d->EditBox, 0, true); + FocusEx(d->EditBox, 0); + break; + } + case NM_CLICK: + case NM_RETURN: + if (d->EditBox != NULL) + { + wchar_t *new_name = GetText(d->EditBox, 0); + wchar_t *old_name = LvGetStr(hWnd, L_VALUES_LIST, d->CurrentItem, d->CurrentSubItem); + + if (old_name != NULL) + { + if (UniStrCmp(new_name, old_name) != 0) + { + LvSetItem(hWnd, L_VALUES_LIST, d->CurrentItem, d->CurrentSubItem, new_name); + } + + Free(old_name); + } + + Free(new_name); + + DestroyWindow(d->EditBox); + d->EditBox = NULL; + } + } + break; + } + case WM_COMMAND: + switch (wParam) + { + case B_NEW: + { + NMLISTVIEW lv; + + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + i = LvInsertItem(hWnd, L_VALUES_LIST, 0, NULL, L""); + LvSelect(hWnd, L_VALUES_LIST, i); + + Zero(&lv, sizeof(lv)); + lv.hdr.code = NM_DBLCLK; + lv.iItem = i; + lv.iSubItem = 0; + + SendMsg(hWnd, 0, WM_NOTIFY, 0, (LPARAM)&lv); + } + break; + case B_DELETE: + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + i = LvGetSelected(hWnd, L_VALUES_LIST); + if (i != INFINITE) + { + LvDeleteItem(hWnd, L_VALUES_LIST, i); + } + CmProxyHttpHeaderDlgUpdate(hWnd); + break; + case B_CLEAR: + if (d->EditBox != NULL) + { + DestroyWindow(d->EditBox); + } + + LvReset(hWnd, L_VALUES_LIST); + CmProxyHttpHeaderDlgUpdate(hWnd); + break; + case IDOK: + { + UINT index = 0; + char *name = NULL; + char *value = NULL; + char http_header[HTTP_CUSTOM_HEADER_MAX_SIZE]; + + Zero(http_header, sizeof(http_header)); + i = LvNum(hWnd, L_VALUES_LIST); + + for (; index < i; index++) + { + char str[HTTP_CUSTOM_HEADER_MAX_SIZE]; + name = LvGetStrA(hWnd, L_VALUES_LIST, index, 0); + value = LvGetStrA(hWnd, L_VALUES_LIST, index, 1); + + Trim(name); + TrimLeft(value); + + Format(str, sizeof(str), "%s: %s\r\n", name, value); + EnSafeHttpHeaderValueStr(str, ' '); + + Free(name); + Free(value); + + if ((StrLen(http_header) + StrLen(str)) < sizeof(a->CustomHttpHeader)) + { + StrCat(http_header, sizeof(str), str); + } + else + { + MsgBox(hWnd, MB_ICONEXCLAMATION | MB_OK, _E(ERR_TOO_MANT_ITEMS)); + return 1; + } + } + + Zero(a->CustomHttpHeader, sizeof(a->CustomHttpHeader)); + StrCpy(a->CustomHttpHeader, sizeof(a->CustomHttpHeader), http_header); + + EndDialog(hWnd, true); + break; + } + case IDCANCEL: + Close(hWnd); + } + } + + return 0; +} + +// Custom proxy HTTP header dialog +bool CmProxyHttpHeaderDlg(HWND hWnd, CLIENT_OPTION *a) +{ + CM_PROXY_HTTP_HEADER_DLG d; + // Validate arguments + if (a == NULL) + { + return false; + } + + Zero(&d, sizeof(d)); + + d.ClientOption = a; + + return Dialog(hWnd, D_CM_PROXY_HTTP_HEADER, CmProxyHttpHeaderDlgProc, &d); +} + // Update the proxy server settings void CmProxyDlgUpdate(HWND hWnd, CLIENT_OPTION *a) { @@ -7840,6 +8124,8 @@ void CmProxyDlgUpdate(HWND hWnd, CLIENT_OPTION *a) return; } + SetEnable(hWnd, B_HTTP_HEADER, a->ProxyType == PROXY_HTTP); + if (IsEmpty(hWnd, E_HOSTNAME)) { ok = false; @@ -7903,6 +8189,9 @@ UINT CmProxyDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *par switch (wParam) { + case B_HTTP_HEADER: + CmProxyHttpHeaderDlg(hWnd, a); + break; case IDOK: GetTxtA(hWnd, E_HOSTNAME, a->ProxyName, sizeof(a->ProxyName)); GetTxtA(hWnd, E_USERNAME, a->ProxyUsername, sizeof(a->ProxyUsername)); diff --git a/src/Cedar/CMInner.h b/src/Cedar/CMInner.h index 94d9f55e..046042ec 100644 --- a/src/Cedar/CMInner.h +++ b/src/Cedar/CMInner.h @@ -289,6 +289,14 @@ typedef struct CM_TRAFFIC_DLG bool CloseDialogAfter; // Flag of whether or not to close the dialog } CM_TRAFFIC_DLG; +typedef struct CM_PROXY_HTTP_HEADER_DLG +{ + CLIENT_OPTION *ClientOption; + HWND EditBox; + UINT CurrentItem; + UINT CurrentSubItem; +} CM_PROXY_HTTP_HEADER_DLG; + // Internet connection settings typedef struct CM_INTERNET_SETTING { @@ -639,4 +647,8 @@ void CmProxyDlgSet(HWND hWnd, CLIENT_OPTION *o, CM_INTERNET_SETTING *setting); bool CmGetProxyServerNameAndPortFromIeProxyRegStr(char *name, UINT name_size, UINT *port, char *str, char *server_type); void *CmUpdateJumpList(UINT start_id); - +void CmProxyHttpHeaderDlgUpdate(HWND hWnd); +void CmProxyHttpHeaderDlgRefresh(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d); +void CmProxyHttpHeaderDlgInit(HWND hWnd, CM_PROXY_HTTP_HEADER_DLG *d); +UINT CmProxyHttpHeaderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); +bool CmProxyHttpHeaderDlg(HWND hWnd, CLIENT_OPTION *a); diff --git a/src/Cedar/Client.c b/src/Cedar/Client.c index 2b74d2ff..069d1d89 100644 --- a/src/Cedar/Client.c +++ b/src/Cedar/Client.c @@ -4424,6 +4424,7 @@ void InRpcClientOption(CLIENT_OPTION *c, PACK *p) PackGetStr(p, "ProxyName", c->ProxyName, sizeof(c->ProxyName)); PackGetStr(p, "ProxyUsername", c->ProxyUsername, sizeof(c->ProxyUsername)); PackGetStr(p, "ProxyPassword", c->ProxyPassword, sizeof(c->ProxyPassword)); + PackGetStr(p, "CustomHttpHeader", c->CustomHttpHeader, sizeof(c->CustomHttpHeader)); PackGetStr(p, "HubName", c->HubName, sizeof(c->HubName)); PackGetStr(p, "DeviceName", c->DeviceName, sizeof(c->DeviceName)); c->UseEncrypt = PackGetInt(p, "UseEncrypt") ? true : false; @@ -4449,6 +4450,7 @@ void OutRpcClientOption(PACK *p, CLIENT_OPTION *c) PackAddStr(p, "ProxyName", c->ProxyName); PackAddStr(p, "ProxyUsername", c->ProxyUsername); PackAddStr(p, "ProxyPassword", c->ProxyPassword); + PackAddStr(p, "CustomHttpHeader", c->CustomHttpHeader); PackAddStr(p, "HubName", c->HubName); PackAddStr(p, "DeviceName", c->DeviceName); PackAddInt(p, "Port", c->Port); @@ -9404,6 +9406,7 @@ CLIENT_OPTION *CiLoadClientOption(FOLDER *f) StrCpy(o->ProxyPassword, sizeof(o->ProxyPassword), s); Free(s); FreeBuf(b); + CfgGetStr(f, "CustomHttpHeader", o->CustomHttpHeader, sizeof(o->CustomHttpHeader)); o->NumRetry = CfgGetInt(f, "NumRetry"); o->RetryInterval = CfgGetInt(f, "RetryInterval"); CfgGetStr(f, "HubName", o->HubName, sizeof(o->HubName)); @@ -9729,6 +9732,8 @@ bool CiReadSettingFromCfg(CLIENT *c, FOLDER *root) FreeBuf(pw); } + CfgGetStr(proxy, "CustomHttpHeader", t.CustomHttpHeader, sizeof(t.CustomHttpHeader)); + Copy(&c->CommonProxySetting, &t, sizeof(INTERNET_SETTING)); } @@ -9938,6 +9943,7 @@ void CiWriteClientOption(FOLDER *f, CLIENT_OPTION *o) b = EncryptPassword(o->ProxyPassword); CfgAddByte(f, "ProxyPassword", b->Buf, b->Size); FreeBuf(b); + CfgAddStr(f, "CustomHttpHeader", o->CustomHttpHeader); CfgAddInt(f, "NumRetry", o->NumRetry); CfgAddInt(f, "RetryInterval", o->RetryInterval); CfgAddStr(f, "HubName", o->HubName); @@ -10272,6 +10278,8 @@ void CiWriteSettingToCfg(CLIENT *c, FOLDER *root) FreeBuf(pw); } + + CfgAddStr(proxy, "CustomHttpHeader", t->CustomHttpHeader); } // CA diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c index 9d03d76a..85086dab 100644 --- a/src/Cedar/Command.c +++ b/src/Cedar/Command.c @@ -3054,6 +3054,9 @@ void PcMain(PC *pc) {"AccountEncryptEnable", PcAccountEncryptEnable}, {"AccountCompressEnable", PcAccountCompressEnable}, {"AccountCompressDisable", PcAccountCompressDisable}, + {"AccountHttpHeaderAdd", PcAccountHttpHeaderAdd}, + {"AccountHttpHeaderDelete", PcAccountHttpHeaderDelete}, + {"AccountHttpHeaderGet", PcAccountHttpHeaderGet}, {"AccountProxyNone", PcAccountProxyNone}, {"AccountProxyHttp", PcAccountProxyHttp}, {"AccountProxySocks", PcAccountProxySocks}, @@ -5112,6 +5115,226 @@ UINT PcAccountCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *pa return ret; } +UINT PcAccountHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"DATA", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Data"), NULL, NULL}, + }; + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + HTTP_HEADER *header = NULL; + char *name = GetParamStr(o, "NAME"); + + Trim(name); + + header = NewHttpHeader("", "", ""); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(header, tokens->Token[i]); + } + FreeToken(tokens); + + if (GetHttpValue(header, name) == NULL) + { + RPC_CLIENT_CREATE_ACCOUNT z; + char s[HTTP_CUSTOM_HEADER_MAX_SIZE]; + + Format(s, sizeof(s), "%s: %s\r\n", name, GetParamStr(o, "DATA")); + EnSafeHttpHeaderValueStr(s, ' '); + + if ((StrLen(s) + StrLen(t.ClientOption->CustomHttpHeader)) < sizeof(t.ClientOption->CustomHttpHeader)) { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(s), s); + + Zero(&z, sizeof(z)); + z.CheckServerCert = t.CheckServerCert; + z.RetryOnServerCert = t.RetryOnServerCert; + z.ClientAuth = t.ClientAuth; + z.ClientOption = t.ClientOption; + z.ServerCert = t.ServerCert; + z.StartupAccount = t.StartupAccount; + + ret = CcSetAccount(pc->RemoteClient, &z); + } + else + { + // Error has occurred + ret = ERR_TOO_MANT_ITEMS; + } + } + else + { + // Error has occurred + ret = ERR_OBJECT_EXISTS; + } + + FreeHttpHeader(header); + } + + if (ret != ERR_NO_ERROR) + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PcAccountHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_AccountHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // Get the parameter list + LIST *o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + RPC_CLIENT_CREATE_ACCOUNT z; + char *value = GetParamStr(o, "NAME"); + + Zero(&z, sizeof(z)); + z.CheckServerCert = t.CheckServerCert; + z.RetryOnServerCert = t.RetryOnServerCert; + z.ClientAuth = t.ClientAuth; + z.ClientOption = t.ClientOption; + z.ServerCert = t.ServerCert; + z.StartupAccount = t.StartupAccount; + + Zero(z.ClientOption->CustomHttpHeader, sizeof(z.ClientOption->CustomHttpHeader)); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + if (StartWith(tokens->Token[i], value) == false) + { + StrCat(z.ClientOption->CustomHttpHeader, sizeof(z.ClientOption->CustomHttpHeader), tokens->Token[i]); + StrCat(z.ClientOption->CustomHttpHeader, 1, "\r\n"); + } + } + + ret = CcSetAccount(pc->RemoteClient, &z); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PcAccountHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + PC *pc = (PC *)param; + UINT ret = ERR_NO_ERROR; + RPC_CLIENT_GET_ACCOUNT t; + + // Parameter list that can be specified + PARAM args[] = + { + {"[name]", CmdPrompt, _UU("CMD_AccountCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // Get the parameter list + LIST *o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + UniStrCpy(t.AccountName, sizeof(t.AccountName), GetParamUniStr(o, "[name]")); + ret = CcGetAccount(pc->RemoteClient, &t); + + // Release of the parameter list + FreeParamValueList(o); + + if (ret == ERR_NO_ERROR) + { + wchar_t unistr[HTTP_CUSTOM_HEADER_MAX_SIZE]; + TOKEN_LIST *tokens = NULL; + UINT i = 0; + CT *ct = CtNew(); + CtInsertColumn(ct, _UU("CMD_CT_STD_COLUMN_1"), false); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + StrToUni(unistr, sizeof(unistr), tokens->Token[i]); + CtInsert(ct, unistr); + } + + CtFreeEx(ct, c, false); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + CiFreeClientGetAccount(&t); + + return ret; +} + // Set the connection method of the connection settings to the direct TCP/IP connection UINT PcAccountProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -7476,6 +7699,9 @@ void PsMain(PS *ps) {"CascadeCompressEnable", PsCascadeCompressEnable}, {"CascadeCompressDisable", PsCascadeCompressDisable}, {"CascadeProxyNone", PsCascadeProxyNone}, + {"CascadeHttpHeaderAdd", PsCascadeHttpHeaderAdd}, + {"CascadeHttpHeaderDelete", PsCascadeHttpHeaderDelete}, + {"CascadeHttpHeaderGet", PsCascadeHttpHeaderGet}, {"CascadeProxyHttp", PsCascadeProxyHttp}, {"CascadeProxySocks", PsCascadeProxySocks}, {"CascadeProxySocks5", PsCascadeProxySocks5}, @@ -13580,6 +13806,238 @@ UINT PsCascadeCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *pa return 0; } +UINT PsCascadeHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"DATA", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Data"), NULL, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + HTTP_HEADER *header = NULL; + char *name = GetParamStr(o, "NAME"); + + Trim(name); + + header = NewHttpHeader("", "", ""); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(header, tokens->Token[i]); + } + FreeToken(tokens); + + if (GetHttpValue(header, name) == NULL) + { + char s[HTTP_CUSTOM_HEADER_MAX_SIZE]; + Format(s, sizeof(s), "%s: %s\r\n", name, GetParamStr(o, "DATA")); + EnSafeHttpHeaderValueStr(s, ' '); + + if ((StrLen(s) + StrLen(t.ClientOption->CustomHttpHeader)) < sizeof(t.ClientOption->CustomHttpHeader)) { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(s), s); + ret = ScSetLink(ps->Rpc, &t); + } + else + { + // Error has occurred + ret = ERR_TOO_MANT_ITEMS; + } + } + else + { + // Error has occurred + ret = ERR_OBJECT_EXISTS; + } + + FreeHttpHeader(header); + } + + if (ret != ERR_NO_ERROR) + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PsCascadeHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + {"NAME", CmdPrompt, _UU("CMD_CascadeHttpHeader_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + if (ret == ERR_NO_ERROR) + { + UINT i = 0; + TOKEN_LIST *tokens = NULL; + char *value = GetParamStr(o, "NAME"); + + Zero(t.ClientOption->CustomHttpHeader, sizeof(t.ClientOption->CustomHttpHeader)); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + if (StartWith(tokens->Token[i], value) == false) + { + StrCat(t.ClientOption->CustomHttpHeader, sizeof(t.ClientOption->CustomHttpHeader), tokens->Token[i]); + StrCat(t.ClientOption->CustomHttpHeader, 1, "\r\n"); + } + } + + ret = ScSetLink(ps->Rpc, &t); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + // Release of the parameter list + FreeParamValueList(o); + + return ret; +} + +UINT PsCascadeHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) +{ + LIST *o; + PS *ps = (PS *)param; + UINT ret = ERR_NO_ERROR; + RPC_CREATE_LINK t; + + // Parameter list that can be specified + PARAM args[] = + { + // "name", prompt_proc, prompt_param, eval_proc, eval_param + {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, + }; + + // If virtual HUB is not selected, it's an error + if (ps->HubName == NULL) + { + c->Write(c, _UU("CMD_Hub_Not_Selected")); + return ERR_INVALID_PARAMETER; + } + + // Get the parameter list + o = ParseCommandList(c, cmd_name, str, args, sizeof(args) / sizeof(args[0])); + if (o == NULL) + { + return ERR_INVALID_PARAMETER; + } + + // RPC call + Zero(&t, sizeof(t)); + StrCpy(t.HubName, sizeof(t.HubName), ps->HubName); + t.ClientOption = ZeroMalloc(sizeof(CLIENT_OPTION)); + UniStrCpy(t.ClientOption->AccountName, sizeof(t.ClientOption->AccountName), GetParamUniStr(o, "[name]")); + ret = ScGetLink(ps->Rpc, &t); + + // Release of the parameter list + FreeParamValueList(o); + + if (ret == ERR_NO_ERROR) + { + wchar_t unistr[HTTP_CUSTOM_HEADER_MAX_SIZE]; + TOKEN_LIST *tokens = NULL; + UINT i = 0; + CT *ct = CtNew(); + CtInsertColumn(ct, _UU("CMD_CT_STD_COLUMN_1"), false); + + tokens = ParseToken(t.ClientOption->CustomHttpHeader, "\r\n"); + + for (i = 0; i < tokens->NumTokens; i++) + { + StrToUni(unistr, sizeof(unistr), tokens->Token[i]); + CtInsert(ct, unistr); + } + + CtFreeEx(ct, c, false); + } + else + { + // Error has occurred + CmdPrintError(c, ret); + } + + FreeRpcCreateLink(&t); + + return ret; +} + // Set the cascade connection method to the TCP/IP direct connection mode UINT PsCascadeProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) { @@ -13593,7 +14051,7 @@ UINT PsCascadeProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) // "name", prompt_proc, prompt_param, eval_proc, eval_param {"[name]", CmdPrompt, _UU("CMD_CascadeCreate_Prompt_Name"), CmdEvalNotEmpty, NULL}, }; - + // If virtual HUB is not selected, it's an error if (ps->HubName == NULL) { diff --git a/src/Cedar/Command.h b/src/Cedar/Command.h index d56e32bb..520eb742 100644 --- a/src/Cedar/Command.h +++ b/src/Cedar/Command.h @@ -453,6 +453,9 @@ UINT PcAccountEncryptDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *par UINT PcAccountEncryptEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PcAccountCompressEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PcAccountCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PcAccountHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PcAccountHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PcAccountHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PcAccountProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PcAccountProxyHttp(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PcAccountProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); @@ -591,6 +594,9 @@ UINT PsCascadeEncryptEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *para UINT PsCascadeEncryptDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PsCascadeCompressEnable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PsCascadeCompressDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PsCascadeHttpHeaderAdd(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PsCascadeHttpHeaderDelete(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); +UINT PsCascadeHttpHeaderGet(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PsCascadeProxyNone(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PsCascadeProxyHttp(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); UINT PsCascadeProxySocks(CONSOLE *c, char *cmd_name, wchar_t *str, void *param); diff --git a/src/Cedar/Connection.h b/src/Cedar/Connection.h index 2b2c570c..53ac30d5 100644 --- a/src/Cedar/Connection.h +++ b/src/Cedar/Connection.h @@ -163,34 +163,35 @@ struct RC4_KEY_PAIR // Client Options struct CLIENT_OPTION { - wchar_t AccountName[MAX_ACCOUNT_NAME_LEN + 1]; // Connection setting name - char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name - UINT Port; // Port number - UINT PortUDP; // UDP port number (0: Use only TCP) - UINT ProxyType; // Type of proxy - char ProxyName[MAX_HOST_NAME_LEN + 1]; // Proxy server name - UINT ProxyPort; // Port number of the proxy server - char ProxyUsername[MAX_PROXY_USERNAME_LEN + 1]; // Maximum user name length - char ProxyPassword[MAX_PROXY_PASSWORD_LEN + 1]; // Maximum password length - UINT NumRetry; // Automatic retries - UINT RetryInterval; // Retry interval - char HubName[MAX_HUBNAME_LEN + 1]; // HUB name - UINT MaxConnection; // Maximum number of concurrent TCP connections - bool UseEncrypt; // Use encrypted communication - bool UseCompress; // Use data compression - bool HalfConnection; // Use half connection in TCP - bool NoRoutingTracking; // Disable the routing tracking - char DeviceName[MAX_DEVICE_NAME_LEN + 1]; // VLAN device name - UINT AdditionalConnectionInterval; // Connection attempt interval when additional connection establish - UINT ConnectionDisconnectSpan; // Disconnection interval - bool HideStatusWindow; // Hide the status window - bool HideNicInfoWindow; // Hide the NIC status window - bool RequireMonitorMode; // Monitor port mode - bool RequireBridgeRoutingMode; // Bridge or routing mode - bool DisableQoS; // Disable the VoIP / QoS function - bool FromAdminPack; // For Administration Pack - bool NoUdpAcceleration; // Do not use UDP acceleration mode - UCHAR HostUniqueKey[SHA1_SIZE]; // Host unique key + wchar_t AccountName[MAX_ACCOUNT_NAME_LEN + 1]; // Connection setting name + char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name + UINT Port; // Port number + UINT PortUDP; // UDP port number (0: Use only TCP) + UINT ProxyType; // Type of proxy + char ProxyName[MAX_HOST_NAME_LEN + 1]; // Proxy server name + UINT ProxyPort; // Port number of the proxy server + char ProxyUsername[MAX_PROXY_USERNAME_LEN + 1]; // Maximum user name length + char ProxyPassword[MAX_PROXY_PASSWORD_LEN + 1]; // Maximum password length + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP proxy header + UINT NumRetry; // Automatic retries + UINT RetryInterval; // Retry interval + char HubName[MAX_HUBNAME_LEN + 1]; // HUB name + UINT MaxConnection; // Maximum number of concurrent TCP connections + bool UseEncrypt; // Use encrypted communication + bool UseCompress; // Use data compression + bool HalfConnection; // Use half connection in TCP + bool NoRoutingTracking; // Disable the routing tracking + char DeviceName[MAX_DEVICE_NAME_LEN + 1]; // VLAN device name + UINT AdditionalConnectionInterval; // Connection attempt interval when additional connection establish + UINT ConnectionDisconnectSpan; // Disconnection interval + bool HideStatusWindow; // Hide the status window + bool HideNicInfoWindow; // Hide the NIC status window + bool RequireMonitorMode; // Monitor port mode + bool RequireBridgeRoutingMode; // Bridge or routing mode + bool DisableQoS; // Disable the VoIP / QoS function + bool FromAdminPack; // For Administration Pack + bool NoUdpAcceleration; // Do not use UDP acceleration mode + UCHAR HostUniqueKey[SHA1_SIZE]; // Host unique key }; // Client authentication data diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index 5038e896..d7609f68 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -6022,6 +6022,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) w.ProxyPort = o->ProxyPort; StrCpy(w.ProxyUsername, sizeof(w.ProxyUsername), o->ProxyUsername); StrCpy(w.ProxyPassword, sizeof(w.ProxyPassword), o->ProxyPassword); + StrCpy(w.CustomHttpHeader, sizeof(w.CustomHttpHeader), w.CustomHttpHeader); switch (o->ProxyType) { @@ -6078,9 +6079,7 @@ SOCK *ClientConnectGetSocket(CONNECTION *c, bool additional_connect) PrintStatus(sess, tmp); // Proxy connection - s = ProxyConnectEx(c, w.ProxyHostName, w.ProxyPort, - w.HostName, w.Port, w.ProxyUsername, w.ProxyPassword, - additional_connect, (bool *)cancel_flag, hWnd); + s = ProxyConnectEx3(c, &w, additional_connect, (bool *)cancel_flag, hWnd, 0); if (s == NULL) { // Connection failure @@ -6654,6 +6653,22 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, char *password, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout) +{ + WPC_CONNECT wpc_connect; + Zero(&wpc_connect, sizeof(wpc_connect)); + + StrCpy(wpc_connect.ProxyHostName, sizeof(wpc_connect.ProxyHostName), proxy_host_name); + wpc_connect.ProxyPort = proxy_port; + StrCpy(wpc_connect.HostName, sizeof(wpc_connect.HostName), server_host_name); + wpc_connect.Port = server_port; + StrCpy(wpc_connect.ProxyUsername, sizeof(wpc_connect.ProxyUsername), username); + StrCpy(wpc_connect.ProxyPassword, sizeof(wpc_connect.ProxyPassword), password); + + return ProxyConnectEx3(c, &wpc_connect, additional_connect, cancel_flag, hWnd, timeout); +} +SOCK *ProxyConnectEx3(CONNECTION *c, WPC_CONNECT *wpc_connect, + bool additional_connect, bool *cancel_flag, void *hWnd, + UINT timeout) { SOCK *s = NULL; bool use_auth = false; @@ -6665,17 +6680,16 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char server_host_name_tmp[256]; UINT i, len; // Validate arguments - if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL || - server_port == 0) + if (c == NULL || IsEmptyStr(wpc_connect->ProxyHostName) || wpc_connect->ProxyPort == 0 || IsEmptyStr(wpc_connect->HostName) || wpc_connect->Port == 0) { - if( c != NULL) + if (c != NULL) { c->Err = ERR_PROXY_CONNECT_FAILED; } return NULL; } - if (username != NULL && password != NULL && - (StrLen(username) != 0 || StrLen(password) != 0)) + + if ((IsEmptyStr(wpc_connect->ProxyUsername) || IsEmptyStr(wpc_connect->ProxyPassword)) == false) { use_auth = true; } @@ -6688,7 +6702,7 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, } Zero(server_host_name_tmp, sizeof(server_host_name_tmp)); - StrCpy(server_host_name_tmp, sizeof(server_host_name_tmp), server_host_name); + StrCpy(server_host_name_tmp, sizeof(server_host_name_tmp), wpc_connect->HostName); len = StrLen(server_host_name_tmp); @@ -6701,7 +6715,7 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, } // Connection - s = TcpConnectEx3(proxy_host_name, proxy_port, timeout, cancel_flag, hWnd, true, NULL, false, NULL); + s = TcpConnectEx3(wpc_connect->ProxyHostName, wpc_connect->ProxyPort, timeout, cancel_flag, hWnd, true, NULL, false, NULL); if (s == NULL) { // Failure @@ -6726,27 +6740,61 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, StrToIP(&ip, server_host_name_tmp); IPToStr(iptmp, sizeof(iptmp), &ip); - Format(tmp, sizeof(tmp), "[%s]:%u", iptmp, server_port); + Format(tmp, sizeof(tmp), "[%s]:%u", iptmp, wpc_connect->Port); } else { - Format(tmp, sizeof(tmp), "%s:%u", server_host_name_tmp, server_port); + Format(tmp, sizeof(tmp), "%s:%u", server_host_name_tmp, wpc_connect->Port); } h = NewHttpHeader("CONNECT", tmp, "HTTP/1.0"); - AddHttpValue(h, NewHttpValue("User-Agent", (c->Cedar == NULL ? DEFAULT_USER_AGENT : c->Cedar->HttpUserAgent))); - AddHttpValue(h, NewHttpValue("Host", server_host_name_tmp)); - AddHttpValue(h, NewHttpValue("Content-Length", "0")); - AddHttpValue(h, NewHttpValue("Proxy-Connection", "Keep-Alive")); - AddHttpValue(h, NewHttpValue("Pragma", "no-cache")); - if (use_auth) + if (IsEmptyStr(wpc_connect->CustomHttpHeader) == false) + { + TOKEN_LIST *tokens = ParseToken(wpc_connect->CustomHttpHeader, "\r\n"); + if (tokens != NULL) + { + for (i = 0; i < tokens->NumTokens; i++) + { + AddHttpValueStr(h, tokens->Token[i]); + } + + FreeToken(tokens); + } + } + + if (GetHttpValue(h, "User-Agent") == NULL) + { + AddHttpValue(h, NewHttpValue("User-Agent", (c->Cedar == NULL ? DEFAULT_USER_AGENT : c->Cedar->HttpUserAgent))); + } + + if (GetHttpValue(h, "Host") == NULL) + { + AddHttpValue(h, NewHttpValue("Host", server_host_name_tmp)); + } + + if (GetHttpValue(h, "Content-Length") == NULL) + { + AddHttpValue(h, NewHttpValue("Content-Length", "0")); + } + + if (GetHttpValue(h, "Proxy-Connection") == NULL) + { + AddHttpValue(h, NewHttpValue("Proxy-Connection", "Keep-Alive")); + } + + if (GetHttpValue(h, "Pragma") == NULL) + { + AddHttpValue(h, NewHttpValue("Pragma", "no-cache")); + } + + if (use_auth && GetHttpValue(h, "Proxy-Authorization") == NULL) { wchar_t tmp[MAX_SIZE]; UniFormat(tmp, sizeof(tmp), _UU("STATUS_3"), server_host_name_tmp); // Generate the authentication string Format(auth_tmp_str, sizeof(auth_tmp_str), "%s:%s", - username, password); + wpc_connect->ProxyUsername, wpc_connect->ProxyPassword); // Base64 encode Zero(auth_b64_str, sizeof(auth_b64_str)); diff --git a/src/Cedar/Protocol.h b/src/Cedar/Protocol.h index a7be7f98..a15d3871 100644 --- a/src/Cedar/Protocol.h +++ b/src/Cedar/Protocol.h @@ -265,6 +265,9 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, char *password, bool additional_connect, bool *cancel_flag, void *hWnd, UINT timeout); +SOCK *ProxyConnectEx3(CONNECTION *c, WPC_CONNECT *wpc_connect, + bool additional_connect, bool *cancel_flag, void *hWnd, + UINT timeout); SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port, char *server_host_name, UINT server_port, char *username, bool additional_connect, diff --git a/src/Cedar/SM.c b/src/Cedar/SM.c index 274c7af1..a7aec72a 100644 --- a/src/Cedar/SM.c +++ b/src/Cedar/SM.c @@ -247,6 +247,7 @@ UINT SmProxyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) a.ProxyPort = t->ProxyPort; StrCpy(a.ProxyUsername, sizeof(a.ProxyUsername), t->ProxyUsername); StrCpy(a.ProxyPassword, sizeof(a.ProxyPassword), t->ProxyPassword); + StrCpy(a.CustomHttpHeader, sizeof(a.CustomHttpHeader), t->CustomHttpHeader); if (CmProxyDlg(hWnd, &a)) { @@ -255,6 +256,7 @@ UINT SmProxyDlg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param) t->ProxyPort = a.ProxyPort; StrCpy(t->ProxyUsername, sizeof(t->ProxyUsername), a.ProxyUsername); StrCpy(t->ProxyPassword, sizeof(t->ProxyPassword), a.ProxyPassword); + StrCpy(t->CustomHttpHeader, sizeof(t->CustomHttpHeader), a.CustomHttpHeader); } SmProxyDlgUpdate(hWnd, t); diff --git a/src/Cedar/Server.c b/src/Cedar/Server.c index 724a7290..9c3788b9 100644 --- a/src/Cedar/Server.c +++ b/src/Cedar/Server.c @@ -2945,6 +2945,8 @@ bool SiLoadConfigurationCfg(SERVER *s, FOLDER *root) FreeBuf(pw); } + CfgGetStr(f8, "CustomHttpHeader", t.CustomHttpHeader, sizeof(t.CustomHttpHeader)); + GetMachineHostName(machine_name, sizeof(machine_name)); CfgGetStr(f8, "LocalHostname", machine_name2, sizeof(machine_name2)); @@ -3314,6 +3316,8 @@ FOLDER *SiWriteConfigurationToCfg(SERVER *s) FreeBuf(pw); } + + CfgAddStr(ddns_folder, "CustomHttpHeader", t->CustomHttpHeader); } } diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c index 7ea05e0c..93d09287 100644 --- a/src/Cedar/WinUi.c +++ b/src/Cedar/WinUi.c @@ -4086,6 +4086,186 @@ void LvRename(HWND hWnd, UINT id, UINT pos) ListView_EditLabel(DlgItem(hWnd, id), pos); } +// Enhanced function +LRESULT CALLBACK LvEnhancedProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + WNDPROC func = NULL; + + if (MsIsNt()) + { + func = (WNDPROC)GetPropW(hWnd, L"ORIGINAL_FUNC"); + } + else + { + func = (WNDPROC)GetPropA(hWnd, "ORIGINAL_FUNC"); + } + + if (func == NULL) + { + Debug("LvEnhancedProc(): GetProp() returned NULL!\n"); + return 1; + } + + switch (msg) + { + case WM_HSCROLL: + case WM_VSCROLL: + case WM_MOUSEWHEEL: + { + // Prevent graphical glitches with the edit box by sending the NM_RETURN signal + // to the parent dialog (the parent dialog has to delete the edit box on NM_RETURN) + NMHDR nmh; + nmh.code = NM_RETURN; + nmh.idFrom = GetDlgCtrlID(hWnd); + nmh.hwndFrom = hWnd; + SendMsg(GetParent(hWnd), 0, WM_NOTIFY, nmh.idFrom, (LPARAM)&nmh); + + break; + } + case WM_CLOSE: + // Prevent list view from disappearing after pressing ESC in an edit box + return 0; + case WM_NCDESTROY: + // Restore original function during destruction + LvSetEnhanced(hWnd, 0, false); + } + + if (MsIsNt()) + { + return CallWindowProcW(func, hWnd, msg, wParam, lParam); + } + else + { + return CallWindowProcA(func, hWnd, msg, wParam, lParam); + } +} + +// Toggle enhanced function +void LvSetEnhanced(HWND hWnd, UINT id, bool enable) +{ + // Validate arguments + if (hWnd == NULL) + { + return; + } + + if (enable) + { + if (MsIsNt()) + { + const HANDLE fn = (HANDLE)SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)LvEnhancedProc); + SetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC", fn); + } + else + { + const HANDLE fn = (HANDLE)SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)LvEnhancedProc); + SetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC", fn); + } + } + else + { + if (MsIsNt()) + { + SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC")); + RemovePropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC"); + } + else + { + SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC")); + RemovePropA(DlgItem(hWnd, id), "ORIGINAL_FUNC"); + } + } +} + +// Enhanced function +LRESULT CALLBACK EditBoxEnhancedProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + WNDPROC func = NULL; + + if (MsIsNt()) + { + func = (WNDPROC)GetPropW(hWnd, L"ORIGINAL_FUNC"); + } + else + { + func = (WNDPROC)GetPropA(hWnd, "ORIGINAL_FUNC"); + } + + if (func == NULL) + { + Debug("EditBoxEnhancedProc(): GetProp() returned NULL!\n"); + return 1; + } + + switch (msg) + { + case WM_CHAR: + switch (wParam) + { + // CTRL + A + case 1: + SelectEdit(hWnd, 0); + return 0; + case VK_RETURN: + SendMsg(GetParent(hWnd), 0, WM_KEYDOWN, VK_RETURN, 0); + return 0; + case VK_ESCAPE: + DestroyWindow(hWnd); + return 0; + } + break; + case WM_NCDESTROY: + // Restore original function during destruction + EditBoxSetEnhanced(hWnd, 0, false); + } + + if (MsIsNt()) + { + return CallWindowProcW(func, hWnd, msg, wParam, lParam); + } + else + { + return CallWindowProcA(func, hWnd, msg, wParam, lParam); + } +} + +// Toggle enhanced function +void EditBoxSetEnhanced(HWND hWnd, UINT id, bool enable) +{ + // Validate arguments + if (hWnd == NULL) + { + return; + } + + if (enable) + { + if (MsIsNt()) + { + const HANDLE fn = (HANDLE)SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)EditBoxEnhancedProc); + SetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC", fn); + } + else + { + const HANDLE fn = (HANDLE)SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)EditBoxEnhancedProc); + SetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC", fn); + } + } + else + { + if (MsIsNt()) + { + SetWindowLongPtrW(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC")); + RemovePropW(DlgItem(hWnd, id), L"ORIGINAL_FUNC"); + } + else + { + SetWindowLongPtrA(DlgItem(hWnd, id), GWLP_WNDPROC, (LONG_PTR)GetPropA(DlgItem(hWnd, id), "ORIGINAL_FUNC")); + RemovePropA(DlgItem(hWnd, id), "ORIGINAL_FUNC"); + } + } +} + // Show the menu void PrintMenu(HWND hWnd, HMENU hMenu) { diff --git a/src/Cedar/WinUi.h b/src/Cedar/WinUi.h index b9cb29e0..04820f7a 100644 --- a/src/Cedar/WinUi.h +++ b/src/Cedar/WinUi.h @@ -776,6 +776,8 @@ void RemoveShortcutKeyStrFromMenu(HMENU hMenu); UINT GetMenuNum(HMENU hMenu); void PrintMenu(HWND hWnd, HMENU hMenu); void LvRename(HWND hWnd, UINT id, UINT pos); +void LvSetEnhanced(HWND hWnd, UINT id, bool enable); +void EditBoxSetEnhanced(HWND hWnd, UINT id, bool enable); void AllowFGWindow(UINT process_id); HWND SearchWindow(wchar_t *caption); char *RemoteDlg(HWND hWnd, char *regkey, UINT icon, wchar_t *caption, wchar_t *title, char *default_host); diff --git a/src/Cedar/Wpc.c b/src/Cedar/Wpc.c index b48c70c1..3477cd05 100644 --- a/src/Cedar/Wpc.c +++ b/src/Cedar/Wpc.c @@ -631,9 +631,7 @@ SOCK *WpcSockConnectEx(WPC_CONNECT *param, UINT *error_code, UINT timeout, bool break; case PROXY_HTTP: - sock = ProxyConnectEx2(&c, param->ProxyHostName, param->ProxyPort, - param->HostName, param->Port, - param->ProxyUsername, param->ProxyPassword, false, cancel, NULL, timeout); + sock = ProxyConnectEx3(&c, param, false, cancel, NULL, timeout); if (sock == NULL) { err = c.Err; @@ -687,6 +685,7 @@ SOCK *WpcSockConnect2(char *hostname, UINT port, INTERNET_SETTING *t, UINT *erro c.ProxyPort = t->ProxyPort; StrCpy(c.ProxyUsername, sizeof(c.ProxyUsername), t->ProxyUsername); StrCpy(c.ProxyPassword, sizeof(c.ProxyPassword), t->ProxyPassword); + StrCpy(c.CustomHttpHeader, sizeof(c.CustomHttpHeader), t->CustomHttpHeader); return WpcSockConnect(&c, error_code, timeout); } @@ -779,6 +778,7 @@ BUF *HttpRequestEx3(URL_DATA *data, INTERNET_SETTING *setting, con.ProxyPort = setting->ProxyPort; StrCpy(con.ProxyUsername, sizeof(con.ProxyUsername), setting->ProxyUsername); StrCpy(con.ProxyPassword, sizeof(con.ProxyPassword), setting->ProxyPassword); + StrCpy(con.CustomHttpHeader, sizeof(con.CustomHttpHeader), setting->CustomHttpHeader); if (setting->ProxyType != PROXY_HTTP || data->Secure) { diff --git a/src/Cedar/Wpc.h b/src/Cedar/Wpc.h index 99bf4cb4..daf3df71 100644 --- a/src/Cedar/Wpc.h +++ b/src/Cedar/Wpc.h @@ -126,25 +126,27 @@ // Connection parameters struct WPC_CONNECT { - char HostName[MAX_HOST_NAME_LEN + 1]; // Host name - UINT Port; // Port number - UINT ProxyType; // Type of proxy server - char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name - UINT ProxyPort; // Proxy server port number - char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name - char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password - bool UseCompress; // Use of compression - bool DontCheckCert; // Do not check the certificate + char HostName[MAX_HOST_NAME_LEN + 1]; // Host name + UINT Port; // Port number + UINT ProxyType; // Type of proxy server + char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name + UINT ProxyPort; // Proxy server port number + char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name + char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP header + bool UseCompress; // Use of compression + bool DontCheckCert; // Do not check the certificate }; // Internet connection settings struct INTERNET_SETTING { - UINT ProxyType; // Type of proxy server - char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name - UINT ProxyPort; // Proxy server port number - char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name - char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + UINT ProxyType; // Type of proxy server + char ProxyHostName[MAX_HOST_NAME_LEN + 1]; // Proxy server host name + UINT ProxyPort; // Proxy server port number + char ProxyUsername[MAX_USERNAME_LEN + 1]; // Proxy server user name + char ProxyPassword[MAX_USERNAME_LEN + 1]; // Proxy server password + char CustomHttpHeader[HTTP_CUSTOM_HEADER_MAX_SIZE + 1]; // Custom HTTP header }; // URL diff --git a/src/Mayaqua/Memory.c b/src/Mayaqua/Memory.c index e09da625..3bdc8ada 100644 --- a/src/Mayaqua/Memory.c +++ b/src/Mayaqua/Memory.c @@ -1542,6 +1542,28 @@ bool IsInListStr(LIST *o, char *str) return false; } +bool IsInListUniStr(LIST *o, wchar_t *str) +{ + UINT i; + // Validate arguments + if (o == NULL || str == NULL) + { + return false; + } + + for (i = 0; i < LIST_NUM(o); i++) + { + wchar_t *s = LIST_DATA(o, i); + + if (UniStrCmpi(s, str) == 0) + { + return true; + } + } + + return false; +} + // Get the pointer by scanning by UINT pointer in the list void *ListKeyToPointer(LIST *o, UINT key) { diff --git a/src/Mayaqua/Memory.h b/src/Mayaqua/Memory.h index 5ba61f8b..ba2f1912 100644 --- a/src/Mayaqua/Memory.h +++ b/src/Mayaqua/Memory.h @@ -396,6 +396,7 @@ bool IsInList(LIST *o, void *p); bool IsInListKey(LIST *o, UINT key); void *ListKeyToPointer(LIST *o, UINT key); bool IsInListStr(LIST *o, char *str); +bool IsInListUniStr(LIST *o, wchar_t *str); bool ReplaceListPointer(LIST *o, void *oldptr, void *newptr); void AddInt(LIST *o, UINT i); void AddInt64(LIST *o, UINT64 i); diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 0f31ab15..2f4bf0ce 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -20558,7 +20558,7 @@ HTTP_HEADER *RecvHttpHeader(SOCK *s) str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); if (str == NULL) { - goto LABEL_ERROR; + return NULL; } // Split into tokens @@ -20569,89 +20569,45 @@ HTTP_HEADER *RecvHttpHeader(SOCK *s) } Free(str); - str = NULL; // Creating a header object header = NewHttpHeader(token->Token[0], token->Token[1], token->Token[2]); + FreeToken(token); if (StrCmpi(header->Version, "HTTP/0.9") == 0) { // The header ends with this line - FreeToken(token); return header; } // Get the subsequent lines while (true) { - UINT pos; - HTTP_VALUE *v; - char *value_name, *value_data; str = RecvLine(s, HTTP_HEADER_LINE_MAX_SIZE); - if (str == NULL) - { - goto LABEL_ERROR; - } Trim(str); - - if (StrLen(str) == 0) + if (IsEmptyStr(str)) { // End of header Free(str); - str = NULL; break; } - // Get the position of the colon - pos = SearchStr(str, ":", 0); - if (pos == INFINITE) + if (AddHttpValueStr(header, str) == false) { - // The colon does not exist - goto LABEL_ERROR; - } - if ((pos + 1) >= StrLen(str)) - { - // There is no data goto LABEL_ERROR; } - // Divide into the name and the data - value_name = Malloc(pos + 1); - Copy(value_name, str, pos); - value_name[pos] = 0; - value_data = &str[pos + 1]; - - v = NewHttpValue(value_name, value_data); - if (v == NULL) - { - Free(value_name); - goto LABEL_ERROR; - } - - Free(value_name); - - AddHttpValue(header, v); Free(str); } - FreeToken(token); - return header; LABEL_ERROR: // Memory release - if (token) - { - FreeToken(token); - } - if (str) - { - Free(str); - } - if (header) - { - FreeHttpHeader(header); - } + Free(str); + FreeToken(token); + FreeHttpHeader(header); + return NULL; } @@ -20766,6 +20722,57 @@ void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value) } } +// Adds the HTTP value contained in the string to the HTTP header +bool AddHttpValueStr(HTTP_HEADER* header, char *string) +{ + HTTP_VALUE *value = NULL; + UINT pos = 0; + char *value_name = NULL; + char *value_data = NULL; + + // Validate arguments + if (header == NULL || IsEmptyStr(string)) + { + return false; + } + + // Sanitize string + EnSafeHttpHeaderValueStr(string, ' '); + + // Get the position of the colon + pos = SearchStr(string, ":", 0); + if (pos == INFINITE) + { + // The colon does not exist + return false; + } + + if ((pos + 1) >= StrLen(string)) + { + // There is no data + return false; + } + + // Divide into the name and the data + value_name = Malloc(pos + 1); + Copy(value_name, string, pos); + value_name[pos] = 0; + value_data = &string[pos + 1]; + + value = NewHttpValue(value_name, value_data); + if (value == NULL) + { + Free(value_name); + return false; + } + + Free(value_name); + + AddHttpValue(header, value); + + return true; +} + // Create an HTTP header HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version) { diff --git a/src/Mayaqua/Network.h b/src/Mayaqua/Network.h index f2e47ae8..66458c49 100644 --- a/src/Mayaqua/Network.h +++ b/src/Mayaqua/Network.h @@ -1001,6 +1001,8 @@ struct HTTP_HEADER #define HTTP_VPN_TARGET_POSTDATA "VPNCONNECT" #define HTTP_SAITAMA "/saitama.jpg" #define HTTP_PICTURES "/picture" +// Maximum size of the custom HTTP header +#define HTTP_CUSTOM_HEADER_MAX_SIZE 1024 // Maximum size of a single line in the HTTP header #define HTTP_HEADER_LINE_MAX_SIZE 4096 // Maximum number of lines in the HTTP header @@ -1029,6 +1031,7 @@ int GetCurrentTimezoneWin32(); HTTP_VALUE *GetHttpValue(HTTP_HEADER *header, char *name); void AddHttpValue(HTTP_HEADER *header, HTTP_VALUE *value); +bool AddHttpValueStr(HTTP_HEADER* header, char *string); HTTP_HEADER *NewHttpHeader(char *method, char *target, char *version); HTTP_HEADER *NewHttpHeaderEx(char *method, char *target, char *version, bool no_sort); int CompareHttpValue(void *p1, void *p2); diff --git a/src/Mayaqua/Str.c b/src/Mayaqua/Str.c index 95cc515a..ef1ee4eb 100644 --- a/src/Mayaqua/Str.c +++ b/src/Mayaqua/Str.c @@ -2027,6 +2027,53 @@ void EnSafeStr(char *str, char replace) } } +// Replace '\r' and '\n' with the specified character. +// If the specified character is a space (unsafe), the original character is removed. +void EnSafeHttpHeaderValueStr(char *str, char replace) +{ + UINT length = 0; + UINT index = 0; + + // Validate arguments + if (str == NULL) + { + return; + } + + length = StrLen(str); + while (index < length) + { + if (str[index] == '\r' || str[index] == '\n') + { + if (replace == ' ') + { + Move(&str[index], &str[index + 1], length - index); + } + else + { + str[index] = replace; + } + } + else if (str[index] == '\\') + { + if (str[index + 1] == 'r' || str[index + 1] == 'n') + { + if (replace == ' ') + { + Move(&str[index], &str[index + 2], length - index); + index--; + } + else + { + str[index] = str[index + 1] = replace; + index++; + } + } + } + index++; + } +} + // Operation check of string library bool CheckStringLibrary() { diff --git a/src/Mayaqua/Str.h b/src/Mayaqua/Str.h index cb8c1e06..252769a0 100644 --- a/src/Mayaqua/Str.h +++ b/src/Mayaqua/Str.h @@ -177,6 +177,7 @@ void EnPrintableAsciiStr(char *str, char replace); bool IsSafeChar(char c); bool IsSafeStr(char *str); void EnSafeStr(char *str, char replace); +void EnSafeHttpHeaderValueStr(char *str, char replace); void TruncateCharFromStr(char *str, char replace); char *CopyStr(char *str); void BinToStr(char *str, UINT str_size, void *data, UINT data_size); diff --git a/src/PenCore/PenCore.rc b/src/PenCore/PenCore.rc index 9fe7f4cf..392a1ed8 100644 --- a/src/PenCore/PenCore.rc +++ b/src/PenCore/PenCore.rc @@ -175,6 +175,14 @@ BEGIN BOTTOMMARGIN, 126 END + D_CM_PROXY_HTTP_HEADER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 248 + TOPMARGIN, 5 + BOTTOMMARGIN, 126 + END + D_CM_DETAIL, DIALOG BEGIN LEFTMARGIN, 7 @@ -1586,12 +1594,26 @@ BEGIN EDITTEXT E_USERNAME,85,68,99,11,ES_AUTOHSCROLL RTEXT "@STATIC5",IDC_STATIC,7,86,74,9 EDITTEXT E_PASSWORD,85,84,99,11,ES_PASSWORD | ES_AUTOHSCROLL + PUSHBUTTON "@B_HTTP_HEADER", B_HTTP_HEADER, 7, 110, 100, 15, 0, WS_EX_LEFT DEFPUSHBUTTON "@IDOK",IDOK,115,110,64,15 PUSHBUTTON "@IDCANCEL",IDCANCEL,184,110,64,15 LTEXT "@STATIC6",IDC_STATIC,191,70,57,12 LTEXT "@STATIC7",IDC_STATIC,191,86,57,11 END +D_CM_PROXY_HTTP_HEADER DIALOGEX 0, 0, 255, 131 +STYLE DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU +CAPTION "@D_CM_PROXY_HTTP_HEADER" +FONT 9, "MS Shell Dlg", 400, 0, 0x80 +{ + DEFPUSHBUTTON "@IDOK", IDOK, 115, 110, 64, 15, 0, WS_EX_LEFT + PUSHBUTTON "@IDCANCEL", IDCANCEL, 184, 110, 64, 15, 0, WS_EX_LEFT + CONTROL "", L_VALUES_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 5, 186, 100, WS_EX_LEFT + PUSHBUTTON "@B_NEW", B_NEW, 198, 5, 50, 15, 0, WS_EX_LEFT + PUSHBUTTON "@B_DELETE", B_DELETE, 198, 25, 50, 15, 0, WS_EX_LEFT + PUSHBUTTON "@B_CLEAR", B_CLEAR, 198, 60, 50, 15, 0, WS_EX_LEFT +} + D_CM_DETAIL DIALOGEX 0, 0, 435, 312 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "@D_CM_DETAIL" diff --git a/src/PenCore/resource.h b/src/PenCore/resource.h index 36f63eb8..bb4eca31 100644 --- a/src/PenCore/resource.h +++ b/src/PenCore/resource.h @@ -935,7 +935,7 @@ #define R_UNESTABLISHED 1435 #define R_USER 1435 #define R_CUSTOM 1435 -#define S_DISABLE 1435 +#define S_DISABLE 1435 #define R_PERMANENT 1435 #define R_FOR_SYSTEM 1436 #define IDC_NETADDRESS1 1437 @@ -1026,6 +1026,10 @@ #define S_TSUKUBA 1515 #define R_DISABLE_NATT 1516 #define S_SMARTCARD_ICON 1517 +#define L_VALUES_LIST 1519 +#define B_HTTP_HEADER 1520 +#define B_NEW 1521 +#define B_CLEAR 1522 #define B_ONLINE 1655 #define D_NM_CONNECT 1998 #define D_NM_MAIN 1999 @@ -1136,6 +1140,7 @@ #define D_VGS_WARNING 2096 #define D_DEFAULT3 2097 #define D_NM_PUSH 2097 +#define D_CM_PROXY_HTTP_HEADER 2098 #define ID_Menu40011 40011 #define CMD_CONNECT 40020 #define CMD_STATUS 40021 @@ -1208,7 +1213,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 244 #define _APS_NEXT_COMMAND_VALUE 40111 -#define _APS_NEXT_CONTROL_VALUE 1518 +#define _APS_NEXT_CONTROL_VALUE 1521 #define _APS_NEXT_SYMED_VALUE 102 #endif #endif diff --git a/src/bin/hamcore/strtable_cn.stb b/src/bin/hamcore/strtable_cn.stb index ea3cf0e9..023ae8a2 100644 --- a/src/bin/hamcore/strtable_cn.stb +++ b/src/bin/hamcore/strtable_cn.stb @@ -946,6 +946,8 @@ CM_STOP_INST_VLAN_1 要想在此计算机上安装虚拟网络适配器,您 CM_STOP_INST_VLAN_2 要想在此计算机上安装虚拟网络适配器,您必须在“控制台会话”下启动 VPN Client 管理器。\r\n\r\n目前,此计算机上已安装 %s,且用户已登入远程会话 (会话ID: %u) 而不是控制台进程。\r\n若要安装虚拟网络适配器,必须在“控制台会话”下启动 VPN Client 管理器。\r\n(目前用户并未登入到控制台会话 (会话ID: 0)。) \r\n\r\n首先使用切换用户功能从本地登入到计算机,或在远程桌面使用 “/console” 论据功能,或切换计算机的本地控制台设备,之后启动 VPN Client 管理器,并安装虚拟网络适配器。 CM_SHORTCUT_DESKTOP_MSG 若要使用 VPN 连接设置快捷方式启动连接,您必须在“控制台会话”下运行快捷方式文件。\r\n\r\n目前用户作为远程会话 (会话ID: %u) 登入而不是控制台会话。 CM_HTTP_PROXY_WARNING 已选择“通过 HTTP 代理服务器连接”。\r\n\r\n一般情况下,HTTP 服务器只允许两种 TCP 端口作为连接到目标服务器的端口号: HTTP 协议 (TCP 端口号 80) 和 HTTPS 协议 (TCP 端口号 443)。\r\n(同样,也有的代理服务器提供更宽泛的 TCP 端口供连接使用。) \r\n\r\n当通过一台禁用除 HTTP 端口或 HTTPS 端口的 HTTP 代理服务器建立 VPN 连接时,您必须指定 443 (HTTPS 协议) 作为目标 VPN Server 的端口号。\r\n\r\n要检查您当前使用的 HTTP 代理服务器是否允许 80 或 443 意外的端口,请与 HTTP 代理服务器的管理员联系。\r\n\r\n目前 %d 指定为目标 VPN Server 的端口号。您是否要更改端口号为 443 (HTTPS 协议) ?\r\n(您所连接的 VPN Server 的 443 端口必须被设为监听状态并且空闲。) \r\n如果您无法确定,请与系统管理员或网络管理员联系。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 密码已更改。 CM_ACCOUNT_SETTING_FILE VPN 连接设置文件 (*.VPN)|*.vpn|所有文件 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 输入要导出的 VPN 连接设置文件的文件名 @@ -2355,12 +2357,22 @@ STATIC2 主机名(&H): STATIC3 端口(&A): STATIC4 用户名(&U): STATIC5 密码(&P): +B_HTTP_HEADER Custom HTTP header values IDOK 确定(&O) IDCANCEL 取消 STATIC6 (可选) STATIC7 (可选) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 高级设置 STATIC1 为系统管理员,和在网络,通信协议,安全方面有一定了解的用户提供了可选择的设置。可以由此来自定义 VPN 通信协议设置。为系统管理员和专家在网络、通信协议和安全方面提供可选设置。自定义 VPN 协议的通信设置。 @@ -5329,6 +5341,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 指定级联名称来改变设置。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 命令 CMD_CascadeProxyNone 将级联的连接方法设置为直接与 TCP/IP 连接 CMD_CascadeProxyNone_Help 指定已经在当前虚拟 HUB 注册的级联连接,当此连接和 VPN Server 之间通信时,设置连接方法为 [直接与 TCP/IP 连接],而不通过代理服务器。\n此命令在集群虚拟 HUB 中不能运行。 @@ -6640,6 +6681,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 指定要更改设置的连接设置名。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 命令 CMD_AccountProxyNone 将连接设置的连接方法直接设置为 TCP/IP 连接 CMD_AccountProxyNone_Help 当指定注册到 VPN Client 的连接设置,将其连接设置与 VPN Server 间进行 VPN 连接时使用的连接方法设置为 [直接 TCP/IP连接],不通过代理服务器。 diff --git a/src/bin/hamcore/strtable_en.stb b/src/bin/hamcore/strtable_en.stb index 92d79b91..5135a137 100644 --- a/src/bin/hamcore/strtable_en.stb +++ b/src/bin/hamcore/strtable_en.stb @@ -937,6 +937,8 @@ CM_STOP_INST_VLAN_1 To install a Virtual Network Adapter on this computer you m CM_STOP_INST_VLAN_2 To install a Virtual Network Adapter on this computer you must start the VPN Client Manager within a "Console Session". \r\n\r\nCurrently, %s is installed on this computer and the current user is not logged into the Console Session but rather is logged in as the remote session (session ID: %u).\r\nTo install a Virtual Network Adapter you must start the VPN Client Manager within a "Console Session". \r\n(Currently the user is not logged on to the Console Session (Session ID: 0).) \r\n\r\nFirst log on to the computer locally by using the user switching function, or the /console switch function that is on the remote desktop, or alternatively the computer's local console device and then start the VPN Client Manager and install the Virtual Network Adapter. CM_SHORTCUT_DESKTOP_MSG To start a connection using the shortcut to the VPN Connection Setting, you must launch the shortcut file within the "Console Session". \r\n\r\nCurrently the user is logged on as the remote session (session ID: %u) and not as the Console Session. CM_HTTP_PROXY_WARNING Connect via HTTP Proxy Server is selected. \r\n\r\nIn many cases, the HTTP proxy server will only allow 2 kinds of TCP port to be used for the connection to the destination server port number, HTTP protocol (TCP port number 80) and HTTPS protocol (TCP port number 443). \r\n(There are also cases when the proxy server does allow a wider choice of TCP port for connection.) \r\n\r\nWhen making a VPN connection via an HTTP proxy server that denies connections to server ports other than HTTP ports or HTTPS ports, you must specify 443 (HTTPS protocol) as the destination VPN Server port number. \r\n\r\nTo check whether the HTTP proxy server you are connecting via allows connection to ports other than port numbers 80 or 443, contact the administrator of the HTTP proxy server. \r\n\r\nCurrently, %d is specified as the destination VPN Server port number. Do you want to change the port number to 443 (HTTPS protocol)?\r\n(The port 443 of the VPN Servers you connect to must be set to listening status and ready for connection.) \r\nIf you are unsure, then contact the system administrator or the network administrator. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED The password has been changed. CM_ACCOUNT_SETTING_FILE VPN Connection Setting Files (*.VPN)|*.vpn|All Files (*.*)|*.* CM_ACCOUNT_SAVE_TITLE Enter a VPN Connection Setting File's File Name for the Export Destination @@ -2335,12 +2337,22 @@ STATIC2 &Host Name: STATIC3 Port: STATIC4 &User Name: STATIC5 &Password: +B_HTTP_HEADER Custom HTTP header values IDOK &OK IDCANCEL Cancel STATIC6 (optional) STATIC7 (optional) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION Advanced Settings STATIC1 Optional settings for system administrators and experts for networking, communication protocol, and security. Customize the VPN protocol communication settings. @@ -5312,6 +5324,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone command CMD_CascadeProxyNone Specify Direct TCP/IP Connection as the Connection Method of Cascade Connection CMD_CascadeProxyNone_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. @@ -6626,6 +6667,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone command CMD_AccountProxyNone Specify Direct TCP/IP Connection as the Connection Method of VPN Connection Setting CMD_AccountProxyNone_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. diff --git a/src/bin/hamcore/strtable_ja.stb b/src/bin/hamcore/strtable_ja.stb index 6448ea2f..5737e079 100644 --- a/src/bin/hamcore/strtable_ja.stb +++ b/src/bin/hamcore/strtable_ja.stb @@ -940,6 +940,8 @@ CM_STOP_INST_VLAN_1 このコンピュータで仮想 LAN カードのインス CM_STOP_INST_VLAN_2 このコンピュータで仮想 LAN カードのインストール作業を行うには、「コンソールセッション」 上で VPN クライアント接続マネージャを起動する必要があります。\r\n\r\n現在、このコンピュータには%sがインストールされており、現在のユーザーはコンソールセッションではなくリモートセッション (セッション ID: %u) としてログオンしています。\r\n仮想 LAN カードのインストール作業を行うには、コンソールセッション上で VPN クライアント接続マネージャを起動する必要があります。\r\n(現在、コンソールセッション (セッション ID: 0) にはユーザーがログオンしていません。)\r\n\r\nユーザーの切り替え機能を使用するか、リモートデスクトップの /console スイッチ機能を使用するか、またはコンピュータのローカルコンソールデバイスを使用してコンピュータにローカルログオンしてから VPN クライアント接続マネージャを起動し、仮想 LAN カードのインストール作業を行ってください。 CM_SHORTCUT_DESKTOP_MSG 接続設定へのショートカットを使用して接続を開始するには、「コンソールセッション」上でショートカットファイルを起動する必要があります。\r\n\r\n現在のユーザーはコンソールセッションではなくリモートセッション (セッション ID: %u) としてログオンしています。 CM_HTTP_PROXY_WARNING [HTTP プロキシサーバー経由接続] が選択されています。\r\n\r\n多くの場合、HTTP プロキシサーバーは接続先サーバーのポート番号として、HTTP プロトコル (TCP ポート 80 番) および HTTPS プロトコル (TCP ポート 443 番) の 2 種類の TCP ポートに対する接続のみを許可しています。\r\n(プロキシサーバーが任意の TCP ポートに対する接続を許可している場合もあります。)\r\n\r\nHTTP ポートまたは HTTPS ポート以外へのサーバー ポートへの接続を禁止している HTTP プロキシサーバーを経由して VPN 接続を行う場合は、接続先 VPN Server のポート番号は 443 (HTTPS プロトコル) に指定する必要があります。\r\n\r\n経由する HTTP プロキシサーバーが 80 番または 443 番ポート以外への接続を許可しているかどうかを確認するには、HTTP プロキシサーバーの管理者にお問い合わせください。\r\n\r\n現在、接続先 VPN Server のポート番号は %d が指定されていますが、ポート番号を 443 番 (HTTPS プロトコル) に変更しますか?\r\n(接続する VPN Server のポート 443 において接続を待ち受ける設定になっている必要があります。)\r\n不明な場合は、システム管理者またはネットワーク管理者にお問い合わせください。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED パスワードが変更されました。 CM_ACCOUNT_SETTING_FILE 接続設定ファイル (*.VPN)|*.vpn|すべてのファイル (*.*)|*.* CM_ACCOUNT_SAVE_TITLE エクスポート先の接続設定ファイル名を入力してください。 @@ -2340,12 +2342,22 @@ STATIC2 ホスト名(&H): STATIC3 ポート番号(&A): STATIC4 ユーザー名(&U): STATIC5 パスワード(&P): +B_HTTP_HEADER Custom HTTP header values IDOK &OK IDCANCEL キャンセル STATIC6 (オプション) STATIC7 (オプション) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 高度な通信設定 STATIC1 ネットワーク、通信プロトコル、およびセキュリティに関する詳しい知識をお持ちの方とシステム管理者向けのオプションです。VPN プロトコルの通信設定をカスタマイズできます。 @@ -5313,6 +5325,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 設定を変更するカスケード接続の名前を指定します。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone コマンド CMD_CascadeProxyNone カスケード接続の接続方法を直接 TCP/IP 接続に設定 CMD_CascadeProxyNone_Help 現在管理している仮想 HUB に登録されているカスケード接続を指定し、そのカスケード接続が VPN Server に対して接続する際に、使用する接続方法を [直接 TCP/IP 接続] に設定し、プロキシサーバーを経由しないようにします。\nこのコマンドは、クラスタとして動作している VPN Server の仮想 HUB では実行できません。 @@ -6632,6 +6673,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 設定を変更する接続設定の名前を指定します。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone コマンド CMD_AccountProxyNone 接続設定の接続方法を直接 TCP/IP 接続に設定 CMD_AccountProxyNone_Help VPN Client に登録されている接続設定を指定し、その接続設定が VPN Server に対して接続する際に使用する接続方法を [直接 TCP/IP 接続] に設定し、プロキシサーバーを経由しないようにします。 diff --git a/src/bin/hamcore/strtable_ko.stb b/src/bin/hamcore/strtable_ko.stb index d79cb543..d4edff18 100644 --- a/src/bin/hamcore/strtable_ko.stb +++ b/src/bin/hamcore/strtable_ko.stb @@ -941,6 +941,8 @@ CM_STOP_INST_VLAN_1 이 컴퓨터에서 가상 LAN 카드의 설치 작업을 CM_STOP_INST_VLAN_2 이 컴퓨터에서 가상 LAN 카드의 설치 작업을 수행하려면 "콘솔 세션"에 VPN 클라이언트 연결 관리자를 시작해야합니다. \r\n\r\n 현재이 컴퓨터는 %s가 설치되어 있으며, 현재 사용자가 콘솔 세션이 아닌 원격 세션 (세션 ID:%u)로 로그온합니다. \r\n 가상 LAN 카드의 설치 작업은 콘솔 세션에서 VPN 클라이언트 연결 관리자를 시작해야합니다. \r\n (현재 콘솔 세션 (세션 ID:0)은 사용자가 로그온하지 않습니다.) \r\n\r\n 사용자 전환 기능을 사용하거나 원격 데스크톱의/console 스위치 기능 를 사용하거나 컴퓨터의 로컬 콘솔 장치를 사용하여 컴퓨터에 로컬로 로그온 한 후 VPN 클라이언트 연결 관리자를 시작하고 가상 LAN 카드의 설치 작업을 수행합니다. CM_SHORTCUT_DESKTOP_MSG 연결 설정의 단축키를 사용하여 연결을 시작하려면 "콘솔 세션"에 바로 가기 파일을 시작해야합니다. \r\n\r\n 현재 사용자가 콘솔 세션이 아닌 원격 세션 (세션 ID:%u)로 로그온합니다. CM_HTTP_PROXY_WARNING HTTP 프록시 서버를 통해 연결이 선택되어 있습니다. \r\n\r\n 종종 HTTP 프록시 서버는 연결할 서버의 포트 번호로 HTTP 프로토콜 (TCP 80 번 포트) 및 HTTPS 프로토콜 (TCP 포트 443)의 2 종류의 TCP 포트에 연결 만 를 허용하고 있습니다. \r\n (프록시 서버가 임의의 TCP 포트에 대한 연결을 허용하는 경우도 있습니다.) \r\n\r\nHTTP 또는 HTTPS 포트 이외의 서버 포트에 연결을 금지하고있는 HTTP 프록시 서버를 통해 VPN 연결을 할 경우 연결된 VPN Server의 포트 번호는 443 (HTTPS 프로토콜)에 지정해야합니다. \r\n\r\n 통해 HTTP 프록시 서버가 80 번 또는 443 번 포트 이외의 연결을 허용하는지 여부를 확인하려면 HTTP 프록시 서버의 관리자에게 문의하십시오. \r\n\r\n 현재 연결된 VPN Server의 포트 번호는 %d가 지정되어 있지만 포트 번호를 443 (HTTPS 프로토콜)로 변경 하시겠습니까? \r\n (연결하는 VPN Server의 포트 443에서 연결을 기다리는 설정되어 있어야합니다.) \r\n 알 수없는 경우 시스템 관리자 또는 네트워크 관리자에게 문의하십시오. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 비밀번호가 변경되었습니다. CM_ACCOUNT_SETTING_FILE 연결 설정 파일 (* .VPN)|* .vpn|모든 파일 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 대상의 연결 설정 파일 이름을 입력하십시오. @@ -2317,12 +2319,22 @@ STATIC2 호스트 이름 (&H): STATIC3 포트 번호 (&A): STATIC4 사용자 이름 (&U): STATIC5 비밀번호 (&P): +B_HTTP_HEADER Custom HTTP header values IDOK & OK IDCANCEL 취소 STATIC6 (옵션) STATIC7 (옵션) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 고급 통신 설정 STATIC1 네트워크 통신 프로토콜 및 보안 관련 지식을 가지고 계신 분 및 시스템 관리자를위한 옵션입니다. VPN 프로토콜의 통신 설정을 조정할 수 있습니다. @@ -5290,6 +5302,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 설정을 변경 계단식의 이름을 지정합니다. +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 명령 CMD_CascadeProxyNone 계단식 연결 방법을 직접 TCP/IP 연결 설정 CMD_CascadeProxyNone_Help 현재 관리하고있는 가상 HUB에 등록되어있는 계단식 지정하고 계단식가 VPN Server에 연결할 때 사용할 연결 방법을 [직접 TCP/IP 연결을 설정하고 프록시 서버를 경유하지 않도록합니다. \n이 명령은 클러스터로 작동하는 VPN Server의 가상 HUB에서는 실행되지 않습니다. @@ -6606,6 +6647,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 설정을 변경하려면 연결 설정의 이름을 지정합니다. +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 명령 CMD_AccountProxyNone 연결 설정의 연결 방법을 직접 TCP/IP 연결 설정 CMD_AccountProxyNone_Help VPN Client에 등록되어있는 연결 설정을 지정하고 연결 설정 VPN Server에 연결할 때 사용하는 연결 방법을 [직접 TCP/IP 연결을 설정하고 프록시 서버를 경유하지 않도록 합니다. diff --git a/src/bin/hamcore/strtable_ru.stb b/src/bin/hamcore/strtable_ru.stb index 7e45dd18..8ff19c2e 100644 --- a/src/bin/hamcore/strtable_ru.stb +++ b/src/bin/hamcore/strtable_ru.stb @@ -937,6 +937,8 @@ CM_STOP_INST_VLAN_1 To install a Virtual Network Adapter on this computer you m CM_STOP_INST_VLAN_2 To install a Virtual Network Adapter on this computer you must start the VPN Client Manager within a "Console Session". \r\n\r\nCurrently, %s is installed on this computer and the current user is not logged into the Console Session but rather is logged in as the remote session (session ID: %u).\r\nTo install a Virtual Network Adapter you must start the VPN Client Manager within a "Console Session". \r\n(Currently the user is not logged on to the Console Session (Session ID: 0).) \r\n\r\nFirst log on to the computer locally by using the user switching function, or the /console switch function that is on the remote desktop, or alternatively the computer's local console device and then start the VPN Client Manager and install the Virtual Network Adapter. CM_SHORTCUT_DESKTOP_MSG To start a connection using the shortcut to the VPN Connection Setting, you must launch the shortcut file within the "Console Session". \r\n\r\nCurrently the user is logged on as the remote session (session ID: %u) and not as the Console Session. CM_HTTP_PROXY_WARNING Connect via HTTP Proxy Server is selected. \r\n\r\nIn many cases, the HTTP proxy server will only allow 2 kinds of TCP port to be used for the connection to the destination server port number, HTTP protocol (TCP port number 80) and HTTPS protocol (TCP port number 443). \r\n(There are also cases when the proxy server does allow a wider choice of TCP port for connection.) \r\n\r\nWhen making a VPN connection via an HTTP proxy server that denies connections to server ports other than HTTP ports or HTTPS ports, you must specify 443 (HTTPS protocol) as the destination VPN Server port number. \r\n\r\nTo check whether the HTTP proxy server you are connecting via allows connection to ports other than port numbers 80 or 443, contact the administrator of the HTTP proxy server. \r\n\r\nCurrently, %d is specified as the destination VPN Server port number. Do you want to change the port number to 443 (HTTPS protocol)?\r\n(The port 443 of the VPN Servers you connect to must be set to listening status and ready for connection.) \r\nIf you are unsure, then contact the system administrator or the network administrator. +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED The password has been changed. CM_ACCOUNT_SETTING_FILE VPN Connection Setting Files (*.VPN)|*.vpn|All Files (*.*)|*.* CM_ACCOUNT_SAVE_TITLE Enter a VPN Connection Setting File's File Name for the Export Destination @@ -2335,12 +2337,22 @@ STATIC2 &Host Name: STATIC3 Port: STATIC4 &User Name: STATIC5 &Password: +B_HTTP_HEADER Custom HTTP header values IDOK &OK IDCANCEL Cancel STATIC6 (optional) STATIC7 (optional) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION Advanced Settings STATIC1 Optional settings for system administrators and experts for networking, communication protocol, and security. Customize the VPN protocol communication settings. @@ -5296,6 +5308,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] Specify the name of the Cascade Connection whose setting you want to change. +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone command CMD_CascadeProxyNone Specify Direct TCP/IP Connection as the Connection Method of Cascade Connection CMD_CascadeProxyNone_Help When a Cascade Connection registered on the currently managed Virtual Hub is specified and that Cascade Connection connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. \nYou cannot execute this command for Virtual Hubs of VPN Servers operating as a cluster. @@ -6610,6 +6651,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone command CMD_AccountProxyNone Specify Direct TCP/IP Connection as the Connection Method of VPN Connection Setting CMD_AccountProxyNone_Help When a VPN Connection Setting registered on the VPN Client is specified and that VPN Connection Setting connects to a VPN Server, use this to set Direct TCP/IP Connection as the connection method to use, in which case the connection route will not be via a proxy server. diff --git a/src/bin/hamcore/strtable_tw.stb b/src/bin/hamcore/strtable_tw.stb index 9263e5bf..4b4a7e39 100644 --- a/src/bin/hamcore/strtable_tw.stb +++ b/src/bin/hamcore/strtable_tw.stb @@ -948,6 +948,8 @@ CM_STOP_INST_VLAN_1 要想在此電腦上安裝虛擬網路介面卡,您必 CM_STOP_INST_VLAN_2 要想在此電腦上安裝虛擬網路介面卡,您必須在“控制台會話”下啟動 VPN Client 管理器。\r\n\r\n目前,此電腦上已安裝 %s,且用戶已登入遠端會話 (會話ID: %u) 而不是控制台進程。\r\n若要安裝虛擬網路介面卡,必須在“控制台會話”下啟動 VPN Client 管理器。\r\n(目前用戶並未登入到控制台會話 (會話ID: 0)。) \r\n\r\n首先使用切換用戶功能從本地登入到電腦,或在遠端桌面使用 “/console” 論據功能,或切換電腦的本地控制台設備,之後啟動 VPN Client 管理器,並安裝虛擬網路介面卡。 CM_SHORTCUT_DESKTOP_MSG 若要使用 VPN 連接設置快捷方式啟動連接,您必須在“控制台會話”下運行快捷方式檔。\r\n\r\n目前用戶作為遠端會話 (會話ID: %u) 登入而不是控制台會話。 CM_HTTP_PROXY_WARNING 已選擇“通過 HTTP 代理伺服器連接”。\r\n\r\n一般情況下,HTTP 伺服器只允許兩種 TCP 埠作為連接到目標伺服器的埠號: HTTP 協議 (TCP 埠號 80) 和 HTTPS 協議 (TCP 埠號 443)。\r\n(同樣,也有的代理伺服器提供更寬泛的 TCP 埠供連接使用。) \r\n\r\n當通過一台禁用除 HTTP 埠或 HTTPS 埠的 HTTP 代理伺服器建立 VPN 連接時,您必須指定 443 (HTTPS 協定) 作為目標 VPN Server 的埠號。\r\n\r\n要檢查您當前使用的 HTTP 代理伺服器是否允許 80 或 443 意外的埠,請與 HTTP 代理伺服器的管理員聯繫。\r\n\r\n目前 %d 指定為目標 VPN Server 的埠號。您是否要更改埠號為 443 (HTTPS 協議) ?\r\n(您所連接的 VPN Server 的 443 埠必須被設為監聽狀態並且空閒。) \r\n如果您無法確定,請與系統管理員或網路系統管理員聯繫。 +CM_HTTP_HEADER_COLUMN_0 Name +CM_HTTP_HEADER_COLUMN_1 Value CM_PASSWORD_CHANGED 密碼已更改。 CM_ACCOUNT_SETTING_FILE VPN 連接設置檔案 (*.VPN)|*.vpn|所有檔案 (*.*)|*.* CM_ACCOUNT_SAVE_TITLE 輸入要匯出的 VPN 連接設置檔案的檔案名 @@ -2356,12 +2358,22 @@ STATIC2 主機名稱(&H): STATIC3 埠(&A): STATIC4 用戶名(&U): STATIC5 密碼(&P): +B_HTTP_HEADER Custom HTTP header values IDOK 確定(&O) IDCANCEL 取消 STATIC6 (可選) STATIC7 (可選) +PREFIX D_CM_PROXY_HTTP_HEADER +CAPTION Custom Proxy HTTP Header Values +B_NEW New +B_DELETE Delete +B_CLEAR Clear +IDOK &OK +IDCANCEL Cancel + + PREFIX D_CM_DETAIL CAPTION 進階設置 STATIC1 為系統管理員,和在網路,通信協定,安全方面有一定瞭解的用戶提供了可選擇的設置。可以由此來自訂 VPN 通信協議設置。為系統管理員和專家在網路、通信協定和安全方面提供可選設置。自訂 VPN 協議的通訊設定。 @@ -5329,6 +5341,35 @@ CMD_CascadeCompressDisable_Args CascadeCompressDisable [name] CMD_CascadeCompressDisable_[name] 指定級聯名稱來改變設置。 +# CascadeHttpHeader* commands +CMD_CascadeHttpHeader_Prompt_Name Value name (part before the colon): +CMD_CascadeHttpHeader_Prompt_Data Value data (part after the colon): + + +# CascadeHttpHeaderAdd command +CMD_CascadeHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderAdd_Args CascadeHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_CascadeHttpHeaderAdd_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_CascadeHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# CascadeHttpHeaderDelete command +CMD_CascadeHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderDelete_Args CascadeHttpHeaderDelete [name] [/NAME:name] +CMD_CascadeHttpHeaderDelete_[name] Specify the name of the Cascade Connection whose setting you want to change. +CMD_CascadeHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# CascadeHttpHeaderGet command +CMD_CascadeHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_CascadeHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_CascadeHttpHeaderGet_Args CascadeHttpHeaderGet [name] +CMD_CascadeHttpHeaderGet_[name] Specify the name of the Cascade Connection whose setting you want to get. + + # CascadeProxyNone 命令 CMD_CascadeProxyNone 將級聯的連接方法設置為直接與 TCP/IP 連接 CMD_CascadeProxyNone_Help 指定已經在當前虛擬 HUB 註冊的級聯連接,當此連接和 VPN Server 之間通信時,設置連接方法為 [直接與 TCP/IP 連接],而不通過代理伺服器。\n此命令在集群虛擬 HUB 中不能運行。 @@ -6641,6 +6682,35 @@ CMD_AccountCompressDisable_Args AccountCompressDisable [name] CMD_AccountCompressDisable_[name] 指定要更改設置的連接設置名。 +# AccountHttpHeader* commands +CMD_AccountHttpHeader_Prompt_Name Value name (part before the colon): +CMD_AccountHttpHeader_Prompt_Data Value data (part after the colon): + + +# AccountHttpHeaderAdd command +CMD_AccountHttpHeaderAdd Add a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderAdd_Help Use this to add a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderAdd_Args AccountHttpHeaderAdd [name] [/NAME:name] [/DATA:data] +CMD_AccountHttpHeaderAdd_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderAdd_NAME Specify the name of the custom value (the part before the colon character). +CMD_AccountHttpHeaderAdd_DATA Specify the data of the custom value (the part after the colon character). + + +# AccountHttpHeaderDelete command +CMD_AccountHttpHeaderDelete Delete a custom value in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderDelete_Help Use this to delete a custom value in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderDelete_Args AccountHttpHeaderDelete [name] [/NAME:name] +CMD_AccountHttpHeaderDelete_[name] Specify the name of the VPN Connection Setting whose setting you want to change. +CMD_AccountHttpHeaderDelete_NAME Specify the name of the custom value (the part before the colon character). + + +# AccountHttpHeaderGet command +CMD_AccountHttpHeaderGet Get the list of custom values in the HTTP header sent to the proxy server +CMD_AccountHttpHeaderGet_Help Use this to get the list of custom values in the HTTP header sent to the proxy server. A custom HTTP header can be used to bypass certain restrictions imposed on the network or to avoid speed limitations applied by the QoS. +CMD_AccountHttpHeaderGet_Args AccountHttpHeaderGet [name] +CMD_AccountHttpHeaderGet_[name] Specify the name of the VPN Connection Setting whose setting you want to get. + + # AccountProxyNone 命令 CMD_AccountProxyNone 將連接設置的連接方法直接設置為 TCP/IP 連接 CMD_AccountProxyNone_Help 當指定註冊到 VPN Client 的連接設置,將其連接設置與 VPN Server 間進行 VPN 連接時使用的連接方法設置為 [直接 TCP/IP連接],不通過代理伺服器。