Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host. (David Woodhouse)
2. Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host. (David Woodhouse)
3. Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host. (Atul Anand)
4. Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host. (David Woodhouse)
----------------------------------------------------------------------
Message: 1
Date: Thu, 16 Jun 2016 20:09:18 +0100
From: David Woodhouse <[email protected]>
To: Atul Anand <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Thu, 2016-06-16 at 16:45 +0530, Atul Anand wrote:
> @@ -224,12 +222,13 @@ static DBusMessage *create_proxy_config(DBusConnection
> *conn,
> ????????????????goto done;
> ????????}
> ?
> -???????config->domains = domains;
> ????????config->nameservers = nameservers;
> ?
> -???????domains = NULL;
> ????????nameservers = NULL;
> ?
> +???????if (pacrunner_proxy_set_domains(config->proxy, domains) < 0)
> +???????????????pacrunner_error("Failed to set proxy domains");
> +
> ????????if (g_str_equal(method, "direct")) {
> ????????????????if (pacrunner_proxy_set_direct(config->proxy) < 0)
> ????????????????????????pacrunner_error("Failed to set direct proxy");
This doesn't work. When you later call (e.g.)
pacrunner_proxy_set_auto() the first thing it does is call
reset_proxy() which removes all the installed domains. So installed
config ends up unconditional.
I'm testing with it just moved a few lines further down but that's not
right; it has a race condition where the proxy is active and
unconditional for a while before we install the domains.
I think you're going to have to pass the domains list through to each
of pacrunner_proxy_set_{manual,auto,etc.}
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL:
<http://lists.01.org/pipermail/connman/attachments/20160616/ba90a4fd/attachment-0001.bin>
------------------------------
Message: 2
Date: Thu, 16 Jun 2016 20:17:53 +0100
From: David Woodhouse <[email protected]>
To: Atul Anand <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Thu, 2016-06-16 at 20:09 +0100, David Woodhouse wrote:
>
> I'm testing with it just moved a few lines further down but that's not
> right; it has a race condition where the proxy is active and
> unconditional for a while before we install the domains.
Oh... and the JS plugins only have *one* context.
It's not per-proxy-config.
So the logic you've just added *does* correctly decide which proxy
config to use. And then we end up calling
return __pacrunner_js_execute(url, host);
Note the complete absence of the 'selected_proxy' argument in that
call...
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL:
<http://lists.01.org/pipermail/connman/attachments/20160616/aa912493/attachment-0001.bin>
------------------------------
Message: 3
Date: Fri, 17 Jun 2016 13:55:05 +0530
From: Atul Anand <[email protected]>
To: David Woodhouse <[email protected]>,
[email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
On 06/17/2016 12:47 AM, David Woodhouse wrote:
> On Thu, 2016-06-16 at 20:09 +0100, David Woodhouse wrote:
>>
>> I'm testing with it just moved a few lines further down but that's not
>> right; it has a race condition where the proxy is active and
>> unconditional for a while before we install the domains.
>
> Oh... and the JS plugins only have *one* context.
> It's not per-proxy-config.
>
> So the logic you've just added *does* correctly decide which proxy
> config to use. And then we end up calling
>
> return __pacrunner_js_execute(url, host);
>
> Note the complete absence of the 'selected_proxy' argument in that
> call...
>
>From 58df8bb95f68ac0b77d7dff018f52f28a429146b Mon Sep 17 00:00:00 2001
From: Atul Anand <[email protected]>
Date: Fri, 17 Jun 2016 13:51:18 +0530
Subject: [PATCH] src/proxy.c: Loading js drivers with most appropriate proxy
config.
---
src/proxy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/proxy.c b/src/proxy.c
index 9fcb191..4d04b7f 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -567,6 +567,7 @@ found:
selected_proxy->servers,
selected_proxy->excludes);
case PACRUNNER_PROXY_METHOD_AUTO:
+ __pacrunner_js_set_proxy(selected_proxy);
return __pacrunner_js_execute(url, host);
}
--
2.5.5
------------------------------
Message: 4
Date: Fri, 17 Jun 2016 10:01:23 +0100
From: David Woodhouse <[email protected]>
To: Atul Anand <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/3] [Pacrunner]: Domains are looked up to match
the host.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On Fri, 2016-06-17 at 13:55 +0530, Atul Anand wrote:
>
> @@ -567,6 +567,7 @@ found:
> ????????????????????????????????????????????????selected_proxy->servers,
> ????????????????????????????????????????????????selected_proxy->excludes);
> ????????case PACRUNNER_PROXY_METHOD_AUTO:
> +???????????????__pacrunner_js_set_proxy(selected_proxy);
> ????????????????return __pacrunner_js_execute(url, host);
> ????????}
> ?
Heh, cute. I'll use that for testing.
But no, no way are we going to re-interpret the whole PAC file every
time we handle a request for a different proxy config. We need to ditch
the global variables in the various JS plugins and make it properly
retain a context per-proxy-config.
I'll take a look, if you like. I feel slightly guilty because I
*should* have thrown my toys out of the pram when implementing v8.cc,
and done it properly instead of propagating the design flaw.
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL:
<http://lists.01.org/pipermail/connman/attachments/20160617/0249ad4a/attachment.bin>
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 8, Issue 22
**************************************