FoxyProxy
FoxyProxy is a browser plugin for Chrome and Firefox that can automatically switches an internet connection across one or more proxy servers based on URL patterns.
This is an illustration of using FoxyProxy in Firefox once it is installed.
info
Make sure to turn on Send DNS through SOCKS5 proxy for the SOCKS proxy to resolve internal network link.
- Add a new SOCKS Proxy configuration by clicking on "Add".
- Modify the SOCKS5 Proxy settings by specifying the port to use. This is the port that the local machine is listening on as the SOCKS proxy/server as part of the SSH client.
- Modify the URL pattern for when the SOCKS proxy should be used, and when it shouldn't be used.
- It's possible to tune the settings to utilize the path based settings, or to directly use the SOCKS proxy for every URL.
- Alternatively, it's possible to import an existing configuration to set all of the URL pattern matching up if a previous configuration exists in a JSON file.
Once this is completed, navigate with your browser to example.com and FoxyProxy plugin should flash the color of your setup.
What to Proxy
One way to figure out the URLs needed in Chrome is to
- Open up the Network Tab
- Ctrl + Shift + R to reload a particular page.
- Right click when the network fetches have subsided on a particular network request, and select "Save all network requests as a HAR file". This will download a HAR based format file for debugging HTTP requests.
- Run
cat requests.json | jq '.log.entries|.[].request.url' | sort
on the file to get a unique set of URLs.
Alternatively, google search for "network requirement for (service)" and you'll find all the network endpoint requirements for accessing Microsoft O365.