vps安装全新v2-ui面板自建xray节点


Debian更新系统

apt update -y

安装curl

apt-get update -y && apt-get install curl -y

安装依赖

1:apt-get install -y openssl cron socat curl unzip vim
2:curl https://get.acme.sh | sh
3:source ~/.bashrc                                       ##检查前两步是否有问题##

申请证书

.acme.sh/acme.sh --issue -d 你的域名 --standalone -k ec-256

下载证书及密钥

.acme.sh/acme.sh --installcert -d 你的域名 --fullchainpath /etc/ssl/private/你的域名.crt --keypath /etc/ssl/private/你的域名.key --ecc

赋予文件755权限

1:chmod 755 /etc/ssl/private
2:手动路径:/etc/ssl/private                          ##赋予证书及密钥755权限##
3:acme.sh --upgrade --auto-upgrade                   ##检查是否报错##

设置自动证书任务

vi /etc/ssl/private/xray-cert-renew.sh

替换以下模板内自己的域名

#!/bin/bash

.acme.sh/acme.sh --install-cert -d a-你的域名 --ecc --fullchain-file  /etc/ssl/private/你的域名.crt --key-file  /etc/ssl/private/你的域名.key
echo "Xray Certificates Renewed"

chmod +r /etc/ssl/private/你的域名.key
echo "Read Permission Granted for Private Key"

sudo systemctl restart xray
echo "Xray Restarted"

赋予文件权限

chmod +x /etc/ssl/private/xray-cert-renew.sh

设置自动任务

crontab -e

设置每月1号自动申请证书

0 1 1 * *   bash /etc/ssl/private/xray-cert-renew.sh

安装v2-ui面板

Github项目地址:https://github.com/sprov065/v2-ui

一键脚本

bash <(curl -Ls https://blog.sprov.xyz/v2-ui.sh)

安装BBR2加速

wget --no-check-certificate -q -O bbr2.sh "https://github.com/yeyingorg/bbr2.sh/raw/master/bbr2.sh" && chmod +x bbr2.sh && bash bbr2.sh auto

查看BBR2开启状态

sysctl -p

面板其它操作

v2-ui                  # 显示管理菜单 (功能更多)
v2-ui start            # 启动 v2-ui 面板
v2-ui stop             # 停止 v2-ui 面板
v2-ui restart          # 重启 v2-ui 面板
v2-ui status           # 查看 v2-ui 状态
v2-ui enable           # 设置 v2-ui 开机自启
v2-ui disable          # 取消 v2-ui 开机自启
v2-ui log              # 查看 v2-ui 日志
v2-ui update           # 更新 v2-ui 面板
v2-ui install          # 安装 v2-ui 面板
v2-ui uninstall        # 卸载 v2-ui 面板

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注