MagicPodDesktop Proxy Settings
MagicPodDesktop automatically uses the proxy settings of the PC on which it is installed to connect to the internet, so no special proxy configuration is usually required. However, in case it is necessary to authenticate to the Proxy Server, and a problem occurs with automatic use of the proxy settings, it will be necessary to configure the MagicPodDesktop proxy settings using the following method.
First, open the MagicPodDesktop settings file, magic_pod_config.json. This file is located, in case of Windows, C:\Users\<Username>\AppData\Roaming\MagicPodDesktop\magic_pod_config.json(for MagicPodDesktop version 1.50.0 or earlier, C:\Users\<Username>\AppData\Roaming\magic_pod_desktop\magic_pod_config.json), in case of Mac, /Users/<Username>/Library/Application Support/MagicPodDesktop/magic_pod_config.json(for MagicPodDesktop version 1.50.0 or earlier, /Users/<Username>/Library/Application Support/magic_pod_desktop/magic_pod_config.json). Set the necessary proxy information in this settings file as follows.
{
...
"proxyServerUrl": "specify URL, auto (use OS settings), or none (do not use proxy). When omitted, this defaults to auto",
"proxyServerAuthType": "none (no authentication), basic, or ntlm. When omitted, this defaults to none",
"proxyServerAuthUser": "username when authenticating to the proxy",
"proxyServerAuthPassword": "password when authenticating to the proxy",
"proxyExcludedDomains": [
"Domain names to be excluded from proxy",
"Multiple domain names can be listed",
"Their subdomains are also excluded"
],
...
}
In case the proxy uses a self-signed certificate
In this case, MagicPodDesktop cannot use the PC proxy settings. Make sure that Extra root certificate is specified from the Advanced settings tab of the test run settings dialog.
For example, if you are using Zscaler, enter the full path in this field, like C:\Users\**\Downloads\ZscalerRootCertificate-**.crt.
If you are still unable to log in to MagicPodDesktop after the above settings, add the following settings to magic_pod_config.json.
{
...
"testCondition": {
"extra_ca_certificates": {
"local_file_paths": [
"path to extra root certificate file"
]
}
...
}
Install a root certificate on the iOS simulator
When using an iOS simulator, it is necessary to install a root certificate on the iOS simulator to allow communication through the proxy. In this case, as well, be sure to specify Extra root certificate from the Advanced settings tab of the test run settings dialog.
How to verify certificate files
If you encounter certificate-related issues when running tests in a proxy environment, following the steps below to verify and configure the certificate correctly in MagicPodDesktop may help resolve the problem.
1. Check the Certificate in Keychain Access
Open the “Keychain Access” application on your Mac and ensure that the correct certificate is present. You should see a result similar to the example shown in the image below.
2. Export the Certificate File via Terminal
Use the Terminal to extract the certificate and save it in a format compatible with MagicPodDesktop. Run the following command in your Terminal. The file will be saved to your home directory:
security find-certificate -c "Zscaler Root CA" -p /Library/Keychains/System.keychain > ~/certificate.crtReplace "Zscaler Root CA" with the actual name of the certificate as it appears in your keychain. (You can use the command as is when you use Zscaler)
3. Configure the Certificate in MagicPodDesktop
To use the exported certificate in MagicPodDesktop, follow the instructions in In case the proxy uses a self-signed certificate. Enter the full path of the obtained certificate file in the Additional Root Certificates field.
Proxy settings to connect to the site being tested
As the browser running the test uses the proxy settings as set on the machine, no special proxy configuration is usually required.
However, for proxies that require basic authentication, you will be asked for a password every time you open the browser. By setting the proxy server host in the OS proxy settings to <proxy user name>:<proxy password>@host (e.g. user:pass@proxy.example.com), you can avoid being asked for the password every time.