| | 31 | |
| | 32 | = forward proxy with SSL = |
| | 33 | * http://wiki.squid-cache.org/Features/HTTPS#Encrypted_browser-Squid_connection |
| | 34 | > Unfortunately, popular modern browsers do not permit configuration of TLS/SSL encrypted proxy connections. |
| | 35 | * IE 9/Firefox 17/Chrome 23では、chromeのみ(23.0.1271.97)サポートしている模様 |
| | 36 | * [http://dev.chromium.org/developers/design-documents/secure-web-proxy Secure Web Proxy - The Chromium Projects] |
| | 37 | * {{{chrome --proxy-pac-url=D:\ssl.pac}}}のようにして起動する |
| | 38 | {{{ |
| | 39 | function FindProxyForURL(url, host) { return "HTTPS proxy.example.jp:8443"; } |
| | 40 | }}} |
| | 41 | * インターネットオプション > 接続 > LANの設定 > 自動構成スクリプト に {{{file://D:/ssl.pac}}} のように指定することも出来るが、IEその他のクライアントにも影響が出るため好ましくない |
| | 42 | |
| | 43 | == --enable-ssl == |
| | 44 | * Ubuntu 12.04のsquid3パッケージは、httpsサイトへのプロクシとしては動作するが、configure --enable-sslされていないため、リビルドが必要 |
| | 45 | |
| | 46 | * [http://ubuntuforums.org/showthread.php?t=2049290 (SOLVED) Squid3-3.1.19 on Ubuntu 12.04 - https ssl shebang - Ubuntu Forums] |
| | 47 | |
| | 48 | * 必要なパッケージ |
| | 49 | * mitty@test:~$ sudo aptitude build-dep squid3 |
| | 50 | {{{ |
| | 51 | Unable to satisfy the build-depends: Build-Depends: libcap2-dev. |
| | 52 | }}} |
| | 53 | * mitty@test:~$ sudo aptitude install -R devscripts |
| | 54 | * debuildを含むパッケージ -> [../../Linux/Packages#buildpackages] |
| | 55 | * mitty@test:~$ sudo aptitude install -R libcap2-dev |
| | 56 | {{{ |
| | 57 | Note: selecting "libcap-dev" instead of the |
| | 58 | virtual package "libcap2-dev" |
| | 59 | The following NEW packages will be installed: |
| | 60 | libcap-dev |
| | 61 | }}} |
| | 62 | * 不足していると、{{{debuild -us -uc}}}が以下のエラーで失敗する |
| | 63 | {{{ |
| | 64 | dpkg-checkbuilddeps: Unmet build dependencies: libcap2-dev |
| | 65 | }}} |
| | 66 | * mitty@test:~$ sudo aptitude install -R libssl-dev |
| | 67 | * 不足していると、{{{debuild -us -uc}}}が以下のエラーで失敗する |
| | 68 | {{{ |
| | 69 | ../../src/ssl/gadgets.h:39:1: error: variable or field 'X509_free_cpp' declared void |
| | 70 | ../../src/ssl/gadgets.h:39:1: error: 'X509' was not declared in this scope |
| | 71 | ../../src/ssl/gadgets.h:39:1: error: 'a' was not declared in this scope |
| | 72 | ../../src/ssl/gadgets.h:40:21: error: 'X509' was not declared in this scope |
| | 73 | }}} |
| | 74 | * [http://en.usenet.digipedia.org/thread/17566/16089/ i'm having a problem while compiling squid 3.2.0.12 (since 3.2.0.6) on ubuntu server] |
| | 75 | |
| | 76 | * mitty@test:~$ apt-get source squid3 |
| | 77 | {{{ |
| | 78 | Get:1 http://ftp.tsukuba.wide.ad.jp/Linux/ubuntu/ precise-updates/main squid3 3.1.19-1ubuntu3.12.04.1 (dsc) [1,912 B] |
| | 79 | Get:2 http://ftp.tsukuba.wide.ad.jp/Linux/ubuntu/ precise-updates/main squid3 3.1.19-1ubuntu3.12.04.1 (tar) [3,403 kB] |
| | 80 | Get:3 http://ftp.tsukuba.wide.ad.jp/Linux/ubuntu/ precise-updates/main squid3 3.1.19-1ubuntu3.12.04.1 (diff) [22.1 kB] |
| | 81 | }}} |
| | 82 | {{{ |
| | 83 | squid3-3.1.19/ |
| | 84 | squid3_3.1.19-1ubuntu3.12.04.1.debian.tar.gz |
| | 85 | squid3_3.1.19-1ubuntu3.12.04.1.dsc |
| | 86 | squid3_3.1.19.orig.tar.gz |
| | 87 | }}} |
| | 88 | |
| | 89 | * mitty@test:~$ vim squid3-3.1.19/debian/rules |
| | 90 | {{{#!diff |
| | 91 | --- rules 2012-06-20 07:44:17.000000000 +0900 |
| | 92 | +++ squid3-3.1.19/debian/rules 2012-12-31 06:20:56.484331684 +0900 |
| | 93 | @@ -35,6 +35,7 @@ |
| | 94 | --enable-esi \ |
| | 95 | --enable-zph-qos \ |
| | 96 | --enable-wccpv2 \ |
| | 97 | + --enable-ssl \ |
| | 98 | --disable-translation \ |
| | 99 | --with-logdir=/var/log/squid3 \ |
| | 100 | --with-pidfile=/var/run/squid3.pid \ |
| | 101 | }}} |
| | 102 | |
| | 103 | * mitty@test:~/squid3-3.1.19$ debuild -us -uc |
| | 104 | {{{ |
| | 105 | squid_3.1.19-1ubuntu3.12.04.1_amd64.deb |
| | 106 | squid3_3.1.19-1ubuntu3.12.04.1_amd64.deb |
| | 107 | squid3-common_3.1.19-1ubuntu3.12.04.1_all.deb |
| | 108 | squid3-dbg_3.1.19-1ubuntu3.12.04.1_amd64.deb |
| | 109 | squid-cgi_3.1.19-1ubuntu3.12.04.1_amd64.deb |
| | 110 | squidclient_3.1.19-1ubuntu3.12.04.1_amd64.deb |
| | 111 | squid-common_3.1.19-1ubuntu3.12.04.1_all.deb |
| | 112 | }}} |
| | 113 | |
| | 114 | == install debs == |
| | 115 | * 依存パッケージ |
| | 116 | * mitty@squid:~$ sudo aptitude install -R libcap2 libldap-2.4-2 libltdl7 libsasl2-2 ssl-cert squid-langpack |
| | 117 | * mitty@squid:~$ sudo dpkg -i squid3_3.1.19-1ubuntu3.12.04.1_amd64.deb squid3-common_3.1.19-1ubuntu3.12.04.1_all.deb |
| | 118 | * mitty@squid:~$ squid3 -v |
| | 119 | {{{ |
| | 120 | Squid Cache: Version 3.1.19 |
| | 121 | configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm,' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-arp-acl' '--enable-esi' '--enable-zph-qos' '--enable-wccpv2' '--enable-ssl' '--disable-translation' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' --with-squid=/home/mitty/squid3-3.1.19 |
| | 122 | }}} |
| | 123 | * オリジナルのconfigure options |
| | 124 | * mitty@test:~$ squid3 -v |
| | 125 | {{{ |
| | 126 | Squid Cache: Version 3.1.19 |
| | 127 | configure options: '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm,' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-arp-acl' '--enable-esi' '--enable-zph-qos' '--enable-wccpv2' '--disable-translation' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security' --with-squid=/build/buildd/squid3-3.1.19 |
| | 128 | }}} |