Skip to content

Commit cce4ab3

Browse files
committed
doc: how to test HTTP and SOCKS5 proxy configuration
1 parent 182bc9c commit cce4ab3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,42 @@ If `ide_product_code` and `ide_build_number` is missing, Toolbox will only open
101101
page. Coder Toolbox will attempt to start the workspace if it’s not already running; however, for the most reliable
102102
experience, it’s recommended to ensure the workspace is running prior to initiating the connection.
103103

104+
## Configuring and Testing workspace polling with HTTP & SOCKS5 Proxy
105+
106+
This section explains how to set up a local proxy (without authentication which is not yet supported) and verify that
107+
the plugin’s REST client works correctly when routed through it.
108+
109+
We’ll use [mitmproxy](https://mitmproxy.org/) for this — it can act as both an HTTP and SOCKS5 proxy with SSL
110+
interception.
111+
112+
### Install mitmproxy
113+
114+
1. Follow the [mitmproxy Install Guide](https://docs.mitmproxy.org/stable/overview-installation/) steps for your OS.
115+
2. Start the proxy:
116+
117+
```bash
118+
119+
mitmweb --ssl-insecure --set stream_large_bodies="10m"
120+
```
121+
122+
### Configure Proxy
123+
124+
mitmproxy can do HTTP and SOCKS5 proxying. To configure one or the other:
125+
126+
1. Open http://127.0.0.1:8081 in browser;
127+
2. Navigate to `Options -> Edit Options`
128+
3. Update the `Mode` field to `regular` in order to activate HTTP/HTTPS or to `socks5`
129+
4. Proxy authentication can be enabled by updating the `proxyauth` to `username:password`
130+
131+
### Configure Proxy in Toolbox
132+
133+
1. Start Toolbox
134+
2. From Toolbox hexagonal menu icon go to `Settings -> Proxy`
135+
3. There are two options, to use system proxy settings or to manually configure the proxy details
136+
4. If we go manually, add `127.0.0.1` to the host and port `8080` for HTTP/HTTPS or `1080` for SOCKS5.
137+
5. Before authenticating to the Coder deployment we need to tell the plugin where can we find mitmproxy
138+
certificates. In Coder's Settings page, set the `TLS CA path` to `~/.mitmproxy/mitmproxy-ca-cert.pem`
139+
104140
## Releasing
105141

106142
1. Check that the changelog lists all the important changes.

0 commit comments

Comments
 (0)