mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-17 18:45:03 +03:00
feat(xray): edit Lua DNS and routing scripts
xray-core 26.10.10 can hand DNS and routing to Lua: dns.script and routing.script name a .lua file (absolute, or found next to the Xray binary) that defines HandleDNSQuery / HandleRoute, and a DNS server's id is how a DNS script picks it. The keys round-tripped through the JSON template but had no field. - DNS: a Lua Script field, and an ID field in the server modal; - Basics: a Routing Script field beside the routing strategy; - Routing: a warning above the rules while a script is set, since the core then routes only through the script and skips every rule, the panel's api rule included. The descriptions say the script must still send the api inbound to the api outbound, and that Xray will not start if the file is missing. An empty field drops the key, because the core rejects an empty path.
This commit is contained in:
@@ -2393,7 +2393,11 @@
|
||||
"clearAll": "Delete All",
|
||||
"clearAllTitle": "Delete all DNS servers?",
|
||||
"clearAllConfirm": "This removes every DNS server from the list. This cannot be undone.",
|
||||
"dnsLeakWarning": "DNS can leak through localhost, plain UDP/TCP, local-mode DoH/DoQ, fallback queries, or EDNS client IP. Use routed DoH, hosts pins, and disable fallback when privacy matters."
|
||||
"dnsLeakWarning": "DNS can leak through localhost, plain UDP/TCP, local-mode DoH/DoQ, fallback queries, or EDNS client IP. Use routed DoH, hosts pins, and disable fallback when privacy matters.",
|
||||
"script": "Lua Script",
|
||||
"scriptDesc": "Path to a .lua file defining HandleDNSQuery, absolute or relative to the Xray bin folder. The script then answers every query and reaches the servers only through its own code. Xray will not start if the file is missing or invalid.",
|
||||
"serverId": "ID",
|
||||
"serverIdDesc": "The name a Lua DNS script uses to pick this server"
|
||||
},
|
||||
"fakedns": {
|
||||
"add": "Add Fake DNS",
|
||||
@@ -2401,7 +2405,10 @@
|
||||
"poolSize": "Pool Size"
|
||||
},
|
||||
"defaultOutbound": "Default Outbound",
|
||||
"defaultOutboundDesc": "Traffic that does not match any routing rule uses this outbound (Xray uses the first outbound in the list)."
|
||||
"defaultOutboundDesc": "Traffic that does not match any routing rule uses this outbound (Xray uses the first outbound in the list).",
|
||||
"routingScript": "Routing Script",
|
||||
"routingScriptDesc": "Path to a .lua file defining HandleRoute, absolute or relative to the Xray bin folder. The script then picks every route and Xray ignores all routing rules, the panel's api rule included: send the api inbound to the api outbound or traffic stats and live client changes stop. Xray will not start if the file is missing or invalid.",
|
||||
"routingScriptActive": "A routing script is set under {section}, so Xray ignores these rules."
|
||||
},
|
||||
"sponsors": {
|
||||
"title": "Sponsors",
|
||||
|
||||
Reference in New Issue
Block a user