Linux服务器科学上网

1.下载V2rayA:https://github.com/v2rayA/v2rayA/releases
一般下载v2raya_linux_x64_xxxx版本

2.下载 v2ray-core 核心组件:https://github.com/XTLS/Xray-core/releases
下载最新版本的 Xray-linux-64.zip

3.将两个文件上传至服务器,例如/root/v2raya
mkdir /root/v2raya

4.mv /root/v2raya/xray /usr/local/bin/
chmod +x /usr/local/bin/xray

5.mv /root/v2raya/v2raya_linux_x64_2.3.3 /usr/local/bin/v2raya
chmod +x /usr/local/bin/v2raya

6.v2rayA 需要一个目录来存储它的配置文件。
mkdir -p /etc/v2raya

7.使用文本编辑器创建一个新的服务文件nano /etc/systemd/system/v2raya.service

[Unit]
Description=v2rayA Service
Documentation=https://v2raya.org/
After=network.target nss-lookup.target

[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/local/bin/v2raya --lite
Restart=on-failure
RestartSec=5
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

在 nano 编辑器中,按 Ctrl+O 保存,按 Enter 确认文件名,然后按 Ctrl+X 退出。

8.systemctl daemon-reload
启动服务
systemctl start v2raya.service
设置开机自启
systemctl enable v2raya.service
检查服务状态
systemctl status v2raya.service

9.v2rayA 的 Web 管理界面默认运行在 http://<你的服务器IP>:2017
可能没有科学环境,需要先手动下载一些文件
项目地址:https://github.com/Loyalsoldier/v2ray-rules-dat
v2raya需要下载下边两个文件 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
将两个文件放在/root/.local/share/xray/
不要开启透明代理,导入完节点之后直接点左上角的启动即可。

10.用不了再输入以下指令

export http_proxy=http://127.0.0.1:20171 export https_proxy=http://127.0.0.1:20171

用不了再输入以下指令

export no_proxy=”localhost,127.0.0.1,::1,.aliyuncs.com,.aliyun.com”
export NO_PROXY=”localhost,127.0.0.1,::1,.aliyuncs.com,.aliyun.com”

发表回复

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