Skip to main content

Enable the Force Local and Force Proxy flags

Understand how and when to use Force Local and Force Proxy.

You can enable the Force Local and Force Proxy flags to force BrowserStackLocal to resolve all connections through your local network or proxy, instead of resolving the requests through the public internet.

Enable Force Local

The Force Local flag ensures that, regardless of any other setting, no asset will be resolved through the public internet and any resolution of URLs that your BrowserStack device does will be routed through the Local tunnel. This flag is typically used to ensure network compliance.

You can enable Force Local from the Live test session by following these steps:

  1. Go to the Live dashboard.
  2. On the toolbar, click Local Testing. Enable Force Local
  3. On the Local Testing prompt, select Resolve all URLs through my network.
    The test session restarts with the updated Local settings. On the toolbar, you can see that Force Local is on.
    Enable Force Local

You can also enable Force Local from the Local Console or command-line interface. To enable Force Local from the Local Console or command-line interface, follow these steps:

  1. Open Local Console (http://localhost:45454).
  2. In the Tunnel Settings pane, click Show More.
  3. Enable the Force Local flag.
    A success message is displayed confirming that the Force Local flag is enabled.
    After you enabled the Force Local flag, BrowserStackLocal resolves all the web traffic through your local network.
    Enable Force Local
  1. Open a command-line interface.
  2. Change directory to the directory that contains the BrowserStackLocal binary.
  3. Run the following command:
Copy icon Copy snippet

Enable Force Proxy

The Force Proxy flag routes all traffic through the proxy you configured. Otherwise, the BrowserStackLocal binary tries to connect directly as well for better performance.

To enable Force Proxy, follow these steps:

  1. Open Local Console (http://localhost:45454).
  2. In the Tunnel Settings pane, click Show More.
  3. Enable the Force Proxy flag.
  4. Click Update Command.
    A success message is displayed confirming that the Force Proxy flag is enabled.
    After you enabled the Force Proxy flag, BrowserStackLocal resolves all the web traffic through your proxy.
    Enable Force Local
  1. Open a command-line interface.
  2. Change directory to the directory that contains the BrowserStackLocal binary.
  3. Run the following command:
Copy icon Copy snippet

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy