HTTPS in PAC file
Asked Answered
P

1

7

I am writing a .pac file for use with iOS5 without jailbreak, but I feel trouble in matching the url starting with "https" (eg: https://test.com).

Here is my script:

function FindProxyForURL(url, host) {
  if (shExpMatch(url, "https://*")) return "PROXY 123.123.123.123";
  return 'DIRECT';
}

And if I matched "https://test.com", how can I return "https://123.123.123.123" to the URL?

Pitfall answered 29/2, 2012 at 5:21 Comment(0)
L
0

Use this:

if (shExpMatch(url, "https:**"))

This should fix it.

Lamont answered 10/6, 2016 at 21:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.