Skip to content

v1.6.2

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Jun 10:47
6c1d5a6

Add multi-Worker support with balanced selection and per-Worker lazy failover

This change enables multiple Worker domains and adds lazy failover by temporarily removing failed Workers from rotation via cooldown.

  • CLI/config: multiple Worker domains

    • --cf-worker-domain now accepts comma-separated values and repeated flags.
    • TG_CF_WORKER_DOMAIN now supports multiple domains (comma-delimited).
    • Added normalized multi-domain accessor: Config::cf_worker_domains().
  • Routing: balanced Worker selection

    • Added balanced_cf_workers(...) (round-robin start index per connection), reusing --cf-balance.
    • Worker attempts now iterate a rotated Worker list, preserving ordered fallback across all configured Workers.
  • Failover: lazy per-Worker cooldown

    • Reworked Worker failure tracking from per-DC to per Worker domain.
    • On Worker failure, only that Worker enters cooldown; other Workers remain eligible immediately.
  • Operational surface updates

    • Startup logging now lists all configured Worker domains.
    • --check probes all configured Worker domains instead of a single Worker.
    • Docs updated to describe multi-Worker usage and balancing behavior.
# multiple workers, balanced first-try, ordered fallback
tg-ws-proxy \
  --cf-worker-domain w1.user.workers.dev,w2.user.workers.dev \
  --cf-balance