Some scripts for parser
in Fndroid/clash_for_windows_pkg
.
Only for studying and testing usage, and delete code yourself with the usage completed. Thanks! 😜
The scripts used mikaelbr/node-notifier
for fitting windows notification persist in action center.
git clone https://github.com/yi-Xu-0100/cfw-scripts.git
npm ci
npm run start
The notify will be test and copy ./lib/variables.yml
and ./lib/rule-providers.yml
to ./scripts/variables.yml
and ./scripts/rule-providers.yml
. You can set variables in ./scripts/variables.yml
and set personal rule in ./scripts/rule-providers.yml
, and the files will include in .gitignore
.
The script was used to change keys for fitting breaking changes in clash v1.0.0.
You can set the parsers with reg
to fit the all link without string www.example.com
.
parsers:
- reg: ^((?!www\.example\.com).)*$
file: 'D:/Applications/cfw-scripts/scripts/change-keys.js' #set the path of `change-keys.js`.
The script will use rule-providers
with Loyalsoldier/clash-rules
.
You can set the parsers with reg
to fit the all link without string www.example.com
.
parsers:
- reg: ^((?!www\.example\.com).)*$
file: 'D:/Applications/cfw-scripts/scripts/change-rules.js' #set the path of `change-rules.js`.
The script should use behind change-rules.js
. The variables need to be set in ./scripts/variables.yml
.
You can set the parsers with reg
to fit the all link without string www.example.com
.
parsers:
- reg: ^((?!www\.example\.com).)*$
file: 'D:/Applications/cfw-scripts/scripts/merge-nodes.js' #set the path of `merge-nodes.js`.
The script was used to automatic check in. The variables need to be set in ./scripts/variables.yml
.
You can set the parsers with reg
to fit the all link without string www.example.com
.
parsers:
- reg: ^((?!www\.example\.com).)*$
file: 'D:/Applications/cfw-scripts/scripts/auto-check-in.js' #set the path of `auto-check-in.js`.
It will add fake node into proxies
and add CHECK-INFO
into the end of proxy-groups
. Be careful to edit the subscription later.
The script was used to get subscription information of domains. The variables need to be set in ./scripts/variables.yml
.
You can set the parsers with reg
to fit the all link without string www.example.com
.
parsers:
- reg: ^((?!www\.example\.com).)*$
file: 'D:/Applications/cfw-scripts/scripts/subs-info-parser.js' #set the path of `subs-info-parser.js`.
It will add fake node into proxies
and add SUBS-INFO
into the end of proxy-groups
. Be careful to edit the subscription later.
You can set current
and expire
in ./scripts/variables.yml
with subs_info_config
. The current
for controlling whether the subscription information of current URL showing, and The expire
for controlling whether the expiry time of subscription information showing.(The subscription information of domains in variables will all show. See inexample)
The script was used to get CPU and memory usage. And it will display the two pieces of information in a separate line.
The script was used to get subscription-userinfo from subscription url with different ua of User-Agent:Quantumult%20X/1.0.23 (iPhone12,3; iOS 14.6)
.
You can set the parser with reg
to fit the all link after other parser.
parsers:
- reg: ^.*$
file: 'D:/Applications/cfw-scripts/scripts/subscription-userinfo.js' #set the path of `subscription-userinfo.js`.
name | description | variables |
---|---|---|
change-keys.js | fit new version key | |
change-rules.js | add personal rule | |
merge-nodes.js | merge nodes | merge-nodes |
subs-info-parser.js | get subscription information | subs-info-parser |
auto-check-in.js | auto check in | auto-check-in |
subscription-userinfo.js | get subscription information |
name | description | dependencies |
---|---|---|
variables.json | variables for scripts | |
notify.js | notify for windows | mikaelbr/node-notifier |
rule-providers.json | template for rule-providers | Loyalsoldier/clash-rules |