clash-verge/src-tauri/src/utils/tmpl.rs

71 lines
1.4 KiB
Rust
Raw Normal View History

2022-02-18 18:57:13 +03: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 03:58:47 +03:00
current: ~
2022-02-18 18:57:13 +03:00
items: ~
";
/// template for `verge.yaml`
pub const VERGE_CONFIG: &[u8] = b"# Defaulf Config For Clash Verge
2022-03-12 18:07:45 +03:00
language: en
2022-02-18 18:57:13 +03:00
theme_mode: light
theme_blur: false
traffic_graph: true
2022-02-18 18:57:13 +03:00
enable_self_startup: false
enable_system_proxy: false
2022-02-20 15:12:55 +03:00
enable_proxy_guard: false
proxy_guard_duration: 10
2022-02-18 18:57:13 +03:00
system_proxy_bypass: localhost;127.*;10.*;192.168.*;<local>
";
/// template for new a profile item
2022-03-05 14:04:20 +03: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
pub const ITEM_SCRIPT: &str = "// Should define the `main` function
// 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 18:57:13 +03:00
";