FlClash v0.9.5 is out for Windows / macOS / Linux / Android Download now

FlClash advanced: custom rules, WebDAV backup and automation

Advanced FlClash: use requests and logs to debug, write overrides and custom rules to send sites direct, back up and restore with WebDAV, and automate with Tasker or adb on Android.

Updated · Applies to FlClash v0.9.5

Requests and logs

Since v0.9.5 the old “Connections” page is called Requests. It charts connections per minute, lists all / active / failed requests, filters by app, outbound, rule or protocol, and shows a timeline and DNS queries for each connection. On desktop, each connection shows the icon of the app that made it.

Desktop logs now live on the Tools page, with filtering and log levels. When debugging, set the level to debug, reproduce the problem, then read the log.

Overrides and custom rules

FlClash has a built-in config editor with override scripts and custom rules, proxies and groups — no need to touch the subscription, and nothing is lost when it updates. A common use is forcing a site or program to connect directly.

rules:
  - DOMAIN-SUFFIX,example.com,DIRECT
  - DOMAIN-KEYWORD,bank,DIRECT
  - PROCESS-NAME,WeChat.exe,DIRECT
  - IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
  - GEOIP,US,DIRECT
  - MATCH,Proxy

Rules are matched top to bottom and the first match wins. Your custom rules must come before the subscription's rules to take priority (see issue #2251). The rule generator builds them in bulk.

Rule typeMatchesExample
DOMAIN-SUFFIXA domain and all its subdomainsexample.com
DOMAIN-KEYWORDDomains containing a keywordgoogle
IP-CIDRAn IP range10.0.0.0/8
PROCESS-NAMEThe program making the connection (desktop)steam.exe
GEOIPThe country / region of the IPUS
MATCHCatch-all when nothing above matched—

WebDAV backup and restore

Under Tools → Backup & restore you can back up everything to WebDAV (Nextcloud, a NAS, etc.) or a local file, then restore it on a new device in one step.

  1. Enter the WebDAV URL, username and app password;
  2. Tap “Backup” to upload the current setup;
  3. On the new device, enter the same details and tap “Restore”.

Import links and automation

FlClash imports subscriptions from links; the clash://, clashmeta:// and flclash:// schemes all work the same:

flclash://install-config?url=<URL-encoded subscription>

Android automation (Tasker / MacroDroid / adb)

com.follow.clash.action.START    # start
com.follow.clash.action.STOP     # stop
com.follow.clash.action.TOGGLE   # toggle

adb shell am start -a com.follow.clash.action.TOGGLE

For example, a Tasker profile can stop the proxy when you join the office Wi-Fi and start it again when you leave.

Don't have FlClash yet?

Free and open source for Windows, macOS, Linux and Android · latest v0.9.5

Go to downloads

Related searches

Covered here: FlClash custom rules, FlClash override, Clash split tunneling rules