OpenWrt安装v2rayA教程,一看就会

简介

OpenWrt这个很多用软路由的都晓得,我们这期讲如何在OpenWrt下安装v2raya。

- openwrtv2raya

 

教程

v2rayA 自建软件源安装

添加 v2rayA 使用密钥

wget https://osdn.net/projects/v2raya/storage/openwrt/v2raya.pub -O /etc/opkg/keys/94cc2a834fb0aa03

导入 v2rayA feed

echo "src/gz v2raya https://osdn.net/projects/v2raya/storage/openwrt/$(. /etc/openwrt_release && echo "$DISTRIB_ARCH")" | tee -a "/etc/opkg/customfeeds.conf"

# Japan mirror
# echo "src/gz v2raya https://ftp.jaist.ac.jp/pub/sourceforge.jp/storage/g/v/v2/v2raya/openwrt/$(. /etc/openwrt_release && echo "$DISTRIB_ARCH")" | tee -a "/etc/opkg/customfeeds.conf"
# US mirror
# echo "src/gz v2raya https://mirrors.gigenet.com/OSDN/storage/g/v/v2/v2raya/openwrt/$(. /etc/openwrt_release && echo "$DISTRIB_ARCH")" | tee -a "/etc/opkg/customfeeds.conf"

更新一下

opkg update

安装 v2rayA 及其依赖项

opkg install v2raya

# Check your firewall implementation
# Install the following packages for the nftables-based firewall4 (command -v fw4)
# Generally speaking, install them on OpenWrt 22.03 and later
opkg install kmod-nft-tproxy
# Install the following packages for the iptables-based firewall3 (command -v fw3)
# Generally speaking, install them on OpenWrt 21.02 and earlier
opkg install iptables-mod-conntrack-extra \
  iptables-mod-extra \
  iptables-mod-filter \
  iptables-mod-tproxy \
  kmod-ipt-nat6

# Choose a core you'd like to use, v2ray or Xray
# If you have both installed, the latter is preferred by default
#
# Note from maintainer: due to broken tproxy support in v2ray, recommend using Xray instead
opkg install xray-core
# opkg install v2ray-core

# Optional
# opkg install v2fly-geoip v2fly-geosite

通过LuCI接口配置(仅适用于OpenWrt 21.02及更高版本)

opkg install luci-app-v2raya

访问web页面

访问http://<your_router_ip>/cgi-bin/luci/admin/services/v2raya并完成设置。

 

通过 OpenWrt 官方软件源安装

使用 OpenWrt 21.02 或更高版本的用户可以直接从软件源安装。

opkg update
opkg install v2raya

 

通过手动安装v2raya

首先安装软件包 unzip 与 wget,然后从 Github Releases 下载 V2Ray 核心并将其保存到 /usr/bin/,最后赋予二进制文件可执行权限

opkg update; opkg install unzip wget-ssl
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
chmod +x /usr/bin/v2ray; chmod +x /usr/bin/v2ctl

安装依赖包与内核模块,OpenWrt 22.03 或更新版本:

opkg update
opkg install \
    ca-bundle \
    ip-full \
    kmod-nft-tproxy

安装依赖包与内核模块,OpenWrt 21.02 或更早版本:

opkg update
opkg install \
    ca-bundle \
    ip-full \
    iptables-mod-conntrack-extra \
    iptables-mod-extra \
    iptables-mod-filter \
    iptables-mod-tproxy \
    kmod-ipt-nat6

从 Github Releases 下载最新版本对应处理器架构的二进制文件,然后移动到 /usr/bin/ 并赋予可执行权限

wget https://github.com/v2rayA/v2rayA/releases/download/v2.0.5/v2raya_linux_x64_2.0.5 -O v2raya
mv v2raya /usr/bin/v2raya && chmod +x /usr/bin/v2raya

下载配置文件和服务文件

wget https://raw.githubusercontent.com/openwrt/packages/master/net/v2raya/files/v2raya.config -O /etc/config/v2raya
wget https://raw.githubusercontent.com/openwrt/packages/master/net/v2raya/files/v2raya.init -O /etc/init.d/v2raya
chmod +x /etc/init.d/v2raya

启用并运行 v2rayA

uci set v2raya.config.enabled='1'
uci commit v2raya
/etc/init.d/v2raya enable
/etc/init.d/v2raya start
上一篇 RackNerd:美国、荷兰等7机房可选/1Gbps带宽/2TB流量,年付只要11.38美元/年
下一篇 onetechcloud:VPS全场8折,低至28元,香港CN2/香港CMI/美国CN2GIA(原生IP)/美国CN2GIA+高防/美国CU2(原生IP)

投稿邮箱:
ivpsr888@gmail.com (投稿详情)

TG订阅频道:
t.me/ivpsr_news 网站最新内容推送

TG交流群:
(点击加入) 用户交流

文章列表
1
justhost夏初特惠VPS全场5折,23个机房可选,大带宽不限流量/支持免费换 IP
justhost夏初特惠VPS全场5折,23个机房可选,大带宽不限流量/支持免费换 IP
2
DediRock洛杉矶大硬盘VPS测评,低价冷数据存储、1TB仅5.99美元、美国原生IP
DediRock洛杉矶大硬盘VPS测评,低价冷数据存储、1TB仅5.99美元、美国原生IP
3
dedipath:首月优惠2.5折,美国VPS低至0.87美元/月,独立服务器低至$39/月,10个可选机房
dedipath:首月优惠2.5折,美国VPS低至0.87美元/月,独立服务器低至$39/月,10个可选机房
4
666clouds德国双ISP属性VPS补货,月付8.5折51元起、全新原生IP、德国机房
666clouds德国双ISP属性VPS补货,月付8.5折51元起、全新原生IP、德国机房
5
inetWS法国巴黎VPS测评,原生IP 7.5折$3/月起,解锁TikTok/ Netflix/ChatGPT等多平台
inetWS法国巴黎VPS测评,原生IP 7.5折$3/月起,解锁TikTok/ Netflix/ChatGPT等多平台
6
WindTerm一款开源SSH工具分享
WindTerm一款开源SSH工具分享
7
LOCVPS八折特惠月付24元起,美国、日本、韩国、香港机房、CN2、BGP、CMI线路可选、原生IP
LOCVPS八折特惠月付24元起,美国、日本、韩国、香港机房、CN2、BGP、CMI线路可选、原生IP
8
vmiss双节促销:全场VPS最低107元/年,香港/韩国/日本/美国/英国全优化线路,七折优惠!
vmiss双节促销:全场VPS最低107元/年,香港/韩国/日本/美国/英国全优化线路,七折优惠!
9
2020双11某宝自动养猫+自动领淘金币APP全程挂机放飞双手(可自动升级)
2020双11某宝自动养猫+自动领淘金币APP全程挂机放飞双手(可自动升级)
10
野草云香港VPS低至月付22元,可选Intel/AMD/不限流量,支持多种BGP与高防线路,
野草云香港VPS低至月付22元,可选Intel/AMD/不限流量,支持多种BGP与高防线路,