ficapy
11/20/2015 - 7:22 AM

Ubuntu/Debian HTTPS PROXY(nghttp2+squid3)

Ubuntu/Debian HTTPS PROXY(nghttp2+squid3)

apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools
mkdir /nghttp2
git clone https://github.com/tatsuhiro-t/nghttp2.git
cd nghttp2

autoreconf -i
automake
autoconf
./configure
make
make install
echo lib > /etc/ld.so.conf.d/nghttp2.conf
ldconfig

nghttp -nv https://nghttp2.org

mkdir /etc/nghttpx
cd /etc/nghttpx
vi nghttpx.conf

###############################
frontend=0.0.0.0,443
backend=127.0.0.1,3128
private-key-file=/etc/nghttpx/www.key
certificate-file=/etc/nghttpx/www.crt
http2-proxy=yes
###############################


cp nghttpx-init /etc/init.d/nghttpx
cp nghttpx.service /lib/systemd/system/

service nghttpx start

netstat -apn

apt-get install -y squid
vi /etc/squid3/squid.conf

###############################
http_port 127.0.0.1:3128
http_access allow localhost

# 关闭缓存功能和日志功能
cache deny all
access_log none

# 优先访问 IPv4 站点,有完整 IPv6 支持的机器可以去掉
dns_v4_first on
# 不添加 Via 头
via off
# 删除 X-Forwarded-For 头
forwarded_for delete
###############################

service squid3 start