OSDN Git Service

v2fly-geodata: Update to latest version
[v2raya/v2raya-openwrt.git] / README.md
1 # v2raya-openwrt
2
3 opkg feed of v2rayA for OpenWrt users.
4
5 [简体中文](README.zh-cn.md)
6
7 ## How to install
8
9 1. Add v2rayA usign key
10
11    > Make sure package `wget-ssl` is installed on your device
12
13    ```sh
14    wget https://osdn.net/projects/v2raya/storage/openwrt/v2raya.pub -O /etc/opkg/keys/94cc2a834fb0aa03
15    ```
16
17 2. Import v2rayA feed
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    # Japan mirror
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    # US mirror
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. Update feeds
29
30    ```sh
31    opkg update
32    ```
33
34 4. Install v2rayA and its dependencies
35
36    ```sh
37    opkg install v2raya
38
39    # Check your firewall implementation
40    # Install the following packages for the nftables-based firewall4 (command -v fw4)
41    # Generally speaking, install them on OpenWrt 22.03 and later
42    opkg install kmod-nft-tproxy
43    # Install the following packages for the iptables-based firewall3 (command -v fw3)
44    # Generally speaking, install them on OpenWrt 21.02 and earlier
45    opkg install iptables-mod-conntrack-extra \
46      iptables-mod-extra \
47      iptables-mod-filter \
48      iptables-mod-tproxy \
49      kmod-ipt-nat6
50
51    # Choose a core you'd like to use, v2ray or Xray
52    # If you have both installed, the latter is preferred by default
53    #
54    # Note from maintainer: due to broken tproxy support in v2ray, recommend using Xray instead
55    opkg install xray-core
56    # opkg install v2ray-core
57
58    # Optional
59    # opkg install v2fly-geoip v2fly-geosite
60    ```
61
62 ## How to use
63
64 - Method 1 - Configure via LuCI interface (for __OpenWrt 21.02 and higher__ version only)
65
66    1. Install LuCI app
67
68       ```sh
69       opkg install luci-app-v2raya
70       ```
71
72    2. Visit `http://<your_router_ip>/cgi-bin/luci/admin/services/v2raya` and complete setup.
73
74 - Method 2 - Configure via cli
75
76    1. Setup v2rayA
77
78       ```sh
79       # For advanced usage, please see /etc/config/v2raya
80       uci set v2raya.config.enabled='1'
81       uci commit v2raya
82       ```
83
84    2. Start v2rayA
85
86       ```sh
87       /etc/init.d/v2raya start
88       ```
89
90    3. Visit v2rayA webUI and enjoy
91
92       `http://<your_router_ip>:2017`