refactor: streamline SWR configuration and improve error handling in AppDataProvider

This commit is contained in:
xmk23333
2025-10-21 17:51:12 +08:00
parent bafe2ae164
commit 0e933597f5
18 changed files with 1139 additions and 1383 deletions

View File

@@ -513,13 +513,8 @@ impl IVerge {
patch!(enable_external_controller);
}
/// 在初始化前尝试拿到单例端口的值
pub fn get_singleton_port() -> u16 {
#[cfg(not(feature = "verge-dev"))]
const SERVER_PORT: u16 = 33331;
#[cfg(feature = "verge-dev")]
const SERVER_PORT: u16 = 11233;
SERVER_PORT
crate::constants::network::ports::SINGLETON_SERVER
}
/// 获取日志等级