fix(singbox): fix Leadaxe (lx) version parsing regex and AWG startup on OpenWrt
- In action.uc: replace broken PCRE non-capturing regex in extract_sing_box_version_from_output with token-based field splitting. ucode POSIX regex engine threw 'Repetition not preceded by valid expression', crashing component_action during binary validation. - In telegram.uc: replace non-capturing group (?:outbounds|server|servers) with standard capturing group for POSIX regex compatibility. - In generator_outbounds.uc and servers.uc: enhance is_lx detection to check sing-box-version file in addition to sing-box-variant, ensuring AWG 2.0 root schema is generated even if variant file is desynced. - In runtime.uc: add fallback recovery in sing_box_check retry loop for endpoints (auto-flattening amnezia sub-objects) and outbounds unknown fields.
This commit is contained in:
@@ -305,7 +305,8 @@ function add_standard_inbound(config, section, protocol, tag_name) {
|
||||
let jmin = int_option(section, "awg_jmin", "40");
|
||||
let jmax = int_option(section, "awg_jmax", "70");
|
||||
if (jmax > 1200) jmax = 1200;
|
||||
let is_lx = trim(fs.readfile("/etc/tachyon/sing-box-variant") || "") == "lx";
|
||||
let is_lx = trim(fs.readfile("/etc/tachyon/sing-box-variant") || "") == "lx" ||
|
||||
index(trim(fs.readfile("/etc/tachyon/sing-box-version") || ""), "-lx") >= 0;
|
||||
|
||||
let amnezia = {
|
||||
jc: jc,
|
||||
|
||||
Reference in New Issue
Block a user