2012-10-31 30 views
13

Ho vps, e vorrei configurare il mio proxy HTTPS per il calamaro. Ho configurato il proxy http e funziona, ma non supporta https.Come configurare il supporto HTTPS in squid3

domanda

  • Come configurare proxy di HTTPS in squid3?

Questo è i dettagli della configurazione di squid.conf.

acl manager proto cache_object 
acl localhost src 127.0.0.1/32 ::1 
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 
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 
acl larang url_regex -i "/etc/squid3/larang.txt" 
http_access allow manager localhost 
http_access deny manager 
http_access deny !Safe_ports 
http_access deny CONNECT !SSL_ports 
http_access allow localhost 
http_access deny larang 
http_access allow all 
http_port 143 transparent 
refresh_pattern ^ftp: 1440 20% 10080 
refresh_pattern ^gopher: 1440 0% 1440 
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 
refresh_pattern . 0 20% 4320 

risposta

4

Questa linea http_access deny CONNECT !SSL_ports sta bloccando la connessione ai tuoi non SSL_ports. Blocchi di Squid per impostazione predefinita: http://wiki.squid-cache.org/SquidFaq/SecurityPitfalls#The_Safe_Ports_and_SSL_Ports_ACL

Si desidera solo consentire a SSL di connettersi ai proxy inversi. Supponendo che, mettere questo in cima alla vostra squid.conf:

https_port 443 cert=/path/to/CertAuth/testcert.cert key=/path/to/CertAuth/testkey.pem defaultsite=mywebsite.mydomain.com vhost 
cache_peer 10.112.62.20 parent 80 0 no-query originserver login=PASS name=websiteA 

acl sites_server_1 dstdomain websiteA.mydomain.com 
cache_peer_access websiteA allow sites_server_1 
http_access allow sites_server_1 

(extracted from: http://wiki.squid-cache.org/ConfigExamples/Reverse/SslWithWildcardCertifiate) 

Hai voglia di leggere tutta la documentazione però.

Ecco maggiori informazioni sui calamari e SSL (assolutamente leggere): http://wiki.squid-cache.org/Features/HTTPS

+0

Credo che il '!' in "! SSL_ports" significa NOT, quindi blocca tutte le porte che NON sono porte SSL. – Ninjaxor

+1

Hai ragione, questa linea in effetti significa: "Nega CONNECT su porte SSL non protette" – leroyse

Problemi correlati