New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 715841 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

tlsdated barfs on autoconfigured proxies

Project Member Reported by derat@chromium.org, Apr 26 2017

Issue description

First, configure Chrome to use a PAC file for proxy configuration. I went to my Ethernet settings and entered file:///home/chronos/user/Downloads/proxy.pac in the "Autoconfiguration URL" field. /home/chronos/user/Downloads/proxy.pac contains the following:

function FindProxyForURL(url, host) {
  return "PROXY proxy.example.com:8080; DIRECT";
}

Then restart the tlsdated service and look at /var/log/tlsdate.log. I see the following:

2017-04-26T16:40:02.004091-07:00 INFO tlsdated[17377]: [event:cros:handle_proxy_change]: fired
2017-04-26T16:40:02.004157-07:00 NOTICE tlsdate[17378]: pac_fmt unmatched: 'DIRECT;PROXY proxy.example.com:8080' 12
2017-04-26T16:40:02.004194-07:00 INFO tlsdated[17377]: pac_fmt unmatched: 'DIRECT;PROXY proxy.example.com:8080' 12

Earlier, I was seeing the following:

2017-04-26T16:33:11.004183-07:00 NOTICE tlsdate[16669]: [event:cros:handle_proxy_change]: fired
2017-04-26T16:33:11.004195-07:00 INFO tlsdated[16668]: [event:cros:handle_proxy_change]: fired
2017-04-26T16:33:11.004341-07:00 NOTICE tlsdate[16669]: invalid host:port: proxy.example.com:8080;DIRECT
2017-04-26T16:33:11.004374-07:00 INFO tlsdated[16668]: invalid host:port: proxy.example.com:8080;DIRECT

In src/platform-cros.c, I see the following TODO:

/* Convert PAC return format to tlsdated url format */
/* TODO(wad) support multiple proxies when Chromium does:
 * PROXY x.x.x.x:yyyy; PROXY z.z.z.z:aaaaa
 */
static
void
canonicalize_pac (const char *pac_fmt, char *proxy_url, size_t len)
{
...

I think that Chrome may *always* return "DIRECT" as an option when a PAC file is specified, which would mean that tlsdated would never work in this case. I don't know when it last worked, if ever.

Luckily, it looks like manually-configured proxies are returned as a single entry, so tlsdated works then.

canonicalize_pac() is a bunch of C string manipulation code without any tests and I'm reluctant to touch it.
 

Comment 1 by mmenke@chromium.org, Apr 27 2017

Components: -OS>Systems -Internals>Network>Proxy OS>Systems>Network
This doesn't sound like an issue with src/net/'s proxy logic (Which won't fallback to direct when a PAC doesn't allow it), but rather an issue with ChromeOS-specific magic, so removing the internals>network label.  "src/platform-cros.c" doesn't even in the Chrome repo.  Feel free to add back if I'm wrong.

Comment 2 by derat@chromium.org, Apr 27 2017

Thanks. Yeah, this is in Chrome-OS-specific code that's not part of the Chrome repository. Sorry for my misuse of labels. :-)

Comment 3 by mmenke@chromium.org, Apr 27 2017

Not a problem - if you don't know the right label, better to cast a net that's too wide than too narrow, as otherwise, it will just sink into a black hole (Into the sea?)
Labels: Enterprise-Triaged

Sign in to add a comment