快速导航
如果从上一篇 结尾处过来,请从1开始; 如果已经安装好v2ray-core(-mini),请从6开始;
具体步骤
下载v2ray的luci-app插件: https://github.com/kuoruan/luci-app-v2ray/releases
下载v2ray-core核心组件: https://github.com/kuoruan/openwrt-v2ray/releases
(如果/挂载点的可用空间低于32MB,建议使用v2ray-core-mini版本,再手动拷贝geoip.dat
与geosite.dat
到/usr/bin/
下) 这里分享一个小技巧,在不知道路由器具体架构的情况下,可以通过SSH登录到路由器中,执行opkg print-architecture
查看已安装的应用是面向什么架构的,从而反推出本机的CPU架构,如我本机的示例如下,由此可得应该下载mipsel_24kc
架构的版本:
~# opkg print-architecture
arch all 1
arch noarch 1
arch mipsel_24kc 10
不要使用路由器管理页面自带的Upload功能安装;将下载的IPK文件通过scp
拷贝到路由器中: scp luci-app-v2ray_2.0.0-1_all.ipk root@192.168.1.1:/tmp/
scp v2ray-core_4.40.1-1_mipsel_24kc.ipk root@192.168.1.1:/tmp/
(具体的文件名与目标IP地址根据实际情况修改) SSH登录到路由器,并依次执行如下命令: opkg update
opkg remove dnsmasq
opkg install /tmp/luci-app-v2ray_2.0.0-1_all.ipk
opkg install /tmp/v2ray-core_4.40.1-1_mipsel_24kc.ipk
如果安装过程中发现如下报错信息,则需要再执行一下mv /etc/config/dhcp-opkg /etc/config/dhcp
:
Collected errors:
* resolve_conffiles: Existing conffile /etc/config/dhcp is different from the conffile in the new package. The new conffile will be placed at /etc/config/dhcp-opkg.
root@OpenWrt:~# mv /etc/config/dhcp-opkg /etc/config/dhcp
重启路由器 登录账号后可以看到顶部导航栏多了一个Services(服务): 配置如图: Global Settings Inbound -> dokodemo_door Outbound -> vmess Transparent Proxy 添加防火墙规则 Network -> Firewall -> Traffic Rules -> Add 重新启动V2Ray即可;