support reverse proxy to a unix socket
See original GitHub issueFor debugging docker things I use the following method in 3 shells right now:
socat tcp-listen:3000,bind=127.0.0.1,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
mitmproxy -R http://localhost:3000 -p 3001
export DOCKER_HOST=127.0.0.1:3001
docker service ps 53pr4a3e2zkj
It would be really cool if mitm proxy supported acting as a reverse proxy to a unix socket. That would remove the need for the socat. I imagine it working like this:
mitmproxy -R unix:///var/run/docker.sock -p 3001
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Using nginx to proxy to a Unix domain socket
Using nginx to proxy to a Unix domain socket. I figured this out while adding --uds support to Datasette in #1388.
Read more >Using Nginx as a proxy to multiple Unix sockets
Here is a small demo program written in Go that would serve trivial HTTP service with Unix socket. package main import ( "context"...
Read more >Nginx to apache reverse proxy, instruct use of unix sockets
It would be trivial to script a proxy to map the unix socket to a network socket - but you lose any performance...
Read more >Proxy a unix socket HTTP server to a tcp port using nginx.
What if I want to send an ACK how would I achieve that? Can you help me please.
Read more >V2: reverse proxy to UNIX socket? - Help - Caddy Community
Ubuntu server 19.10, caddy is running as a systemd service. The reverse proxy is supposed to expose a gunicorn/Django server.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We now use asyncio, the relevant bits are around here: https://github.com/mitmproxy/mitmproxy/blob/a51dc10d8b97d46c77d11a4bbb4d0c393b2c8a39/mitmproxy/proxy/server.py#L153
See https://github.com/mitmproxy/mitmproxy/issues/1936#issuecomment-274450189.