我需要将 nginx 设置为 https 代理,但这不起作用:
$ export https_proxy="http://127.0.0.1:8081"
$ curl https://example.com
curl: (56) Received HTTP code 400 from proxy after CONNECT
Run Code Online (Sandbox Code Playgroud)
我的nginx.conf:
server {
listen 8081;
location / {
proxy_pass http://some.proxy.com:3128;
proxy_set_header Host $http_host;
}
}
Run Code Online (Sandbox Code Playgroud)