Sign inSign up

athlon1600/squid-proxy-server

By athlon1600

•Updated 4 months ago

Deploy your own anonymous proxy server using Docker. Works on Windows too. Powered by Squid

Image
Networking
0

791

athlon1600/squid-proxy-server repository overview

⁠Squid Anonymous Proxy Server

Replace 5051 with port number you want your proxy server to run on.
If you are running this on your home computer, make sure your Internet router is configured to have that port open.

Change proxynova and password with some other credentials:

docker run --name proxy -d -p 5051:3128 -e "USERNAME=proxynova" -e "PASSWORD=password" athlon1600/squid-proxy-server

or, you may choose to run your proxy server without users needing to login:

docker run --name proxy --restart=always -d -p 5051:3128 athlon1600/squid-proxy-server

restart=always is there to ensure Squid proxy will restart if it crashed for some reason.

Once proxy server is up and running, check if it is working properly:

curl -x localhost:5051 -U proxynova:password https://checkip.amazonaws.com/

^ replace localhost with the IP address of the server where this Docker container is running on.

⁠Install Docker

One-liner installation for Linux:

curl -fsSL https://get.docker.com | sudo sh

For Windows, see:
https://docs.docker.com/desktop/setup/install/windows-install/⁠

⁠Anonymity Level

Clients using this proxy server will remain anonymous, because no information about the client is forwarded to the target server.

Read more: https://www.proxynova.com/proxy-articles/proxy-anonymity-levels-explained/⁠

⁠Monitoring

Read Squid's access.log file to find IP addresses making the most requests:

docker exec proxy sh -c "tail -n 100000 /var/log/squid/access.log | awk '{print \$3}' | sort | uniq -c | sort -nr | head -n 25"

Block IP address before it even reaches Squid:

iptables -A INPUT -s IP_TO_BLOCK -j DROP

Count unique clients using your proxy server recently:

docker exec proxy sh -c "cat /var/log/squid/access.log | awk '{print \$3}' | sort | uniq -c | sort -nr | wc -l"

⁠Source code

⁠Miscellaneous

More information about Squid software, how to install it, and tips for maintaining it:
https://www.proxynova.com/proxy-articles/install-squid-proxy-server/⁠

Tag summary

Content type

Image

Digest

sha256:d8c6d14c8…

Size

73.1 MB

Last updated

4 months ago

docker pull athlon1600/squid-proxy-server