mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-18 18:02:08 +08:00
refactor(sysopt): share macos bypass formatting
The macOS default bypass list and its three-way composition (empty -> default, default + custom, custom only) were maintained twice: in sysopt's format_bypass and inline in proxy_control's service_bypass. Keep the literal once in constants and compose both paths through format_bypass; service_bypass keeps its NUL check and UTF-8 truncation.
This commit is contained in:
@@ -14,6 +14,12 @@ pub mod network {
|
||||
}
|
||||
}
|
||||
|
||||
pub mod proxy {
|
||||
/// Single source of the macOS default bypass list; both proxy backends compose from it.
|
||||
pub const MACOS_DEFAULT_BYPASS: &str =
|
||||
"127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.crashlytics.com,<local>";
|
||||
}
|
||||
|
||||
pub mod timing {
|
||||
use super::Duration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user