mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Merge PR #857: remove unused functions
This commit is contained in:
commit
3b85a116ff
@ -493,20 +493,6 @@ void DCThread(THREAD *thread, void *param)
|
|||||||
FreeInterruptManager(interrupt);
|
FreeInterruptManager(interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command to update immediately
|
|
||||||
void DCUpdateNow(DDNS_CLIENT *c)
|
|
||||||
{
|
|
||||||
// Validate arguments
|
|
||||||
if (c == NULL)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
c->NextRegisterTick_IPv4 = c->NextRegisterTick_IPv6 = 0;
|
|
||||||
|
|
||||||
Set(c->Event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Execution of registration
|
// Execution of registration
|
||||||
UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6)
|
UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6)
|
||||||
{
|
{
|
||||||
@ -526,9 +512,6 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace
|
|||||||
char current_azure_ip[MAX_SIZE];
|
char current_azure_ip[MAX_SIZE];
|
||||||
INTERNET_SETTING t;
|
INTERNET_SETTING t;
|
||||||
UINT build = 0;
|
UINT build = 0;
|
||||||
bool use_https = false;
|
|
||||||
bool use_vgs = false;
|
|
||||||
bool no_cert_verify = false;
|
|
||||||
char add_header_name[64];
|
char add_header_name[64];
|
||||||
char add_header_value[64];
|
char add_header_value[64];
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
@ -652,33 +635,20 @@ UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace
|
|||||||
Format(url2, sizeof(url2), "%s?v=%I64u", url, Rand64());
|
Format(url2, sizeof(url2), "%s?v=%I64u", url, Rand64());
|
||||||
Format(url3, sizeof(url3), url2, key_hash_str[2], key_hash_str[3]);
|
Format(url3, sizeof(url3), url2, key_hash_str[2], key_hash_str[3]);
|
||||||
|
|
||||||
if (use_https == false)
|
ReplaceStr(url3, sizeof(url3), url3, "https://", "http://");
|
||||||
{
|
|
||||||
ReplaceStr(url3, sizeof(url3), url3, "https://", "http://");
|
|
||||||
}
|
|
||||||
|
|
||||||
ReplaceStr(url3, sizeof(url3), url3, ".servers", ".open.servers");
|
ReplaceStr(url3, sizeof(url3), url3, ".servers", ".open.servers");
|
||||||
|
|
||||||
|
cert_hash = StrToBin(DDNS_CERT_HASH);
|
||||||
|
|
||||||
if (no_cert_verify == false)
|
Debug("WpcCall: %s\n", url3);
|
||||||
{
|
ret = WpcCallEx2(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req,
|
||||||
cert_hash = StrToBin(DDNS_CERT_HASH);
|
NULL, NULL, ((cert_hash != NULL && ((cert_hash->Size % SHA1_SIZE) == 0)) ? cert_hash->Buf : NULL),
|
||||||
}
|
(cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0),
|
||||||
|
NULL, DDNS_RPC_MAX_RECV_SIZE,
|
||||||
ret = NULL;
|
add_header_name, add_header_value,
|
||||||
|
DDNS_SNI_VER_STRING);
|
||||||
|
Debug("WpcCall Ret: %u\n", ret);
|
||||||
if (ret == NULL)
|
|
||||||
{
|
|
||||||
Debug("WpcCall: %s\n", url3);
|
|
||||||
ret = WpcCallEx2(url3, &t, DDNS_CONNECT_TIMEOUT, DDNS_COMM_TIMEOUT, "register", req,
|
|
||||||
NULL, NULL, ((cert_hash != NULL && ((cert_hash->Size % SHA1_SIZE) == 0)) ? cert_hash->Buf : NULL),
|
|
||||||
(cert_hash != NULL ? cert_hash->Size / SHA1_SIZE : 0),
|
|
||||||
NULL, DDNS_RPC_MAX_RECV_SIZE,
|
|
||||||
add_header_name, add_header_value,
|
|
||||||
DDNS_SNI_VER_STRING);
|
|
||||||
Debug("WpcCall Ret: %u\n", ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
FreeBuf(cert_hash);
|
FreeBuf(cert_hash);
|
||||||
|
|
||||||
@ -828,7 +798,6 @@ UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use
|
|||||||
URL_DATA data;
|
URL_DATA data;
|
||||||
BUF *recv;
|
BUF *recv;
|
||||||
BUF *cert_hash = NULL;
|
BUF *cert_hash = NULL;
|
||||||
bool no_cert_verify = false;
|
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (dst == NULL || c == NULL)
|
if (dst == NULL || c == NULL)
|
||||||
{
|
{
|
||||||
@ -872,11 +841,7 @@ UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use
|
|||||||
return ERR_INTERNAL_ERROR;
|
return ERR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (no_cert_verify == false)
|
cert_hash = StrToBin(DDNS_CERT_HASH);
|
||||||
{
|
|
||||||
cert_hash = StrToBin(DDNS_CERT_HASH);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StrCpy(data.SniString, sizeof(data.SniString), DDNS_SNI_VER_STRING);
|
StrCpy(data.SniString, sizeof(data.SniString), DDNS_SNI_VER_STRING);
|
||||||
|
|
||||||
|
@ -237,7 +237,6 @@ void DCThread(THREAD *thread, void *param);
|
|||||||
UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6);
|
UINT DCRegister(DDNS_CLIENT *c, bool ipv6, DDNS_REGISTER_PARAM *p, char *replace_v6);
|
||||||
UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use_ssl, char *replace_v6);
|
UINT DCGetMyIpMain(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, bool use_ssl, char *replace_v6);
|
||||||
UINT DCGetMyIp(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, char *replace_v6);
|
UINT DCGetMyIp(DDNS_CLIENT *c, bool ipv6, char *dst, UINT dst_size, char *replace_v6);
|
||||||
void DCUpdateNow(DDNS_CLIENT *c);
|
|
||||||
void DCGetStatus(DDNS_CLIENT *c, DDNS_CLIENT_STATUS *st);
|
void DCGetStatus(DDNS_CLIENT *c, DDNS_CLIENT_STATUS *st);
|
||||||
UINT DCChangeHostName(DDNS_CLIENT *c, char *hostname);
|
UINT DCChangeHostName(DDNS_CLIENT *c, char *hostname);
|
||||||
void DCSetInternetSetting(DDNS_CLIENT *c, INTERNET_SETTING *t);
|
void DCSetInternetSetting(DDNS_CLIENT *c, INTERNET_SETTING *t);
|
||||||
|
@ -116,13 +116,6 @@
|
|||||||
|
|
||||||
static bool ipsec_disable = false;
|
static bool ipsec_disable = false;
|
||||||
|
|
||||||
// Disabling whole IPsec
|
|
||||||
void IPSecSetDisable(bool b)
|
|
||||||
{
|
|
||||||
ipsec_disable = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Monitor the IPsec service of the OS, and stop it if it will conflict
|
// Monitor the IPsec service of the OS, and stop it if it will conflict
|
||||||
void IPsecOsServiceCheckThread(THREAD *t, void *p)
|
void IPsecOsServiceCheckThread(THREAD *t, void *p)
|
||||||
{
|
{
|
||||||
|
@ -198,7 +198,6 @@ void AddEtherIPId(IPSEC_SERVER *s, ETHERIP_ID *id);
|
|||||||
bool DeleteEtherIPId(IPSEC_SERVER *s, char *id_str);
|
bool DeleteEtherIPId(IPSEC_SERVER *s, char *id_str);
|
||||||
void IPsecOsServiceCheckThread(THREAD *t, void *p);
|
void IPsecOsServiceCheckThread(THREAD *t, void *p);
|
||||||
bool IPsecCheckOsService(IPSEC_SERVER *s);
|
bool IPsecCheckOsService(IPSEC_SERVER *s);
|
||||||
void IPSecSetDisable(bool b);
|
|
||||||
|
|
||||||
|
|
||||||
#endif // PROTO_IPSEC_H
|
#endif // PROTO_IPSEC_H
|
||||||
|
@ -122,12 +122,6 @@ bool GetNoSstp()
|
|||||||
return g_no_sstp;
|
return g_no_sstp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the SSTP disabling flag
|
|
||||||
void SetNoSstp(bool b)
|
|
||||||
{
|
|
||||||
g_no_sstp = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process the SSTP control packet reception
|
// Process the SSTP control packet reception
|
||||||
void SstpProcessControlPacket(SSTP_SERVER *s, SSTP_PACKET *p)
|
void SstpProcessControlPacket(SSTP_SERVER *s, SSTP_PACKET *p)
|
||||||
{
|
{
|
||||||
|
@ -257,6 +257,5 @@ SSTP_PACKET *SstpNewControlPacket(USHORT message_type);
|
|||||||
SSTP_PACKET *SstpNewControlPacketWithAnAttribute(USHORT message_type, SSTP_ATTRIBUTE *a);
|
SSTP_PACKET *SstpNewControlPacketWithAnAttribute(USHORT message_type, SSTP_ATTRIBUTE *a);
|
||||||
void SstpSendPacket(SSTP_SERVER *s, SSTP_PACKET *p);
|
void SstpSendPacket(SSTP_SERVER *s, SSTP_PACKET *p);
|
||||||
bool GetNoSstp();
|
bool GetNoSstp();
|
||||||
void SetNoSstp(bool b);
|
|
||||||
|
|
||||||
#endif // PROTO_SSTP_H
|
#endif // PROTO_SSTP_H
|
||||||
|
@ -6640,15 +6640,6 @@ failure:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect through a proxy
|
// Connect through a proxy
|
||||||
SOCK *ProxyConnectEx(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)
|
|
||||||
{
|
|
||||||
return ProxyConnectEx2(c, proxy_host_name, proxy_port,
|
|
||||||
server_host_name, server_port, username, password, additional_connect,
|
|
||||||
cancel_flag, hWnd, 0);
|
|
||||||
}
|
|
||||||
SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
||||||
char *server_host_name, UINT server_port,
|
char *server_host_name, UINT server_port,
|
||||||
char *username, char *password, bool additional_connect,
|
char *username, char *password, bool additional_connect,
|
||||||
|
@ -257,10 +257,6 @@ SOCK *ClientAdditionalConnectToServer(CONNECTION *c);
|
|||||||
bool ClientUploadAuth2(CONNECTION *c, SOCK *s);
|
bool ClientUploadAuth2(CONNECTION *c, SOCK *s);
|
||||||
bool GetSessionKeyFromPack(PACK *p, UCHAR *session_key, UINT *session_key_32);
|
bool GetSessionKeyFromPack(PACK *p, UCHAR *session_key, UINT *session_key_32);
|
||||||
|
|
||||||
SOCK *ProxyConnectEx(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);
|
|
||||||
SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
||||||
char *server_host_name, UINT server_port,
|
char *server_host_name, UINT server_port,
|
||||||
char *username, char *password, bool additional_connect,
|
char *username, char *password, bool additional_connect,
|
||||||
|
@ -406,10 +406,6 @@ UINT UtSpeedMeterDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Speedometer
|
// Speedometer
|
||||||
void UtSpeedMeter()
|
|
||||||
{
|
|
||||||
UtSpeedMeterEx(NULL);
|
|
||||||
}
|
|
||||||
void UtSpeedMeterEx(void *hWnd)
|
void UtSpeedMeterEx(void *hWnd)
|
||||||
{
|
{
|
||||||
Dialog((HWND)hWnd, D_SPEEDMETER, UtSpeedMeterDlgProc, NULL);
|
Dialog((HWND)hWnd, D_SPEEDMETER, UtSpeedMeterDlgProc, NULL);
|
||||||
|
@ -131,7 +131,6 @@ void UtSpeedMeterDlgRefreshStatus(HWND hWnd);
|
|||||||
#endif // UT_C
|
#endif // UT_C
|
||||||
|
|
||||||
// Function prototype
|
// Function prototype
|
||||||
void UtSpeedMeter();
|
|
||||||
void UtSpeedMeterEx(void *hWnd);
|
void UtSpeedMeterEx(void *hWnd);
|
||||||
|
|
||||||
#endif // UT_H
|
#endif // UT_H
|
||||||
|
@ -2079,17 +2079,6 @@ void NormalizePath(char *dst, UINT size, char *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Rename the file
|
// Rename the file
|
||||||
bool FileRename(char *old_name, char *new_name)
|
|
||||||
{
|
|
||||||
wchar_t *old_name_w = CopyStrToUni(old_name);
|
|
||||||
wchar_t *new_name_w = CopyStrToUni(new_name);
|
|
||||||
bool ret = FileRenameW(old_name_w, new_name_w);
|
|
||||||
|
|
||||||
Free(old_name_w);
|
|
||||||
Free(new_name_w);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
bool FileRenameW(wchar_t *old_name, wchar_t *new_name)
|
bool FileRenameW(wchar_t *old_name, wchar_t *new_name)
|
||||||
{
|
{
|
||||||
wchar_t tmp1[MAX_SIZE];
|
wchar_t tmp1[MAX_SIZE];
|
||||||
|
@ -307,7 +307,6 @@ IO *FileOpenEx(char *name, bool write_mode, bool read_lock);
|
|||||||
IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock);
|
IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock);
|
||||||
void ConvertPathW(wchar_t *path);
|
void ConvertPathW(wchar_t *path);
|
||||||
bool FileRenameInnerW(wchar_t *old_name, wchar_t *new_name);
|
bool FileRenameInnerW(wchar_t *old_name, wchar_t *new_name);
|
||||||
bool FileRename(char *old_name, char *new_name);
|
|
||||||
bool FileRenameW(wchar_t *old_name, wchar_t *new_name);
|
bool FileRenameW(wchar_t *old_name, wchar_t *new_name);
|
||||||
void NormalizePath(char *dst, UINT size, char *src);
|
void NormalizePath(char *dst, UINT size, char *src);
|
||||||
void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src);
|
void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src);
|
||||||
|
Loading…
Reference in New Issue
Block a user