MegaMango
Occasional Visitor
ASUSWRT Merlin XrayUI (github) is a lightweight interface for routers running ASUSWRT-Merlin firmware (384.15+ or 3006.102.1+).
It installs Xray from Entware and integrates directly into your router’s VPN menu via a new “X-RAY” tab. You can quickly set up Xray as a server (to accept client connections) or as a client (to route LAN traffic through external Xray servers).
		
	
		
	
		
	
		
	
RT-BE88U, RT-AX88U, RT-AX58U, RT-AX86U, GT-AX11000 Pro
	
	
	
		
	
	
	
		
This will stop xray and cleanup xrayui from your router.
				
			It installs Xray from Entware and integrates directly into your router’s VPN menu via a new “X-RAY” tab. You can quickly set up Xray as a server (to accept client connections) or as a client (to route LAN traffic through external Xray servers).
Screenshots
Features
- Client & Server Modes
- Client: Routes all local devices through a remote Xray server for secure, VPN-like connectivity.
 - Server: Accepts inbound connections from external clients—ideal for remote access or private networking.
 
 - uuids/passes/keys/certificates generation - Generate cryptographic materials within the router’s web interface; no external utilities required.
 - Automated Firewall/iptables Rules - Dynamically configures and cleans up rules whenever Xray starts or stops.
 - Custom Scripts - Place advanced firewall or routing scripts in /jffs/xrayui_custom to run on startup/shutdown (client or server mode).
 - Supports Multiple Protocols - VMess, VLESS, Shadowsocks, Trojan, and more—all configurable without heavy terminal usage.
 - UI for One-Click Updates - Quickly check for and install new releases from the XrayUI interface.
 - QR Code Generation - Create QR codes for user profiles, making it easy to import configurations into Xray clients on various devices.
 - Almost all fields include detailed hints sourced from official Xray-core documentation.
 
Does it support my router?
In theory, XrayUI should work on any MerlinWrt-compatible router. So far confirmed working models include:RT-BE88U, RT-AX88U, RT-AX58U, RT-AX86U, GT-AX11000 Pro
Prerequisites
- ASUSWRT-Merlin firmware (384.15+ or 3006.102.1+)
 - Entware installed (can be done via the built-in amtm tool)
 
Installation
SSH into your router and run:
		Bash:
	
	wget -O /tmp/asuswrt-merlin-xrayui.tar.gz https://github.com/DanielLavrushin/asuswrt-merlin-xrayui/releases/latest/download/asuswrt-merlin-xrayui.tar.gz && rm -rf /jffs/addons/xrayui && tar -xzf /tmp/asuswrt-merlin-xrayui.tar.gz -C /jffs/addons && mv /jffs/addons/xrayui/xrayui /jffs/scripts/xrayui && chmod 0777 /jffs/scripts/xrayui && sh /jffs/scripts/xrayui install
	Usage
- Post-Installation: Log out of the router’s web UI and log back in.
 - Access X-RAY Tab: Go to the VPN menu; you’ll see a new “X-RAY” tab.
 
Custom Scripts
XrayUI already handles most iptables setup in both client and server modes. However, if you need additional routing rules, you can place custom scripts in /jffs/xrayui_custom:- firewall_server – runs when Xray starts in server mode
 - firewall_client – runs when Xray starts in client mode
 - firewall_cleanup – runs when Xray stops
Remember to make scripts executable (chmod +x). 
How to uninstall
just run
		Code:
	
	/jffs/scripts/xrayui uninstall
	Additional Setup Guides
For detailed, step-by-step instructions on configuring a router as either a client or server, check out these two guides:- Xray Server Configuration Guide – Learn how to configure your ASUS router to accept incoming Xray connections.
 - Xray Client Configuration Guide – Set up your router to route traffic through a remote Xray server.
 
Attachments
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							
	