Skip to content

Subconverter External Config

Since v2.3.0, Sublink Worker can export its built-in rule system as a Subconverter external config (INI format).

Why?

Sublink Worker's frontend exposes all settings and stores pasted subscription links. For privacy-conscious users, you can:

  1. Only use Sublink Worker's rule system to generate an external config URL
  2. Hand off the actual subscription conversion to your own Subconverter backend
  3. Your subscription links never pass through Sublink Worker — nothing is stored

Quick Start

1. Via the Frontend

In the Sublink Worker frontend under Advanced Options → General Settings, you'll find the Subconverter External Config card:

  • Choose a rule preset (Minimal / Balanced / Comprehensive) or custom rules
  • Optionally enable country grouping
  • Optionally disable the Auto Select group
  • Click copy to get the config URL

2. Build the URL Directly

text
# Default balanced preset
https://your-worker.com/subconverter

# Comprehensive preset + country grouping
https://your-worker.com/subconverter?selectedRules=comprehensive&group_by_country=true

# Minimal preset + disable auto select
https://your-worker.com/subconverter?selectedRules=minimal&include_auto_select=false

3. Use with Subconverter

Pass the generated URL as Subconverter's config parameter:

text
https://sub.example.com/sub?target=clash&url=YOUR_SUB_URL&config=https://your-worker.com/subconverter

Parameters

ParameterTypeDefaultDescription
selectedRulesstringbalancedPreset name (minimal / balanced / comprehensive) or JSON array
include_auto_selectbooleantrueInclude the Auto Select proxy group
group_by_countrybooleanfalseGroup by country/region (supports 30 countries)
langstringzh-CNLanguage code for group names (zh-CN / en / fa / ru)

Custom Rules

Instead of presets, pass a JSON array for fine-grained control:

text
/subconverter?selectedRules=["🚀 Proxy","🎬 Streaming","🤖 AI Services","🛡️ Privacy","🍎 Apple","📢 Ad Block","🌏 Domestic","🔒 Private Network"]

TIP

Custom rules need URL encoding. Use the frontend to select rules and copy — no manual encoding needed.

User-Agent Handling

Since v2.3.0, all subscription endpoints (/singbox, /clash, /surge, /xray) automatically read the User-Agent from request headers to identify client type and version.

To manually override the UA (e.g. for debugging), use the ?ua= query parameter:

text
/clash?config=...&ua=clash-verge/v2.0.0

Priority: ?ua= query parameter > User-Agent header > default value

Released under the MIT License