Follow these instructions to install and configure Xray on your router.
Tested on GL-MT3000
ssh root@192.168.1.1mkdir ~/xray
cd ~/xraywget https://github.com/XTLS/Xray-core/releases/download/v24.11.11/Xray-linux-arm64-v8a.zip -O xray.zip
unzip xray.zip && rm xray.zip- In your Amnezia Client, go to
Share VPN Access -> Share -> XRay native format. - Save the provided configuration as
config.jsonin the~/xraydirectory. - Change
"listen": "127.0.0.1"to "listen": "0.0.0.0"
- Open and edit the init script for Xray:
vim /etc/init.d/xray- Add the following script to automate the start and stop of Xray:
#!/bin/sh /etc/rc.common
START=99
start() {
/root/xray/xray -config /root/xray/config.json &
}
stop() {
killall xray
}- Save and exit the file.
chmod +x /etc/init.d/xray/etc/init.d/xray enable
/etc/init.d/xray start