2.节点搭建教程

环境:Debian 12 x64

1.安装xul

bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

2.端口加IP访问xui面板(访问打不开,防火墙,输入ufw disable)

3.安装nginx:   apt install nginx

4.修改nginx.conf配置文件 ,/etc/nginx/,找到文件打开,全部替换,注意端口8388与54321与你设置的要一样

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
  worker_connections 768;
}

http {

 server {
    listen 80 default_server;
    listen [::]:80 default_server;

   ssl_protocols         TLSv1.2 TLSv1.3;
   ssl_ciphers           ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
   ssl_prefer_server_ciphers off;
location / {
  proxy_pass https://www.bing.com; #伪装网址
  proxy_ssl_server_name on;
  proxy_redirect off;
  sub_filter_once off;
  sub_filter "www.bing.com" $server_name;
  proxy_set_header Host "www.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";
    }

   location /ray {
    proxy_redirect off;
    proxy_pass http://127.0.0.1:8388;
    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;
    }

   location /xui {
    proxy_redirect off;
    proxy_pass http://127.0.0.1:54321;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
   }
 }
}

5.重新加载nginx配置:systemctl reload nginx.service

开启nginx,systemctl start nginx

查看ng状态,输入systemctl status nginx

版权声明:
作者:song
链接:https://apepine.com/archives/75
来源:猿猿松
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>