openwrt
mzz edited this page Sep 1, 2021
·
7 revisions
Some utils are needed:
opkg update
opkg install ca-certificates wget unzip tar curl
opkg install ip-full kmod-ipt-nat6 iptables-mod-tproxy iptables-mod-filter iptables-mod-conntrack-extra iptables-mod-extra
Download and put v2ray-core files to /usr/bin
.
The latest link can be found at https://github.com/v2fly/v2ray-core/releases.
# For example:
wget https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-linux-64.zip
unzip -d v2ray-core v2ray-linux-64.zip
cp v2ray-core/v2ray v2ray-core/v2ctl /usr/bin
-
Install GUI:
cd /tmp latest_version=$(curl -s https://apt.v2raya.mzz.pub/dists/v2raya/main/binary-amd64/Packages|grep Version|cut -d' ' -f2) wget https://apt.v2raya.mzz.pub/pool/main/v/v2raya/web_v${latest_version}.tar.gz mkdir /etc/v2raya tar xzvf web_v${latest_version}.tar.gz --directory /etc/v2raya
-
Install Binary:
wget -O /usr/bin/v2raya https://apt.v2raya.mzz.pub/pool/main/v/v2raya/v2raya_linux_x64_v${latest_version} chmod +x /usr/bin/v2raya
-
Install Daemon File:
cat <<'EOF' >/etc/init.d/v2raya #!/bin/sh /etc/rc.common command=/usr/bin/v2raya PIDFILE=/var/run/v2raya.pid depend() { need net after firewall use dns logger } start() { start-stop-daemon -b -S -m -p "${PIDFILE}" -x $command } stop() { start-stop-daemon -K -p "${PIDFILE}" } EOF chmod +x /etc/init.d/v2raya
-
Start and auto-start
/etc/init.d/v2raya start /etc/init.d/v2raya enable
v2rayA will listen port 2017 by default.
Telegram User Group (International): https://t.me/v2raya
Telegram 用户交流群(中文): https://t.me/v2raya_zh