debian 上安装
1 apt-get install squid-ssl
编译 Squid
生成账号密码
1 printf “user_name:$(openssl passwd -crypt ‘password’)\n” | sudo tee -a /etc/squid/htpasswd
squid.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 acl SSL_ports port 443 acl Safe_ports port 1-65535 acl CONNECT method CONNECT acl HEAD method HEAD http_access deny !Safe_ports http_access deny manager auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd auth_param basic realm proxy acl authenticated proxy_auth REQUIRED http_access allow localhost http_access allow authenticated http_access deny all http_port 0.0.0.0:3128 https_port 0.0.0.0:3129 cert=/etc/squid/ssl_cert/doopp_com.pem key=/etc/squid/ssl_cert/doopp_com.key coredump_dir /var/spool/squid3 refresh_pattern -i \.(3gp|7z|ace|asx|avi|bin|cab|dat|deb|rpm|divx|dvr-ms) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(rar|jar|gz|tgz|tar|bz2|iso|m1v|m2(v|p)|mo(d|v)|(x-|)flv) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(og(x|v|a|g)|rar|rm |r(a|p)m|snd|vob|wav) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(pp(s|t)|wax|wm(a|v)|wmx|wpl|zip|cb(r|z|t)) 1440 100% 129600 reload-into-ims refresh_pattern -i \.(doc|pdf)$ 1440 50% 43200 reload-into-ims refresh_pattern -i \.(html|htm)$ 1440 50% 40320 reload-into-ims refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 refresh_pattern . 0 20% 4320 via off cache_mem 512 MB maximum_object_size_in_memory 256 KB half_closed_clients off forwarded_for delete dns_v4_first on ipcache_size 4096 dns_nameservers 223.5.5.5, 114.114.114.114 cache_mgr admin@example.com visible_hostname example.com email_err_data off err_page_stylesheet none
使用 SwitchyOmega 的话,可以配置如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 var outDomains = [ "example.com" , ... more domain ]; function isOutDomain (host ) { for (var i = 0 ; i < outDomains.length ; i++) { if (dnsDomainIs (host, outDomains[i])) { return true ; } } return false ; } function FindProxyForURL (url, host ) { if (isOutDomain (host)) { return "DIRECT" ; } return "HTTPS xxx.xxx.xxx.xxx:3129" ; }
如果您喜欢此博客或发现它对您有用,则欢迎对此发表评论。 也欢迎您共享此博客,以便更多人可以参与。 如果博客中使用的图像侵犯了您的版权,请与作者联系以将其删除。 谢谢 !