squid代理服务器搭建 - xd21303/Notebook GitHub Wiki

1、安装squid

sudo apt install squid

2、修改配置文件

sudo vim /etc/squid/squid.conf 

将 http_access deny all 改成 http_access allow all

#http_access deny all
http_access allow all

默认端口是3128

http_port 3128

3、重启squid服务

sudo service squid restart

apt使用代理

修改/etc/apt/apt.conf文件,每行末尾的分号不可少。

Acquire::http::proxy "http://127.0.0.1:3128/";
Acquire::https::proxy "https://127.0.0.1:3128/";
Acquire::ftp::proxy "ftp://127.0.0.1:3128/";
Acquire::socks::proxy "socks://127.0.0.1:3128";