Squid

Squid Web proxy

Install in raspberry pi

   1 sudo bash 
   2 apt update 
   3 apt install squid
   4 cd /etc/squid/
   5 cp squid.conf squid.conf.ORIG
   6 cat squid.conf.ORIG | egrep -v -e '^[[:blank:]]*#|^$' > squid.conf
   7 nano squid.conf 
   8 acl localnet src 192.168.1.0/24
   9 http_access allow Localnet 
  10 # comment http_access deny all 
  11 service squid reload
  12 firefox manual proxy 
  13 192.168.1.123  (proxy squid address) Port: 3128
  14 also for ftp and https

Setup system wide proxy

   1 # sudo nano /etc/profile.d/proxy.sh
   2 export http_proxy="http://192.168.1.123:3128/"
   3 export https_proxy="http://192.168.1.123:3128/"
   4 export ftp_proxy="http://192.168.1.123:3128/"
   5 export no_proxy="127.0.0.1,localhost"
   6 
   7 # For curl
   8 export HTTP_PROXY="http://192.168.1.123:3128/"
   9 export HTTPS_PROXY="http://192.168.1.123:3128/"
  10 export FTP_PROXY="http://192.168.1.123:3128/"
  11 export NO_PROXY="127.0.0.1,localhost"
  12 
  13 sudo chmod +x  /etc/profile.d/proxy.sh
  14 source /etc/profile.d/proxy.sh
  15 
  16 # nano /etc/environment 
  17 export http_proxy="http://192.168.1.123:3128/"
  18 export https_proxy="http://192.168.1.123:3128/"
  19 export ftp_proxy="http://192.168.1.123:3128/"
  20 export no_proxy="127.0.0.1,localhost"
  21 
  22 # For curl
  23 export HTTP_PROXY="http://192.168.1.123:3128/"
  24 export HTTPS_PROXY="http://192.168.1.123:3128/"
  25 export FTP_PROXY="http://192.168.1.123:3128/"
  26 export NO_PROXY="127.0.0.1,localhost"

Squid (last edited 2021-08-30 10:36:02 by localhost)