23

I want to restrict the traffic to tinyproxy, how can i do this by adding username & password instead whitelisting IP addresses?

030
  • 10,842
  • 12
  • 78
  • 123
karthikdivi
  • 3,466
  • 5
  • 27
  • 46

3 Answers3

33

Add BasicAuth myuser mypassword to /etc/tinyproxy/tinyproxy.conf.

Note that Basic Auth was added in tinyproxy 1.10.0, but Ubuntu 18.04 installs 1.8.4 by default.

Build the latest version of tinyproxy yourself or just use Ubuntu 19.04 or newer.

Max Malysh
  • 29,384
  • 19
  • 111
  • 115
  • 7
    Thank you. Minimal "tinyproxy.conf": "Port 8888" "MaxClients 100" "StartServers 1" "BasicAuth myuser mypassword". Demo: "curl --proxy http://myuser:mypassword@localhost:8888 google.com" – masterxilo Dec 09 '19 at 23:31
  • Sample config https://gist.github.com/ericzon/b8d5201249544adf14b4280c890ae53f – M at Jan 08 '23 at 20:44
3

Currently its not supported in tinyproxy.

Here is an open enhancement request for that https://github.com/tinyproxy/tinyproxy/issues/29

3

Although it's not nearly as small as TinyProxy, the Squid proxy server would allow you to setup a username and password for your proxy. This guide shows you how to set this up.

Retro Gamer
  • 1,096
  • 1
  • 10
  • 24