OSDN Git Service

v2raya: backport upstream fixes
[v2raya/v2raya-openwrt.git] / README.zh-cn.md
1 # v2raya-openwrt
2
3 适用于 OpenWrt 用户的 v2rayA opkg 软件源。
4
5 [English](README.md)
6
7 ## 安装方法
8
9 1. 导入 v2rayA 签名文件
10
11    > 请确认软件包 `wget-ssl` 已经正确地安装在您的设备上
12
13    ```sh
14    wget https://osdn.net/projects/v2raya/storage/openwrt/v2raya.pub -O /etc/opkg/keys/94cc2a834fb0aa03
15    ```
16
17 2. 添加 v2rayA 软件源
18
19    ```sh
20    echo "src/gz v2raya https://osdn.net/projects/v2raya/storage/openwrt/$(. /etc/openwrt_release && echo "$DISTRIB_ARCH")" | tee -a "/etc/opkg/customfeeds.conf"
21    ```
22
23 3. 更新软件源
24
25    ```sh
26    opkg update
27    ```
28
29 4. 安装 v2rayA 及其依赖
30
31    ```sh
32    opkg install v2raya
33
34    # 选择一个你喜欢的内核,v2ray 或 Xray
35    # 如果两个内核被同时安装,默认使用前者
36    #
37    # 维护者注:由于目前 v2ray 的透明代理支持欠佳,因此更推荐使用 Xray
38    opkg install xray-core
39    # opkg install v2ray-core
40
41    # 可选
42    # opkg install v2fly-geoip v2fly-geosite
43    ```
44
45 ## 使用方法
46
47 - 方法一:通过 LuCI 界面配置(仅适用于 __OpenWrt 21.02 或更高版本__)
48
49    1. 安装 LuCI app
50       ```sh
51       opkg install luci-app-v2raya luci-i18n-v2raya-zh-cn
52       ```
53
54    2. 访问 `http://<your_router_ip>/cgi-bin/luci/admin/services/v2raya` 并完成配置。
55
56 - 方法二:通过命令行配置
57
58    1. 配置 v2rayA
59
60       ```sh
61       # 详细配置请参见 /etc/config/v2raya
62       uci set v2raya.config.enabled='1'
63       uci commit v2raya
64       ```
65
66    2. 启动 v2rayA
67
68       ```sh
69       /etc/init.d/v2raya start
70       ```
71
72    3. 访问 v2rayA webUI 面板并完成设置
73
74       `http://<your_router_ip>:2017`