mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-14 15:23:39 +00:00
Fixed bug where clearing proxy setting, didn't clear all the settings
This commit is contained in:
@@ -2763,7 +2763,7 @@ void MeshServer_ConnectEx(MeshAgentHostContainer *agent)
|
|||||||
{
|
{
|
||||||
printf("Disabling Proxy: %s\n", ILibScratchPad);
|
printf("Disabling Proxy: %s\n", ILibScratchPad);
|
||||||
agent->triedNoProxy_Index++;
|
agent->triedNoProxy_Index++;
|
||||||
agent->proxyServer = NULL;
|
agent->proxyServer = ILibWebClient_SetProxy(reqToken, NULL, 0, NULL, NULL);;
|
||||||
|
|
||||||
if (duk_peval_string(agent->meshCoreCtx, "require('global-tunnel');") == 0)
|
if (duk_peval_string(agent->meshCoreCtx, "require('global-tunnel');") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1010,6 +1010,7 @@ void ILibAsyncSocket_ClearProxySettings(void *socketModule)
|
|||||||
{
|
{
|
||||||
struct ILibAsyncSocketModule *module = (struct ILibAsyncSocketModule*)socketModule;
|
struct ILibAsyncSocketModule *module = (struct ILibAsyncSocketModule*)socketModule;
|
||||||
memset(&(module->ProxyAddress), 0, sizeof(struct sockaddr_in6));
|
memset(&(module->ProxyAddress), 0, sizeof(struct sockaddr_in6));
|
||||||
|
module->ProxyState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Connect using an HTTPS proxy. If "proxyAddress" is set to NULL, this call acts just to a normal connect call without a proxy.
|
//! Connect using an HTTPS proxy. If "proxyAddress" is set to NULL, this call acts just to a normal connect call without a proxy.
|
||||||
|
|||||||
@@ -3797,6 +3797,11 @@ struct sockaddr_in6* ILibWebClient_SetProxy(ILibWebClient_RequestToken token, ch
|
|||||||
{
|
{
|
||||||
ILibWebClientDataObject *wcdo = ILibWebClient_GetStateObjectFromRequestToken(token);
|
ILibWebClientDataObject *wcdo = ILibWebClient_GetStateObjectFromRequestToken(token);
|
||||||
if (wcdo == NULL) { return(NULL); }
|
if (wcdo == NULL) { return(NULL); }
|
||||||
|
if (proxyHost == NULL)
|
||||||
|
{
|
||||||
|
memset(&(wcdo->proxy), 0, sizeof(struct sockaddr_in6));
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (ILibResolveEx(proxyHost, proxyPort, &(wcdo->proxy)) != 0 || wcdo->proxy.sin6_family == AF_UNSPEC)
|
if (ILibResolveEx(proxyHost, proxyPort, &(wcdo->proxy)) != 0 || wcdo->proxy.sin6_family == AF_UNSPEC)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user