squid - 代理服务器的基本用法

访问量: 263

安装

配置  

直接修改 $ vim /etc/squid/squid.conf

测试配置文件: $ squid -k parse  

哪怕是WARNING 都不能有。

$ service squid start/stop/restart/status

允许远程ip 访问:  (地址转换器参考:http://www.subnet-calculator.com/cidr.php)

# 对于阿里云
acl aliyun src 39.xx.11.0/24
http_access allow aliyun

参考: 

status的例子

root@fs-p:/etc/squid# service squid status
● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; generated)
   Active: active (running) since Thu 2019-04-18 20:35:01 CST; 2min 39s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 32517 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)
  Process: 32591 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)
    Tasks: 4 (limit: 4478)
   CGroup: /system.slice/squid.service
           ├─32643 /usr/sbin/squid -YC -f /etc/squid/squid.conf
           ├─32646 (squid-1) -YC -f /etc/squid/squid.conf
           ├─32647 (logfile-daemon) /var/log/squid/access.log
           └─32648 (pinger)

Apr 18 20:35:01 fs-p systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
Apr 18 20:35:01 fs-p squid[32591]:  * Starting Squid HTTP Proxy squid
Apr 18 20:35:01 fs-p squid[32591]:    ...done.
Apr 18 20:35:01 fs-p systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.
Apr 18 20:35:01 fs-p squid[32643]: Squid Parent: will start 1 kids
Apr 18 20:35:01 fs-p squid[32643]: Squid Parent: (squid-1) process 32646 started

订阅/RSS Feed

Subscribe

分类/category