yegor256/squid-proxy

By yegor256

Updated 13 days ago

Simple HTTP/S proxy with Squid

Image
Networking
3

10K+

yegor256/squid-proxy repository overview

Docker Image of an Anonymous HTTP Proxy

docker Docker Cloud Automated build License

This Docker image helps you start your own Squid proxy server, with HTTP Basic authorization. You may need this if you want your crawling/scaping software to look like constantly going to the Network from the same IP address. You rent a VPS, start a Squid server there and configure your software to go everywhere through an explicit HTTP(S) proxy.

When Docker is installed, run this:

$ docker run --name proxy --detach --restart=always --publish 8081:3128 \
  --env USERNAME=jeffrey --env PASSWORD=swordfish \
  yegor256/squid-proxy

Now you can connect to localhost:8081 with jeffrey:swordfish credentials. For example:

curl -vvv --proxy http://jeffrey:[email protected]:8081 https://google.com/

Or, with httpie:

http --proxy=http:http://jeffrey:[email protected]:8081 https://google.com/

BTW, the proxy is anonymous. Once it's up and running, you can check whether it's visible, using this service. It also doesn't store any logs and doesn't cache any content.

You can also use Docker compose:

version: '3'
services:
  proxy:
    image: yegor256/squid-proxy
    restart: always
    ports:
      - "8081:3128"
    environment:
      - USERNAME=jeffrey
      - PASSWORD=swordfish

Developing

Build it locally:

docker build . -t squid-proxy:latest

Want to push to a local machine?

docker save squid-proxy | ssh -C your@machine docker load

Tag summary

Content type

Image

Digest

sha256:47871de48

Size

70.1 MB

Last updated

13 days ago

docker pull yegor256/squid-proxy:sha-80c5847