New for update all beofore files
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
# Debian12 下 Xray + v2rayA 手动安装全记录
|
||||
## 一、准备工作(补齐基础工具)
|
||||
apt update
|
||||
apt install curl wget unzip net-tools vim nano -y
|
||||
|
||||
这里可以先自行下载好软件,因为有可能在线下载不成功。下载地址:
|
||||
v2RayA下载地址:https://github.com/v2rayA/v2rayA/releases
|
||||
xRay-Core下载地址:https://github.com/XTLS/Xray-core/releases
|
||||
下载完成后把这两个文件放在/tmp目录下。
|
||||
|
||||
## 二、安装 Xray 核心
|
||||
cd /tmp
|
||||
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
|
||||
已下载则跳过上面wget。
|
||||
unzip Xray-linux-64.zip -d xray-core
|
||||
mkdir -p /usr/local/share/xray
|
||||
cp xray-core/*.dat /usr/local/share/xray/
|
||||
install -Dm755 xray-core/xray /usr/local/bin/xray
|
||||
xray -version
|
||||
|
||||
## 三、安装 v2rayA(二进制版)
|
||||
cd /tmp
|
||||
wget https://github.com/v2rayA/v2rayA/releases/download/v2.3.3/v2raya_linux_x64_2.3.3
|
||||
已下载则跳过上面wget。
|
||||
install -Dm755 v2raya_linux_x64_2.3.3 /usr/local/bin/v2raya
|
||||
v2raya –version
|
||||
|
||||
## 四、创建系统服务(开机自启 + 透明代理)
|
||||
tee /etc/systemd/system/v2raya.service > /dev/null << 'EOF'
|
||||
[Unit]
|
||||
Description=v2rayA Service
|
||||
After=network.target nss-lookup.target
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
LimitNPROC=500
|
||||
LimitNOFILE=1000000
|
||||
ExecStart=/usr/local/bin/v2raya
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable v2raya --now
|
||||
systemctl status v2raya
|
||||
关键点:如果是服务器版本的Debian,ExecStart 后面不要加 --lite,否则无法开启透明代理。如果是带 GNOME/KDE 的桌面版 Debian则需要加--lite。
|
||||
|
||||
## 五、放行防火墙(可选)
|
||||
如果用 nftables/iptables
|
||||
iptables -A INPUT -p tcp --dport 2017 -j ACCEPT
|
||||
如果用 ufw
|
||||
ufw allow 2017
|
||||
|
||||
## 六、Web 配置
|
||||
(1)浏览器访问 http://你的DebianIP:2017
|
||||
|
||||
(2)创建管理员账号,直接输入就可以了。
|
||||
|
||||
(3)导入你的 vless://xxxxx 节点
|
||||
|
||||
(4)选择节点(在节点列表) → 点击 “启动”(界面的左上角)
|
||||
|
||||
(5)进入 “设置” → “透明代理/系统代理” → 选 “大陆白名单模式” → 保存
|
||||
|
||||
## 七、验证
|
||||
curl ip.sb # 应返回节点 IP
|
||||
curl -I https://www.google.com # 应返回 200
|
||||
apt update # 应正常更新
|
||||
|
||||
## ⚠️ 注意事项(避坑指南)
|
||||
坑点 说明
|
||||
--lite 参数 千万不能加,否则透明代理不可用
|
||||
端口 2017 Web 管理端口,防火墙需放行
|
||||
Xray 版本 建议用最新版,老版本可能不支持 VLESS
|
||||
服务状态 用 systemctl status v2raya 查看,确保 active
|
||||
Debian 版本 本流程适用于 Debian 11/12(含最小化安装)
|
||||
|
||||
## 🔁 如果以后要升级
|
||||
### 升级 Xray
|
||||
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
|
||||
|
||||
### 升级 v2rayA(手动下载新二进制替换)
|
||||
systemctl stop v2raya
|
||||
install -Dm755 ./新下载的v2raya文件 /usr/local/bin/v2raya
|
||||
systemctl start v2raya
|
||||
|
||||
Reference in New Issue
Block a user