gibney.org
:
Technology
:
Linux
:
Proxy in Bash
(Entry Nr. 304, by user 1 |
edit
)
This will give you a proxy to domain.com:<br> <br> All data sent from your client will be logged in client.txt<br> All data received from the server will be logged in server.txt<br> <br> <span class=span_content_bash>mkfifo buffer; while true; do cat buffer | nc -lp 80 | tee -a client.txt | nc domain.com 80 | tee buffer >> server.txt ; done</span> <br><br> Now you can connect to domain.com through http://127.0.0.1<br> <br> Todo:<br> <br> * handle more then 1 connect simultaneously.<br> Currently, you have to set network.http.max-connections in Firefox to one, so Firefox only sends one request at a time.
Create a new entry at this position