OSDN Git Service

xray-core: Update to 1.8.0
[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    # 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"
24    # 美国镜像
25    # 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"
26    ```
27
28 3. 更新软件源
29
30    ```sh
31    opkg update
32    ```
33
34 4. 安装 v2rayA 及其依赖
35
36    ```sh
37    # 使用 Xray 内核:
38    opkg install v2raya
39
40    # 使用 v2ray 内核:
41    opkg install v2raya2
42
43    # 注:不可同时安装 v2raya 和 v2raya2。
44    #     由于 v2ray 内核的透明代理支持欠佳,目前更推荐使用 Xray 内核。
45
46    # 可选
47    # opkg install v2fly-geoip v2fly-geosite
48    ```
49
50 ## 使用方法
51
52 - 方法一:通过 LuCI 界面配置(仅适用于 __OpenWrt 21.02 或更高版本__)
53
54    1. 安装 LuCI app
55       ```sh
56       opkg install luci-app-v2raya luci-i18n-v2raya-zh-cn
57       ```
58
59    2. 访问 `http://<your_router_ip>/cgi-bin/luci/admin/services/v2raya` 并完成配置。
60
61 - 方法二:通过命令行配置
62
63    1. 配置 v2rayA
64
65       ```sh
66       # 详细配置请参见 /etc/config/v2raya
67       uci set v2raya.config.enabled='1'
68       uci commit v2raya
69       ```
70
71    2. 启动 v2rayA
72
73       ```sh
74       /etc/init.d/v2raya start
75       ```
76
77    3. 访问 v2rayA webUI 面板并完成设置
78
79       `http://<your_router_ip>:2017`