-
Clone this repository
git clone https://github.com/nofacer/v2ray-forward.git
-
Install v2ray
Online Install
wget https://install.direct/go.sh && \ sudo bash go.sh
Offline Install
sudo bash go.sh -l v2ray-linux-<64/arm>.zip
-
Config
Backup original config file
sudo mv /etc/v2ray/config.json /etc/v2ray/config.json.backup
Edit config
sudo cp config.json /etc/v2ray/config.json sudo vi /etc/v2ray/config.json
-
Run
Add to Path
PATH=$PATH:/usr/bin/v2ray
Test Config
v2ray -test -config /etc/v2ray/config.json
Commands
systemctl stop v2ray systemctl start v2ray systemctl restart v2ray
export http_proxy="http://<forward_server>:<forward_port>";\
export HTTP_PROXY="http://<forward_server>:<forward_port>";\
export https_proxy="http://<forward_server>:<forward_port>";\
export HTTPS_PROXY="http://<forward_server>:<forward_port>"
systemctl stop v2ray
systemctl disable v2ray
rm -rf /etc/v2ray/*
rm -rf /usr/bin/v2ray/*
rm -rf /var/log/v2ray/*
rm -rf /lib/systemd/system/v2ray.service
rm -rf /etc/init.d/v2ray