PAC文件中的HTTPS

3we*_*nt2 5 proxy pac

我正在编写一个.pac文件,用于iOS5但没有越狱,但我觉得在匹配以"https"开头的网址时遇到麻烦(例如:https://test.com).

这是我的脚本:

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

如果我匹配"https://test.com",如何将"https://123.123.123.123"返回到URL?

小智 0

用这个:

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

这应该可以解决它。