Commit Graph
1 Commits
  • fix(xray): read an outbound protocol id the way the core does (#6521)
    * fix(xray): read an outbound protocol id the way the core does
    
    xray-core lowercases a protocol id before it looks up the handler
    (infra/conf/loader.go: `id = strings.ToLower(id)`), so a template that
    spells the direct outbound "Freedom" runs as freedom. The three config
    rewriters compared the id case-sensitively, so such an outbound was
    skipped while the seed was recorded as applied: the refused
    sockopt.addressPortStrategy stayed and xray-core refused to start.
    
    * fix(xray): match an outbound protocol id case-insensitively
    
    xray-core lowercases a protocol id before looking up its handler, so a
    template that spells the direct outbound "Freedom" runs as freedom while
    this rewriter skipped it and left the deprecated placement in place.
    
    * fix(xray): re-run the freedom finalRules rewrite where its seeder was gated
    
    Both finalRules seeders recorded their rows before the predicate could see
    an outbound spelled "Freedom", and a recorded row is never re-run, so the
    corrected predicates alone left the #6037 private-egress hardening
    unapplied on every panel that had already run them. The new one-shot
    seeder replays both rewrites, and only when the config actually carries a
    differently spelled freedom outbound, so stock lowercase configs stay
    byte-identical.