nginx前向代理https要求如果发生以下情况,则必须使用前向代理:
我们的客户端不能直接访问服务器。 相反,其他客户端可以访问,而我们的客户端则访问其他客户端
网络是畅通的。
如何构建正向代理并使用nginx
使用squid。 其他方式
注
本人的建造方法是nginx
使用nginx构建正向代理nginx源代码(1.14.2 ) ) ) ) ) ) ) ) )。
支持nginxconnect的patch : git clone https://github.com/chobits/ngx _ http _ proxy _ connect _ module.git
nginx依赖项—在上nginx.org中查找nginx依赖项
编译过程cd /path/to/nginx
patch-P1/path/to/ngx _ http _ proxy _ connect _ module/patch/proxy _ connect _ rewrite _ 1014.patch
./configure-- add-module=/path/to/ngx _ http _ proxy _ connect _ modulemakeinstall 3360默认为/usr/local
更改配置#resolver 119.29.29.29; 资源器8.8.8.8; 服务器{ listen 6666; proxy_connect; proxy_connect_allow 443 563; proxy _ connect _ connect _ time out 10s; proxy_connect_read_timeout 10s; proxy_connect_send_timeout 10s; 位置/{ proxy _ pass http://$ host; proxy_set_header Host $host; }
启动nginx sbin/nginx-c conf/nginx.conf
客户端链接其他客户端(chrome ) )。
使用Proxy SwitchySharp获取Manual Configuration
http proxy=otherClient ip
Port=6666
选中usethesameproxyserverforallprotocols
使用该配置
然后,chrome中的所有请求都通过此代理访问服务