2022-02-18 23:57:13 +08:00
|
|
|
///! Some config file template
|
|
|
|
|
|
|
|
/// template for clash core `config.yaml`
|
|
|
|
pub const CLASH_CONFIG: &[u8] = br#"# Default Config For Clash Core
|
|
|
|
|
|
|
|
mixed-port: 7890
|
|
|
|
log-level: info
|
|
|
|
allow-lan: false
|
|
|
|
external-controller: 127.0.0.1:9090
|
|
|
|
mode: rule
|
|
|
|
secret: ""
|
|
|
|
"#;
|
|
|
|
|
|
|
|
/// template for `profiles.yaml`
|
|
|
|
pub const PROFILES_CONFIG: &[u8] = b"# Profiles Config for Clash Verge
|
|
|
|
|
2022-03-01 08:58:47 +08:00
|
|
|
current: ~
|
2022-02-18 23:57:13 +08:00
|
|
|
items: ~
|
|
|
|
";
|
|
|
|
|
|
|
|
/// template for `verge.yaml`
|
2022-11-16 01:26:41 +08:00
|
|
|
pub const VERGE_CONFIG: &[u8] = b"# Default Config For Clash Verge
|
2022-02-18 23:57:13 +08:00
|
|
|
|
2022-03-12 23:07:45 +08:00
|
|
|
language: en
|
2022-02-18 23:57:13 +08:00
|
|
|
theme_mode: light
|
2022-02-19 18:14:40 +08:00
|
|
|
theme_blur: false
|
|
|
|
traffic_graph: true
|
2022-02-18 23:57:13 +08:00
|
|
|
enable_self_startup: false
|
|
|
|
enable_system_proxy: false
|
2022-02-20 20:12:55 +08:00
|
|
|
enable_proxy_guard: false
|
|
|
|
proxy_guard_duration: 10
|
2022-02-18 23:57:13 +08:00
|
|
|
";
|
|
|
|
|
|
|
|
/// template for new a profile item
|
2022-03-05 19:04:20 +08:00
|
|
|
pub const ITEM_LOCAL: &str = "# Profile Template for clash verge
|
|
|
|
|
|
|
|
proxies:
|
|
|
|
|
|
|
|
proxy-groups:
|
|
|
|
|
|
|
|
rules:
|
|
|
|
";
|
|
|
|
|
|
|
|
/// enhanced profile
|
|
|
|
pub const ITEM_MERGE: &str = "# Merge Template for clash verge
|
|
|
|
# The `Merge` format used to enhance profile
|
|
|
|
|
|
|
|
prepend-rules:
|
|
|
|
|
|
|
|
prepend-proxies:
|
|
|
|
|
|
|
|
prepend-proxy-groups:
|
|
|
|
|
|
|
|
append-rules:
|
|
|
|
|
|
|
|
append-proxies:
|
|
|
|
|
|
|
|
append-proxy-groups:
|
|
|
|
";
|
|
|
|
|
|
|
|
/// enhanced profile
|
2022-09-11 20:58:55 +08:00
|
|
|
pub const ITEM_SCRIPT: &str = "// Define the `main` function
|
2022-03-05 19:04:20 +08:00
|
|
|
// The argument to this function is the clash config
|
|
|
|
// or the result of the previous handler
|
|
|
|
// so you should return the config after processing
|
|
|
|
function main(params) {
|
|
|
|
return params;
|
|
|
|
}
|
2022-02-18 23:57:13 +08:00
|
|
|
";
|