Is there a simple, one-line command to run a HTTP Proxy? There are several one-line commands “serve this directory over HTTP” (e.g. python -m SimpleHTTPServer). Is there any command, or one-liner, for launching a HTTP Proxy like that? I don't need to configure anything, this is just for short term, temporary use. It doesn't have to be efficient, or multithreaded, or performant. I want something FLOSS, and preferably just an apt-get install away on my Ubuntu Linux 18.04 desktop.

  • Does this help? stackoverflow.com/questions/4412581/… Jun 9, 2020 at 16:00
  • @EduardoTrápani What can be simplier than running one simple command? I'm struggling with it for more than a hour, no one ever thought that I might want to run a simple http proxy that listens one port and redirects to another, without socks, without code?
    – VityaSchel
    Nov 22, 2022 at 17:08

2 Answers 2


I wrote one - https://github.com/codeallthethingz/single-line-proxy/


npx single-line-proxy "/api/(.*)>3000" "/(.*)>3001" 4000

apt -y install squid && systemctl start squid

....but the default config on Debian and Ubuntu only permits connections from localhost. so....

apt -y install squid && echo "http_access allow localnet" >/etc/squid/conf.d/99localnet" && systemctl restart squid

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .