xnix:nghttpx_http2_tls_proxy
这是本文档旧的修订版!
使用 nghttpx 搭建一个 HTTPS PROXY
背景介绍: nghttpx+3proxy做https proxy, 其中3proxy的http proxy监听地址为127.0.0.1:12344
本案例, 将nghttpx监听在所有地址的12345端口.
在 FreeBSD 中, nghttpx 位于 ports 的 www/nghttp2. 如果需要ocsp, 务必同时安装python
配置文件如下
daemon=yes user=www frontend=*,12345 backend=127.0.0.1,12344 backend-connections-per-host=1024 fastopen=1024 http2-proxy=yes npn-list=http/1.1 server-name= tls-no-postpone-early-data=yes no-via=yes dh-param-file=/usr/local/etc/ssl/dh.pem certificate-file=/usr/local/etc/ssl/fullchain.pem private-key-file=/usr/local/etc/ssl/privkey.pem fetch-ocsp-response-file=/usr/local/share/nghttp2/fetch-ocsp-response cacert=/usr/local/etc/ssl/ca.pem
附件为 FreeBSD 的启动脚本 nghttpx_multi
20200130 更新
由于实测h2 proxy的速度不如http/1.1的, 特别是上行速度非常低, 所以上述配置文件直接禁用了h2的npn, 强制服务端只允许http/1.1
xnix/nghttpx_http2_tls_proxy.1717011513.txt.gz · 最后更改: 2024/05/30 03:38 由 Hshh