include /etc/nginx/modules-enabled/*.conf;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_name nicename.co; #你的域名
ssl_certificate /etc/x-ui/server.crt; #证书位置
ssl_certificate_key /etc/x-ui/server.key; #私钥位置
ssl_session_cache shared:MozSSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
proxy_pass https://bing.com; #伪装网址
proxy_ssl_server_name on;
sub_filter "bing.com" $server_name;
proxy_set_header Host "bing.com";
proxy_set_header Referer $http_referer;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Accept-Encoding "";
proxy_set_header Accept-Language "zh-CN";
proxy_pass http://127.0.0.1:10000; #Xray端口
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;
proxy_pass http://127.0.0.1:9999; #xui监听端口
proxy_set_header Host $host;
rewrite ^(.*)$ https://$host$1 permanent;