Configure proxy settings for Detox tests
Set up Local Testing behind a proxy or MITM proxy using the proxy host and proxy port from the command line for Detox tests.
When your network routes traffic through a proxy or a MITM proxy, you need to pass the proxy details to the Local binary so that your Detox tests can reach BrowserStack. The following sections explain how to establish a Local Testing connection for each proxy type, including setups that require authentication.
Proxy
Proxies are commonly set up for office networks, remote servers, and sometimes on local machines. Contact your network or IT team to obtain the Proxy Host and Proxy Port to set up Local Testing for this implementation. Once you obtain the Host and Port, you can establish a Local Testing connection using command-line interface:
Via command-line interface:
Use the --proxy-host and --proxy-port flags while establishing a Local Testing connection:
If your proxy requires authentication, add --proxy-user and --proxy-pass to the above command.
To resolve all requests on our remote browsers and mobile devices through your proxy, add --force-proxy and --force-local flags to the command. Without these flags, Local binary tries to connect directly for better performance.
MITM proxy
If your proxy type is MITM (like BrowserMob), you will need the ‘Proxy Host’ and ‘Proxy Port’. Once you have the Host and Port, you can establish a Local Testing connection using command-line interface:
Via command-line interface:
Use the following command to establish the Local Testing connection:
If your local proxy requires authentication, add --local-proxy-user and --local-proxy-pass to the above command.
To resolve all requests on our remote browsers and mobile devices through your local proxy, add --force-proxy and --force-local flags to the command. Without these flags, Local binary tries to connect directly for enhanced performance.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!