零基础保姆级小白节点搭建教学,目前最安全最稳定的搭建方式,通过x-ui面板实现单端口多用户合租

普度币 2022-11-21 3531

教程完全零基础手把手教学,只要跟着步骤来一定能成功搭建。
使用X-UI面板搭建vmess+ws+tls+web或者vless+ws+tls+web的节点,这是目前最安全的搭建方式
并且为了更进一步的安全,有些步骤甚至有点繁琐,这都是值得的,只有安全了才能实现省时省心
非常适合想有自己专属稳定的节点又不太愿意折腾的朋友。跳出翻墙出来学翻墙的怪圈。

至于高速稳定只有靠钞能力解决了,作为电信用户的我,刨除高攀不起的专线,个人承受范围内最好的线路是CN2 GIA
本教程使用的是搬瓦工CN2GIA线路,经过了三网优化,电信、移动、联通用户都能获得非常稳定的体验,实现全天稳定丝滑的科学上网体验,告别晚高峰拥堵的情况
考虑到GIA线路比较贵,最后给大家提供一种使用x-ui面板通过WS路径分流实现单端口多用户的合租方案,可以和你的朋友合租来分摊费用

完整视频教程

VPS购买

搬瓦工:https://bwh81.net/
优惠码: BWH3HYATVBJW

域名购买

namesilo:https://www.namesilo.com/
优惠码:oldtong

SSH工具

FinalShell:https://www.hostbuf.com/t/988.html

节点搭建

#更新软件源

apt update

#启用 BBR TCP 拥塞控制算法

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" > /etc/sysctl.conf
sysctl -p

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

#安装nginxapt install nginx

#安装acme:curl https://get.acme.sh | sh

#添加软链接:ln -s  /root/.acme.sh/acme.sh /usr/local/bin/acme.sh

#切换CA机构: acme.sh --set-default-ca --server letsencrypt

#申请证书: acme.sh  --issue -d 你的域名 -k ec-256 --webroot  /var/www/html

#安装证书:acme.sh --install-cert -d 你的域名 --ecc --key-file  /etc/x-ui/server.key  --fullchain-file /etc/x-ui/server.crt --reloadcmd     "systemctl force-reload nginx"

寻找适合的伪装站

http站点优先,个人网盘符合单节点大流量特征

示例关键字:intext:登录 Cloudreve

配置nginx

配置文件路径:/etc/nginx/nginx.conf

user www-data;worker_processes auto;pid /run/nginx.pid;include /etc/nginx/modules-enabled/*.conf;events {    worker_connections 1024;
}http {    sendfile on;    tcp_nopush on;    tcp_nodelay on;    keepalive_timeout 65;    types_hash_max_size 2048;    include /etc/nginx/mime.types;    default_type application/octet-stream;    gzip on;    server {        listen 443 ssl;        
        server_name nicename.co;  #你的域名
        ssl_certificate       /etc/x-ui/server.crt;  #证书位置
        ssl_certificate_key   /etc/x-ui/server.key; #私钥位置
        
        ssl_session_timeout 1d;        ssl_session_cache shared:MozSSL:10m;        ssl_session_tickets off;        ssl_protocols    TLSv1.2 TLSv1.3;        ssl_prefer_server_ciphers off;        location / {            proxy_pass https://bing.com; #伪装网址
            proxy_redirect off;            proxy_ssl_server_name on;            sub_filter_once off;            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";
        }        location /ray {   #分流路径
            proxy_redirect off;            proxy_pass http://127.0.0.1:10000; #Xray端口
            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 {   #xui路径
            proxy_redirect off;            proxy_pass http://127.0.0.1:9999;  #xui监听端口
            proxy_http_version 1.1;            proxy_set_header Host $host;
        }
    }    server {        listen 80;        location /.well-known/ {               root /var/www/html;
            }        location / {                rewrite ^(.*)$ https://$host$1 permanent;
            }
    }
}



每次修改nginx配置文件后必须使用 systemctl reload nginx 命令重新加载配置文件

多用户合租

通过修改nginx的配置文件实现ws path路径分流

location /ray {   #分流路径
    proxy_redirect off;    proxy_pass http://127.0.0.1:10000; #Xray端口
    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;
}
 最后修改:2022 年 09 月 26 日 11 : 31 PM


上传的附件:
最新回复 (0)
    • 普度社会大学
      2
          
返回
######
免责声明:本站内容资源源于网络,如有侵权请发邮件告知我们,我们将会在24小时内处理。