Reverse Proxy
Configure the proxy to intercept inbound requests
Command
stoobly-agent run --proxy-mode reverse:<URL>Configuring /etc/hosts
To use a reverse proxy with a specific domain name, you need to modify your /etc/hosts file to point the domain to localhost. This allows your system to resolve the domain name to the reverse proxy instead of the actual server.
Manual Configuration
Edit /etc/hosts (requires administrator privileges):
On Linux/macOS:
sudo nano /etc/hostsAdd entries for each domain you want to intercept:
127.0.0.1 example.com
127.0.0.1 api.example.com
::1 example.com
::1 api.example.comOn Windows:
Open Notepad as Administrator
Open
C:\Windows\System32\drivers\etc\hostsAdd the same entries as shown above
Example
If you're setting up a reverse proxy for https://api.example.com:
Add to
/etc/hosts:Run Stoobly with reverse proxy mode:
Access the domain - requests will be intercepted:
Cleanup
Remember to remove entries from /etc/hosts when you're done testing, or comment them out by adding # at the start of each line.
Enabling HTTPS Traffic
To enable HTTPS traffic to the reverse proxy, add the following options to the run command:
Last updated
Was this helpful?