windows環境下用squid代理https(ssl)的方法_win伺服器

來源:互聯網
上載者:User

這個其實跟配置http代理也差不多,我之前是因為沒有使用支援ssl的squid版本,所以反覆折騰都不見效!

首先得檢查你正在使用的squid版本是否是支援ssl的,主要看squid\sbin\ssleay32.dll檔案是否存在,如果沒有此檔案那就得去換個支援ssl的squid版本了。

我這裡就只提供個最簡單的例子:

複製代碼 代碼如下:

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80  # http
acl Safe_ports port 21  # ftp
acl Safe_ports port 443  # https
acl Safe_ports port 70  # gopher
acl Safe_ports port 210  # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280  # http-mgmt
acl Safe_ports port 488  # gss-http
acl Safe_ports port 591  # filemaker
acl Safe_ports port 777  # multiling http
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow all

icp_access allow all

https_port 443 accel cert=c:/certs/server.pem key=c:/certs/server.pem vhost

cache_peer 192.168.1.13 parent 443 0 no-query originserver login=PASS ssl sslflags=DONT_VERIFY_PEER name=kensite

cache_peer_domain kensite ken.01h.net

hierarchy_stoplist cgi-bin ?

access_log c:/squid/var/logs/access.log squid

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

refresh_pattern ^ftp:  1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern .  0 20% 4320

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

visible_hostname 01H.NET

coredump_dir c:/squid/var/cache

備忘:“c:/certs/server.pem”這個檔案是可以去提供ssl服務的軟體相關目錄下找到的,副檔名也有可能是.crt、.key等,我這裡的.pem是以VisualSVN為例的。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.