Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
At a glance
Goal: Attach Dev Proxy to a browser instance without changing system proxy settings
Time: 5 minutes
Plugins: None
Prerequisites: Set up Dev Proxy
By default, Dev Proxy registers itself as the system proxy, which routes all network traffic through the proxy. While this approach works for most scenarios, sometimes you want to intercept only traffic from a specific browser instance while keeping other applications unaffected.
Why use a browser-specific proxy?
Attaching Dev Proxy directly to a browser instance has several benefits:
- Isolation: Only the specific browser instance uses the proxy, leaving other apps and browsers unaffected
- No system changes: You don't need to modify system proxy settings
- Parallel testing: Run multiple browser instances with different proxy configurations
- Cleaner traffic: See only the requests from the browser you're testing, not background system traffic
Prerequisites
Before you start, configure Dev Proxy to not register as the system proxy. In your devproxyrc.json file, set:
{
"asSystemProxy": false
}
Or, start Dev Proxy with the --as-system-proxy false command-line option.
Google Chrome
Google Chrome supports proxy configuration via command-line flags. To launch Chrome with Dev Proxy:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --proxy-server="http://127.0.0.1:8000"
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --proxy-server="http://127.0.0.1:8000"
google-chrome --proxy-server="http://127.0.0.1:8000"
Tip
Use a separate user profile to avoid affecting your main browser data. Add the --user-data-dir flag to specify a different profile directory:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --proxy-server="http://127.0.0.1:8000" --user-data-dir="%TEMP%\chrome-dev-proxy"
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --proxy-server="http://127.0.0.1:8000" --user-data-dir="/tmp/chrome-dev-proxy"
google-chrome --proxy-server="http://127.0.0.1:8000" --user-data-dir="/tmp/chrome-dev-proxy"
Important
Close all existing Chrome instances before launching Chrome with the proxy flag. Otherwise, the new instance joins the existing Chrome process and ignores the proxy settings.
Microsoft Edge
Microsoft Edge doesn't support the --proxy-server command-line flag. Even though Microsoft Edge is based on Chromium, Microsoft doesn't expose this functionality.
To use Dev Proxy with Microsoft Edge, you must use the system proxy settings. Configure Dev Proxy as your system proxy by keeping the asSystemProxy setting at its default value of true, or omitting it from your configuration.
Mozilla Firefox
Firefox doesn't support proxy configuration via command-line flags, but you can configure it manually through the browser settings.
To configure Firefox to use Dev Proxy:
- Open Firefox
- Go to Settings > General > Network Settings > Settings...
- Select Manual proxy configuration
- Set HTTP Proxy to
127.0.0.1and Port to8000 - Check Also use this proxy for HTTPS
- Select OK
Tip
Create a separate Firefox profile for testing with Dev Proxy. This way, you can keep your regular browsing profile unchanged. To create a new profile, run firefox -P and create a new profile dedicated to Dev Proxy testing.
Trust the Dev Proxy certificate
When you first start Dev Proxy, it installs and trusts a root certificate to decrypt HTTPS traffic. If you're using a separate browser profile or if the browser doesn't use the system certificate store, you might need to manually trust the certificate.
Chrome and Microsoft Edge
Chrome and Microsoft Edge use the operating system's certificate store. If you've already run Dev Proxy and trusted the certificate during the first-run experience, Chrome and Microsoft Edge automatically trust it.
Firefox
Firefox uses its own certificate store. To trust the Dev Proxy certificate in Firefox:
- Open Firefox
- Go to Settings > Privacy & Security > Certificates > View Certificates...
- Select the Authorities tab
- Select Import...
- Navigate to the Dev Proxy certificate:
- Location:
%USERPROFILE%\.config\dev-proxy\rootCert.pfx
- Location:
~/.config/dev-proxy/rootCert.pfx
- Location:
~/.config/dev-proxy/rootCert.pfx
- Location:
- Check Trust this CA to identify websites
- Select OK
Note
The certificate password is empty. Leave the password field blank when prompted.