5

squid 的安装及简单配置

 2 years ago
source link: https://www.nixonli.com/17.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

squid在Linux下安装及配置极其简单只需要简单的一条命令就可以安装squid

安装软件包

sudo apt update #更新软件源
sudo apt upgrade #更新系统
sudo apt install squid #安装squid软件包

/etc/squid/squid.conf #主配置文件

想要的结果很简单就是需要代理的电脑能浏览网站收发邮件即可

首先将默认端口:3128 改为自己想要的端口如:8080

编辑配置文件:/etc/squid/squid.conf 修改 http_port 3128 为 http_port 8080

sudo vi /etc/squid/squid.conf

保存配置文件重启代理服务

sudo systenctl restart squid

在配置文件/etc/squid/squid.conf 添加允许代理的地址

acl localnet src 192.168.0.0/16
acl SSL_ports port 1-65535
acl Safe_port port 1-65535

添加允许指定的acl

http_access allow localnet
sudo systenctl restart squid

到此就可以在浏览器及邮箱客户配置代理进行联网了。

官方地址:http://www.squid-cache.org/?spm=a2c6h.12873639.0.0.f53f6a9bM4QVEY

参考文档:http://www.squid-cache.org/Doc/config/?spm=a2c6h.12873639.0.0.f53f6a9bM4QVEY


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK