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?
This should not have been accepted. Please vote to delete if you can.
You cannot proxy the HTTPS protocol without breaking end-to-end security, which is its single distinguishing feature. The reason your matches "don't work" is that your PAC file is ignored for HTTPS.
Routing the traffic between the browser and an on-device proxy over HTTPS is also quite pointless, regardless of whether it is technically possible. I imagine it has been made impossible for security reasons (so that users cannot be fooled to think traffic is secure when it isn't) but I have not investigated.