Connect your entire home internet through one router. Step-by-step instructions for Xray and AmneziaWG on OpenWRT and Keenetic.
On your computer in the terminal run:
ssh root@192.168.1.1
Run the install script:
sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)
reboot
Wait 30–60 seconds for the router to boot up.
Open the router web panel → Network → Interfaces → Add new interface.
In the interface settings click Load configuration and upload the .conf file from your personal account, or paste its contents.
Go to Network → Firewall → Zones → Add:
Click Save & Apply, then reboot the router via System → Reboot.
After booting, check the IP on any device — it should match the server location.
ssh root@192.168.1.1
wget https://downloads.sourceforge.net/project/v2raya/openwrt/v2raya.pub -O /etc/opkg/keys/94cc2a834fb0aa03 echo "src/gz v2raya https://downloads.sourceforge.net/project/v2raya/openwrt/$(. /etc/openwrt_release && echo "$DISTRIB_ARCH")" | tee -a "/etc/opkg/customfeeds.conf"
opkg update
opkg install v2raya xray-core kmod-nft-tproxy iptables-nft
opkg install luci-app-v2raya
uci set v2raya.config.enabled='1' uci commit v2raya /etc/init.d/v2raya enable /etc/init.d/v2raya start
Go to:
http://192.168.1.1:2017
On first login create an administrator login and password.
In your FRKN personal account select the Xray protocol, copy the link or download the config.
In v2rayA go to Subscriptions → Add, paste the link and update. Or import the config manually via Import.
Select the desired server in the list → click Not running at the top of the page to switch to Running.
Transparent proxy mode (Transparent Proxy / System Proxy) is usually enabled by default — all LAN traffic will go through Xray.
On any device on the network check the IP address — it should match the server location.
logread -f | grep v2raya
Management → System settings → Components → find WireGuard VPN → install.
In your FRKN personal account select the AmneziaWG protocol and download the .conf file.
Internet → Other connections → WireGuard → Import from file. Select the downloaded .conf file.
Tap the created connection → enable Use for internet access → Save.
Go to Internet → Connection policies → Add policy. Name it, for example, VPN.
In the same policy go to the Policy binding tab and drag the needed devices into the VPN policy.
Internet → Other connections → WireGuard → enable the created connection. After a few seconds the status should turn green.
Follow steps 1–4 of the automatic variant: install the component, import the .conf, enable "Use for internet access", but do not enable the connection itself.
Open the router web CLI (gear → Command line) and run:
show interface
Find your connection in the output by name and remember the interface-name value (e.g., Wireguard0).
From the config take the values Jc, Jmin, Jmax, S1, S2, H1–H4.
interface Wireguard0 wireguard asc 5 42 54 0 0 1 2 3 4
system configuration save
Then configure the connection policy (steps 5–7 of the automatic variant) and enable the connection.
Management → System settings → Components → install Entware.
Connect via SSH to the router and run:
opkg update && opkg upgrade opkg install curl curl -sL https://raw.githubusercontent.com/hoaxisr/awg-manager/master/scripts/install.sh | sh
wget -qO- http://repo.hoaxisr.ru/install.sh | sh
After installation AWG Manager is available at the router address on port 2222.
http://192.168.1.1:2222
In the AWG Manager web interface add a new tunnel and import the .conf file from your FRKN personal account.
Prepare a USB flash drive in EXT4 format, connect it to the router.
Management → System settings → Components → enable OPKG and Entware.
/opt/etc/init.d/rc.unslung.
Login: root, default password:
keenetic (change immediately via passwd).
ssh root@192.168.1.1
opkg update && opkg upgrade && opkg install curl tar && cd /tmp sh -c "$(curl -sSL https://raw.githubusercontent.com/jameszeroX/XKeen/main/install.sh)"
curl -OL https://github.com/jameszeroX/XKeen/releases/latest/download/xkeen.tar.gz && tar -xvzf xkeen.tar.gz -C /opt/sbin && rm xkeen.tar.gz && xkeen -i
During XKeen installation it will ask about GeoIP and GeoSite — it is recommended to install both (choose option 1).
Then enable automatic update (option 1) and specify a convenient time.
In your FRKN personal account select the Xray protocol and copy the subscription link or download the JSON config.
/opt/etc/xray/configs/. The main outbound config is
usually named 04_outbounds.json.
Via SCP / WinSCP or SFTP upload the ready config to:
/opt/etc/xray/configs/config.json
Or, if you have a link like vless://..., use a config
generator (e.g.,
RouteSense XKeen config generator) and put the resulting JSON in the specified folder.
xkeen -start
Or restart if you changed the config:
xkeen -restart
Check status:
xkeen -status
Go to the router web interface:
If you use XTLS-Reality, Keenetic may occupy port 443. Move it, for example, to 8443:
ip http ssl port 8443 system configuration save
xxxx.keenetic.link:8443.
On a device in the XKeen policy check the IP address — it should match the server location.
xkeen -diag or logread | grep xray