Skip to content

Add subscription link import & batch proxy testing #51

Description

@francomano

Description

Add a batch-test command that accepts a file of proxy configs or a subscription link (base64-encoded VLESS/VMess/Trojan/Shadowsocks configs), tests each proxy with a subset of checks, and outputs a ranked table.

The xray/sing-box/v2ray ecosystem uses subscription links extensively. xrat (Rust, popular) and LiteSpeedTest exist specifically for batch-testing. Users with 50+ proxy configs need to know which ones actually work and leak-test them.

Codebase starting point

  • cmd/cli/commands/diagnose.go — existing diagnose command, shows how checks are wired
  • cmd/cli/commands/list.go — shows how checks are listed
  • core/engine/orchestrator.goDiagnosisOrchestrator and DiagnosisRequest types
  • core/checks/register.go — all registered checks
  • cmd/cli/main.go — CLI entry point

Acceptance Criteria

  • Create cmd/cli/commands/batch.go with a new batch-test subcommand
  • Accept --file proxies.txt (one proxy per line: socks5://host:port or host:port type)
  • Accept --subscription-url https://... (base64-decode, split by newline)
  • For each proxy, run a subset of checks: public_ip, dns_leak, tls_certificate
  • Use goroutine pool with configurable concurrency (default: 10)
  • Output as a table showing: proxy address, status, latency, leak status, score
  • Support --export json for machine-readable output
  • Add tests in cmd/cli/commands/batch_test.go
  • Update README.md with usage example

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions