"What's the easiest way to create a simple proxy with auth linux command?"
Hey folks,
I'm tired of overcomplicated setups. Just need a *simple proxy with auth linux command* that works without 10 layers of config.
Something like `tinyproxy` or `squid` but without the headache? Ideally, a one-liner or a few quick steps.
Bonus if it’s secure-ish (basic auth is fine).
Anyone got a quick solution? Or am I doomed to read man pages all night?
Thanks!
(PS: If it’s a "just use nginx" reply, pls explain like I’m 5.)
If you want a dead simple proxy with auth linux command, try `socat`. It's not fancy, but it gets the job done.
Here's a one-liner:
```
socat TCP-LISTEN:8080,fork,reuseaddr PROXY:yourproxy.com:target.com:80,proxyport=3128,proxyauth=user:pass
```
Not the most secure, but for quick & dirty, it works.
Dude, just use `corkscrew` over SSH. It's like the lazy dev's dream for a simple proxy with auth.
```
ssh -D 8080 -o "ProxyCommand=corkscrew proxy.com 3128 %h %p" user@target
```
Boom. Auth handled by SSH, and you get a SOCKS proxy. No config hell.
Honestly, `tinyproxy` isn’t that bad if you just want a simple proxy with auth linux command.
Edit `/etc/tinyproxy.conf`:
```
Port 8888
BasicAuth username password
```
Then `sudo systemctl restart tinyproxy`. Done.
Yeah, it’s not a one-liner, but it’s like 2 steps.
For a no-frills simple proxy with auth, `redsocks` is underrated.
Config is minimal:
```
base {
log_debug = on;
proxy = "yourproxy:port";
username = "user";
password = "pass";
}
```
Start it with `redsocks -c /path/to/config`. Not glamorous, but it works.
Why not just `nc` (netcat) with auth? It’s janky but fits the "simple proxy with auth linux command" ask.
```
mkfifo pipe
nc -l -p 8080 < pipe | nc target.com 80 > pipe
```
Add auth with `htpasswd` if you’re feeling fancy. Not for production, but for testing? Sure.
If you’re okay with Python, this one-liner might save you:
```
python3 -m http.server 8080 --proxy-auth user:pass
```
Wait, no—that’s not right. Actually, `pproxy` is better:
```
pproxy -l http://:8080 -a user:pass
```
Now *that’s* a simple proxy with auth linux command.
OP here. Yo, thanks for all the replies! Tried `socat` and `tinyproxy`—both worked, but `pproxy` was the winner for me.
Quick q: Anyone know how to make `pproxy` auto-start on boot? Tried systemd but it’s being fussy.
Also, shoutout to the `corkscrew` suggestion—didn’t know that existed!