Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon How can I bypass certain domains using a PAC file on iOS


How can I bypass certain domains using a PAC file on iOS


To bypass certain domains using a PAC file on iOS, follow these steps:

1. Access Wi-Fi Settings:
- Open the Settings app on your iPhone.
- Tap on Wi-Fi and connect to the desired network.

2. Configure Proxy Settings:
- Tap the info (i) button next to the connected Wi-Fi network.
- Scroll down to the HTTP Proxy section.

3. Select Automatic Configuration:
- Choose Auto to enable the use of a PAC file.
- In the URL field, enter the address of your PAC file. Ensure to include the protocol (https:// or https://). For example:


     https://<your-server-ip>/path/to/yourfile.pac
     

4. Edit the PAC File:
- In the PAC file, you can specify the domains to bypass using the `DIRECT` keyword. For example:

javascript
     function FindProxyForURL(url, host) {
       if (dnsDomainIs(host, ".example1.com") || (host == "example1.com") || dnsDomainIs(host, ".example2.com") || (host == "example2.com")) {
         return "DIRECT";
       }
       return "PROXY <proxy-server-ip>:<proxy-port>";
     }
     

- Replace `example1.com` and `example2.com` with the domains you want to bypass.

5. Save Settings:
- After entering the PAC file URL and modifying the PAC file content, exit the settings. The iPhone will now use the specified PAC file for proxy configuration, bypassing the listed domains.

By using a PAC file, you can dynamically select which domains to bypass the proxy for based on the URL being accessed. This provides more flexibility compared to manual proxy configuration.

Citations:
[1] https://docs.blackberry.com/en/blackberry-dynamics-apps/blackberry-access/3_5/blackberry-access-administration-guide/lnb1484165962504/wun1475010470352/jcu1484166495397
[2] https://docs.appvance.net/Content/AIQ/Traffic/IOS___Proxy_Settings_and_PAC_Files.htm
[3] https://kb.smoothwall.com/hc/en-us/articles/360008031659-Redirecting-iOS-Based-Devices-Web-Traffic
[4] https://www.jigsaw24.com/resource/quick-tips-how-to-use-a-pac-file-in-ios
[5] https://docs.trendmicro.com/en-us/documentation/article/trend-micro-web-security-online-help-pac-file-configurati