用户工具

站点工具


xnix:nghttpx_http2_tls_proxy
no way to compare when less than two revisions

差别

这里会显示出您选择的修订版和当前版本之间的差别。


前一修订版
xnix:nghttpx_http2_tls_proxy [2021/08/18 11:13] (当前版本) – [使用 nghttpx 搭建一个 HTTPS PROXY] Hshh
行 1: 行 1:
 +====== 使用 nghttpx 搭建一个 HTTPS PROXY ======
  
 +背景介绍: nghttpx+3proxy做https proxy, 其中3proxy的http proxy监听地址为127.0.0.1:12344
 +
 +本案例, 将nghttpx监听在所有地址的12345端口.
 +
 +在 FreeBSD 中, nghttpx 位于 ports 的 www/nghttp2. 如果需要ocsp, 务必同时安装python
 +
 +配置文件如下
 +<code>
 +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
 +</code>
 +
 +附件为 FreeBSD 的启动脚本
 +{{:freebsd:nghttpx_multi|}}
 +
 +=== 20200130 更新 ===
 +由于实测h2 proxy的速度不如http/1.1的, 特别是上行速度非常低, 所以上述配置文件直接禁用了h2的npn, 强制服务端只允许http/1.1
xnix/nghttpx_http2_tls_proxy.txt · 最后更改: 2021/08/18 11:13 由 Hshh