I observe that PAC files with JavaScript objects of size 100 or so cause connectivity hangs in iOS iCloud-based apps and services on an iPad.
Mobile Safari and other browsers are not affected.
I believe that this is an iOS bug and I have filed issue #33093977.
Details:
This PAC file works with iOS iCloud: proxy_test_create.py 9 > proxy_test_9.pac
This PAC file doesn't work with iOS iCloud: proxy_test_create.py 999 > proxy_test_999.pac
proxy_test_create.py:
#!/usr/bin/env python
# Proxy Auto Configuration Generator for iOS
# Small values of n (less than 10) work; large (~1000) hangup iCloud and App Store access
# iOS Safari works with all values of n
# Syntax: python proxy_test_creator.py [size of JS objects]
import sys
# Get n from the first argument, with a small default value
n = int(sys.argv[1]) if len(sys.argv) > 1 else 9
print("""\
// Proxy Auto Configuration Example for iOS
// Small values of n (less than 10) work; large (100) hangup iCloud and App Store access
// n = {:d}
// JSON object
var jo = {{ {} }};
// Regular Expression
var re = /{}/i;
// Simple FindProxyForURL function
function FindProxyForURL(url, host) {{
// Access the variables defined above, but ignore results
jo.hasOwnProperty(host) || re.test(host);
return "DIRECT";
}}
""".format(n,
", ".join('"field{:d}": null'.format(k+1) for k in range(n)),
"(?:" + "|".join('word{:d}'.format(k+1) for k in range(n)) + ")"))
I observe that PAC files with JavaScript objects of size 100 or so cause connectivity hangs in iOS iCloud-based apps and services on an iPad.
Mobile Safari and other browsers are not affected.
I believe that this is an iOS bug and I have filed issue #33093977.
Details:
proxy_test_create.py 9 > proxy_test_9.pac
proxy_test_create.py 999 > proxy_test_999.pac