差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
it:server:squid [2023-08-04 09:25] – [用户认证] goldentianya | it:server:squid [2023-08-05 17:25] (当前版本) – [测试服务] goldentianya | ||
---|---|---|---|
行 65: | 行 65: | ||
< | < | ||
sudo apt install apache2-utils | sudo apt install apache2-utils | ||
- | #sudo htpasswd -c / | + | sudo htpasswd -c / |
</ | </ | ||
修改config文件 | 修改config文件 | ||
- | <code> | + | <file > |
- | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | + | # |
+ | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | ||
+ | # | ||
include / | include / | ||
auth_param basic program / | auth_param basic program / | ||
auth_param basic realm proxy | auth_param basic realm proxy | ||
acl authenticated proxy_auth REQUIRED | acl authenticated proxy_auth REQUIRED | ||
- | # Example rule allowing access from your local networks. | + | # Example rule allowing access from your local networks. |
acl localnet src your_ip_address | acl localnet src your_ip_address | ||
- | # Adapt localnet in the ACL section to list your (internal) IP networks | + | # Adapt localnet in the ACL section to list your (internal) IP networks |
- | # from where browsing should be allowed | + | # from where browsing should be allowed |
- | # | + | # |
http_access allow localhost | http_access allow localhost | ||
http_access allow authenticated | http_access allow authenticated | ||
- | # And finally deny all other access to this proxy | + | # And finally deny all other access to this proxy |
http_access deny all | http_access deny all | ||
- | </code> | + | </file> |
===== 测试服务 ===== | ===== 测试服务 ===== | ||
测试方式 | 测试方式 | ||
- | * curl 命令 <color # | + | * curl 命令 <color # |
* nc -v < | * nc -v < | ||
* telnet < | * telnet < | ||
+ | * ++ 当前服务 | http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | 第二种方式 <color # | ||