所选nginx配置
需开启IPV4/V6双栈
1 2 3 4
| listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| location / { proxy_pass http://www.baidu.com; proxy_set_header Host www.baidu.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; add_header Cache-Control no-cache; expires 12h; }
location /yourpath { proxy_redirect off; proxy_pass http://127.0.0.1:port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
|
v2ray快速安装
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
所选v2ray config.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| { "inbounds": [ { "port": port, "listen":"127.0.0.1", "protocol": "vmess", "settings": { "clients": [ { "id": "xxx-xxx-xxx-xxx-xxxxxx", "alterId": 233 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/yourpath" } } } ], "outbounds": [ { "protocol": "freedom", "settings": {} } ] }
|
CloudFlare开启强制https
开启CF代理,强制https