XX-net/XX-Net · warning

save_cloudflare_domain but cloudflare front not enabled

Error message

save_cloudflare_domain but cloudflare front not enabled

What it means

save_cloudflare_domain() is invoked (typically after login/balance requests succeed and return Cloudflare domains) but the Cloudflare front was disabled in configuration, so the domains are discarded. It signals config inconsistency: something uses cloudflare results while enable_cloudflare is False.

Source

Thrown at code/default/x_tunnel/local/front_dispatcher.py:78

        session_fronts.append(tls_relay_front)
        light_fronts.append(tls_relay_front)
        g.tls_relay_front = tls_relay_front

    if g.config.enable_direct:
        from . import direct_front
        all_fronts.append(direct_front)
        session_fronts.append(direct_front)
        light_fronts.append(direct_front)

    for front in all_fronts:
        front.start()

    threading.Thread(target=front_staticstic_thread, name="front_statistic_thread").start()


def save_cloudflare_domain(domains):
    if not g.config.enable_cloudflare:
        xlog.warn("save_cloudflare_domain but cloudflare front not enabled")
        return

    for front in all_fronts:
        if front.name != "cloudflare_front":
            continue

        front.ip_manager.save_domains(domains)


def front_staticstic_thread():
    while g.running:
        for front in all_fronts:
            dispatcher = front.get_dispatcher()
            if not dispatcher:
                continue

            dispatcher.statistic()

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Enable cloudflare front in config if you want to use these domains
  2. Otherwise ignore — it's harmless and the domains are simply not applied
  3. Make sure the correct config file is loaded (not a stale one)

Example fix

// before
g.config.enable_cloudflare = False
// expect cloudflare domains to be used
// after
g.config.enable_cloudflare = True
save_cloudflare_domain(domains)
Defensive patterns

Strategy: validation

Validate before calling

if g.config.enable_cloudflare:
    save_cloudflare_domain(domains)

Prevention

When it happens

Trigger: request_balance() or req_token_login_handler() runs and the server response contains cloudflare domain info, while g.config.enable_cloudflare is False in the local config.

Common situations: User disabled cloudflare front in config but the account/server still supplies cloudflare domains; mixed old config with new code paths.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/211c0401f6a2ba0f. Report an issue: GitHub.