Clash Subscription Conversion and Node Filtering Guide
Contents
After getting a proxy subscription, many users simply paste it into Clash and go. But in practice, you may encounter incompatible subscription formats, too many nodes to manage, or unstable nodes in certain regions. Subscription conversion is the skill you need.
This tutorial covers the complete workflow of Clash subscription conversion from scratch, including tool selection, format conversion, node filtering, custom rules, automated updates, and multi-subscription management.
What Is Subscription Conversion
Subscription conversion is essentially translating one proxy protocol format into another.
Why Conversion Is Needed
Different clients support different configuration formats. Raw subscriptions from providers typically come in one of these formats:
- SS/SSR links: Base64-encoded collections of
ss://orssr://links - Vmess/Vless links: Plain text collections of individual links
- Generic subscription (SIP008): JSON format, supported by some clients
- Clash YAML: Native Clash format, most providers can supply this directly
- Surge/QuantumultX config: Proprietary formats for other clients
Your provider only offers SSR subscriptions, but you want to use the Clash Meta client. Or the provider gives you a Clash config with 200+ nodes, but you only need Japan and US servers. Both scenarios require subscription conversion.
How Conversion Works
The subscription conversion tool acts as a middleware layer:
- The client sends a request to the conversion service (with the raw subscription URL and target format parameters)
- The conversion service downloads the raw subscription content
- It parses node information (protocol, server, port, encryption, password, etc.)
- It reassembles the configuration file in the target format
- It returns the converted config to the client
Popular Subscription Conversion Tools
1. subconverter (Open Source Backend)
This is currently the most popular subscription conversion backend, supporting conversion between nearly all mainstream protocol formats.
- Supports SS/SSR/Vmess/Trojan/Vless protocol interconversion
- Built-in node testing, filtering, and renaming capabilities
- Supports custom configuration file templates (.ini/.yaml)
- Pass conversion rules via URL parameters
- Supports self-hosted deployment and public instances
Public conversion backends (may be unstable; self-hosting recommended):
# Common public subconverter backends
https://sub.xeton.de/sub
https://api.v1.mk/sub
https://sub.dlsj.me/sub
Using public conversion backends means your subscription URL passes through third-party servers. If your subscription contains sensitive information, consider self-hosting a subconverter backend.
2. Self-Hosting subconverter
One-click deployment with Docker:
# Pull the image
docker pull tindy2013/subconverter:latest
# Start the container
docker run -d --name subconverter \
-p 25500:25500 \
--restart=always \
tindy2013/subconverter:latest
Once deployed, your conversion backend URL is http://your-server-ip:25500/sub.
3. Online Conversion Websites
If you prefer not to host your own backend, online conversion services wrap the subconverter API with user-friendly interfaces:
- Visual interface for selecting source and target formats
- Paste subscription URL and generate converted link in one click
- Some support node filtering and renaming
4. Built-in Conversion in Clash Verge Rev
Clash Verge Rev has built-in subscription conversion that automatically handles format conversion during import, eliminating the need for external tools.
Converting Various Formats to Clash Config
subconverter URL Parameters Explained
subconverter controls conversion behavior through URL parameters:
http://backend/sub?target=clash&url=raw-subscription-URL&config=config-template-path
Key parameters:
target: Target format. Useclashfor Clash pre-processor formaturl: Raw subscription link (URL-encoded)config: Configuration template, e.g.,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.iniinclude: Node name regex filter (keep matching nodes only)exclude: Node name exclusion regex (filter out matching nodes)emoji: Add country flag emoji,true/falseudp: Enable UDP forwarding,true/false
Scenario 1: SSR Subscription to Clash
# Assuming your SSR subscription URL is:
https://example-airport.com/sub?token=abc123
# Converted Clash URL:
http://your-backend:25500/sub?target=clash&url=https%3A%2F%2Fexample-airport.com%2Fsub%3Ftoken%3Dabc123&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini
Import the converted URL into your Clash client.
Scenario 2: Vmess Individual Links to Clash
If you have multiple vmess:// links, Base64-encode them first as subscription content, then convert with subconverter:
# Method 1: Direct Base64-encoded content
http://backend:25500/sub?target=clash&url=Base64-encoded-content
# Method 2: Using an online paste service
# Upload link text to pastebin, get raw URL
http://backend:25500/sub?target=clash&url=https://pastebin.com/raw/xxxxx
Scenario 3: Trojan Subscription to Clash
# Trojan link format: trojan://password@server:port?sni=xxx
# Multiple links need Base64 encoding first
http://backend:25500/sub?target=clash&url=Base64-encoded-trojan-links
Note: Trojan requires Clash Premium or Clash Meta core support.
Recommended Configuration Templates
- ACL4SSR_Online.ini: Online version with complete routing rules
- ACL4SSR_Online_NoReject.ini: Version without ad blocking rules
- ACL4SSR_Online_Full.ini: Full rules version with more routing policies
- ACL4SSR_Online_Mini.ini: Minimal version for low-performance devices
Node Filtering Strategies
Filtering by Region
Use the include parameter with regular expressions to filter nodes by region:
# Keep only Japan nodes
&include=(?i)(Japan|JP)
# Keep only US nodes
&include=(?i)(United.?States|US)
# Keep Japan and US nodes
&include=(?i)(Japan|JP|United.?States|US)
# Exclude Hong Kong nodes
&exclude=(?i)(Hong.?Kong|HK)
Filtering by Protocol
Some conversion tools support protocol-based filtering. In custom configuration templates:
# In the [custom] section of the config file
clash.new_name=true
clash.emoji=true
# In rules, you can route by protocol type
# Protocols supported by Clash Meta: vmess, vless, trojan, ss, ssr, tuic, hysteria2
Filtering by Use Case
- Daily browsing: Choose low-latency Asian nodes (Japan, Korea, Singapore)
- Streaming unlock: Select nodes by platform region (Netflix → US/Japan, Disney+ → US)
- Large file downloads: Choose high-bandwidth, unlimited nodes (typically US, Germany)
- Gaming: Select nodes in the game server's region, prioritize low packet loss
Combined Filtering in Practice
http://your-backend:25500/sub?
target=clash
&url=your-raw-subscription-URL
&include=(?i)(Japan|JP|United.?States|US)
&exclude=(?i)(free|trial|expire)
&emoji=true
&udp=true
&config=template-URL
Note: URL parameters need proper URL encoding in actual use. Line breaks above are for readability only.
Custom Conversion Rules and Node Filtering
subconverter Configuration File Structure
subconverter uses .ini format configuration files to control conversion behavior. A typical configuration file contains these sections:
[custom]
; Node renaming rules
node_rename=Japan-(.*) $0
node_rename=US-(.*) $0
node_rename=HK-(.*) $0
; Filter rules (regex)
; Filter out nodes with specific keywords
exclude_remarks=(expire|remaining|quota)
; Include rules (keep matching nodes only, empty = keep all)
include_remarks=
[proxy]
; Proxy group settings
custom_proxy_group=Japan Nodes`select`(Japan|JP)
custom_proxy_group=US Nodes`select`(United.?States|US)
custom_proxy_group=HK Nodes`select`(Hong.?Kong|HK)
custom_proxy_group=Streaming`select`(NF|Netflix|Media)
custom_proxy_group=Gaming`select`(Game|Low-latency)
custom_proxy_group=Proxy`fallback`.*`https://www.google.com/generate_204`300
Node Renaming
Use regex to standardize node naming for easier management:
; Format: original-name-regex`new-name-format
; Example: Change "[Japan] Tokyo-01" to "JP-Tokyo-01"
node_rename=\[Japan\](.*)`JP-$1
node_rename=\[US\](.*)`US-$1
node_rename=\[HK\](.*)`HK-$1
node_rename=Singapore-(\d+)`SG-$1
Custom Proxy Groups
Define custom proxy groups in the configuration file for finer node grouping:
; Format: group-name`type`regex`test-URL`test-interval
; Types: select (manual), url-test (auto-select), fallback, load-balance
; Auto-select lowest latency Japan node
custom_proxy_group=Japan Auto`url-test`(Japan|JP)`https://www.google.com/generate_204`600
; Manual streaming node selection
custom_proxy_group=Streaming Nodes`select`(NF|Netflix|Disney|HBO)
; Fallback: auto-switch when primary is down
custom_proxy_group=Primary`fallback`(HK-01|HK-02|HK-03)`https://www.google.com/generate_204`300
Automated Subscription Updates
Method 1: Client Auto-Update
Most Clash clients support automatic subscription updates:
- Clash Verge Rev: In Profiles page, set auto-update interval (e.g., every 6 hours)
- Clash for Windows (deprecated): Check Auto Update in Profiles page
- Clash Meta for Android: Set update interval in configuration
Don't update subscriptions too frequently. Provider nodes typically don't change often. An interval of 6-24 hours is recommended. Too frequent updates may trigger rate limiting from your provider.
Method 2: Cron-Based Script Updates
Use cron on a Linux server or NAS for scheduled updates:
# Create update script update-sub.sh
#!/bin/bash
SUB_URL="http://your-backend:25500/sub?target=clash&url=raw-subscription&config=template"
OUTPUT="/path/to/config.yaml"
curl -s -o "$OUTPUT" "$SUB_URL"
echo "$(date): Subscription updated" >> /var/log/sub-update.log
# Add to crontab, update every 12 hours
0 */12 * * * /path/to/update-sub.sh
Method 3: Subscription Management Services
Some third-party tools provide subscription management services that can:
- Aggregate multiple subscription sources into a single link
- Auto-update and push to clients
- Provide node health monitoring dashboard
Method 4: GitHub Actions Automation
Create a GitHub repository with Actions that periodically runs a conversion script, pushing results to the repo or a Gist for Clash to pull updates.
# .github/workflows/update-sub.yml
name: Update Subscription
on:
schedule:
- cron: '0 */8 * * *' # Run every 8 hours
workflow_dispatch: # Support manual trigger
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Convert subscription
run: |
curl -o config.yaml \
"http://sub-backend/sub?target=clash&url=your-subscription&config=template"
- name: Upload to Gist
uses: actions/upload-artifact@v3
with:
name: config
path: config.yaml
Multi-Subscription Merging and Management
Why Merge Multiple Subscriptions
Many users have subscriptions from multiple providers, each with advantageous nodes. Merging subscriptions allows you to:
- Manage all nodes in a single interface
- Leverage the best regional nodes from different providers
- Provide redundancy - if one provider goes down, others serve as backup
Method 1: subconverter Multi-Link Merge
# Separate multiple subscription URLs (URL-encode the combined string)
# In practice, connect multiple URLs and URL-encode the entire string
http://backend:25500/sub?target=clash&url=subscription1-URL|subscription2-URL|subscription3-URL
Different subscriptions may contain duplicate nodes. subconverter automatically deduplicates based on the uniqueness of server address + port + protocol. If duplicates remain, enable the dedup option in the config template.
Method 2: Manual Clash Config Merging
For finer control over merged nodes, manually edit the configuration file:
# Extract proxies sections from multiple subscriptions and merge into one config
proxies:
# === Provider A Nodes ===
- name: "A-Japan-01"
type: vmess
server: jp.example-a.com
port: 443
# ...other parameters
# === Provider B Nodes ===
- name: "B-US-01"
type: trojan
server: us.example-b.com
port: 443
# ...other parameters
proxy-groups:
- name: "All Nodes"
type: select
proxies:
- A-Japan-01
- B-US-01
# ...
Method 3: Profile Overlay (Clash Verge Rev / Clash Meta)
Clash Verge Rev and Clash Meta support profile overlay. You can import multiple subscription config files, and the client automatically merges their proxies, proxy-groups, and rules sections.
- Main Profile: Base configuration and rules
- Overlay Profiles: Additional nodes and policy groups
- Each profile can be individually enabled/disabled
Troubleshooting Common Issues
Issue 1: Converted Nodes Cannot Connect
Troubleshooting steps:
- Verify raw subscription is valid: Open the raw subscription URL in a browser to confirm it returns node data, not an error page
- Check if conversion backend is running: Visit the backend homepage to confirm the service is active
- Verify target format is correct: Ensure
target=clashhas no typos - Check core version compatibility: Some protocols (Vless, Reality) require Clash Meta core
- Check logs: Clash client logs will show specific connection failure reasons
Issue 2: Zero Nodes After Conversion
Possible causes:
includeregex is wrong, no nodes match → Remove include parameter and test firstexcluderegex is too broad, filtering out all nodes → Check your regex- Raw subscription has expired or data quota is used up → Contact your provider
Issue 3: No Routing Rules in Converted Config
Solutions:
- Check if the template specified by
configparameter includes rule definitions - Try using a complete online template (e.g., ACL4SSR_Online_Full.ini)
- Manually add the rules section to the configuration file
Issue 4: Configuration Overwritten After Subscription Update
Some clients overwrite manual configuration changes when updating subscriptions.
Solutions:
- Apply customization at the conversion service level using URL parameters instead of manually editing config files
- Use profile overlay: separate auto-updating subscriptions from manual configurations
- Place custom proxy groups and rules in a separate overlay profile
Issue 5: Conversion Backend Is Slow or Unavailable
Recommendations:
- Self-host subconverter on an overseas VPS
- Rotate between multiple public backends to avoid single point of failure
- Monitor backend availability regularly