A bridge application that accepts a SOCKS5 proxy configuration (with authentication) and starts a local unauthenticated HTTP proxy that can be used directly in browser extensions.
This uses the proxy-relay library to handle the protocol conversion and relaying.
- Python 3.7+
pip install -r requirements.txtuvicorn main:app --host 127.0.0.1 --port 8000The browser extension can send a POST request with the proxy configuration.
curl -X POST http://127.0.0.1:8000/set_proxy \
-H "Content-Type: application/json" \
-d '{"config": "192.168.1.1:1080:myuser:mypassword"}'Response:
{
"local_proxy": "http://127.0.0.1:51234"
}The extension should then configure Chrome to use http://127.0.0.1:51234 as the proxy.
curl http://127.0.0.1:8000/get_proxyResponse:
{
"local_proxy": "http://127.0.0.1:51234"
}