smart-routing

Configure and verify Xray routing rules on a 3x-ui panel by domain, geo token, or provider outbound.

5|3|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/pyworkload/3x-ui-mcp --skill smart-routing-pyworkload
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: smart-routing
Source: https://github.com/pyworkload/3x-ui-mcp/tree/main/skills/smart-routing
Command: npx skills add https://github.com/pyworkload/3x-ui-mcp --skill smart-routing-pyworkload

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Routing rules on a 3x-ui panel fail silently: geo tokens that do not exist never match, broad rules shadow narrow exceptions, and disabled sniffing makes every domain rule miss. This Skill guides building, ordering, validating, and verifying Xray routing so traffic actually goes where intended. ## Core Features & Use Cases - Rule construction and ordering: Add, update, and remove routing rules with correct index placement, since the first match wins and appended rules may never be reached. - Geo token validation: Check geosite and geoip tokens against the server's actual databases before saving, and browse categories instead of guessing names. - Provider outbounds: Register and manage Warp, NordVPN, and PIA outbounds, then target their tags from routing rules. - Router-based verification: Use test_route to see what the running core would do with a destination, plus balancer overrides and outbound health checks. - Use Case: Route OpenAI domains through Warp, block ads and bittorrent, and direct private IPs to the direct outbound, then confirm each rule matches and one unaffected destination still uses the default path. ## Quick Start Ask the agent to route geosite:openai through the Warp outbound on the 3x-ui panel, block the ads category, and verify both rules with test_route.

Frequently Asked Questions about smart-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route specific domains through Warp on 3x-ui?▼

Register Warp with manage_warp action="reg", find its outbound tag via get_outbounds, then add a routing rule with that outboundTag and the target domains such as geosite:openai. Verify the match with test_route before trusting it.

Why is my Xray domain routing rule not matching?▼

The most common cause is disabled sniffing on the inbound, which leaves the router seeing only IP addresses so every domain rule misses silently. Check get_inbound first, then confirm rule order since a broad rule above yours wins the first match.

How do I block ads or torrents with Xray routing rules?▼

Add a field rule with outboundTag "blocked" and domain ["geosite:category-ads-all"], plus a second rule matching protocol ["bittorrent"]. Validate the geosite token with validate_geodata_tokens first, because nonexistent tokens never match and produce no error.

Does test_route work on all 3x-ui panel versions?▼

No, test_route requires panel v3.3.1 or later, as do balancer status and override features. On older panels you must verify rules indirectly through get_xray_logs and outbound health checks.

What is the difference between a balancer override and a template change?▼

A balancer override set with set_balancer_override lives only in the running core and is forgotten on restart, making it suitable for temporary incident response. Any routing behavior that must survive a restart belongs in the saved Xray template.