Follow these instructions to install and configure Xray on your router.
Tested on GL-MT3000
mkdir ~/xray
cd ~/xray
wget 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.json
in the~/xray
directory. - 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