Fix windows service verify issues
This commit is contained in:
@@ -29,8 +29,6 @@ Future<void> main() async {
|
|||||||
await globalState.initApp(version);
|
await globalState.initApp(version);
|
||||||
await android?.init();
|
await android?.init();
|
||||||
await window?.init(version);
|
await window?.init(version);
|
||||||
globalState.isPre = const String.fromEnvironment("APP_ENV") != 'stable';
|
|
||||||
globalState.coreSHA256 = const String.fromEnvironment("CORE_SHA256");
|
|
||||||
HttpOverrides.global = FlClashHttpOverrides();
|
HttpOverrides.global = FlClashHttpOverrides();
|
||||||
runApp(ProviderScope(
|
runApp(ProviderScope(
|
||||||
child: const Application(),
|
child: const Application(),
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ class GlobalState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initApp(int version) async {
|
initApp(int version) async {
|
||||||
|
coreSHA256 = const String.fromEnvironment("CORE_SHA256");
|
||||||
|
isPre = const String.fromEnvironment("APP_ENV") != 'stable';
|
||||||
appState = AppState(
|
appState = AppState(
|
||||||
version: version,
|
version: version,
|
||||||
viewSize: Size.zero,
|
viewSize: Size.zero,
|
||||||
|
|||||||
Submodule plugins/flutter_distributor updated: 9daab581b0...cdeeef2d8f
@@ -1,7 +1,7 @@
|
|||||||
name: fl_clash
|
name: fl_clash
|
||||||
description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
|
description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.8.83+202505011
|
version: 0.8.84+202505012
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.0 <4.0.0'
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ static PROCESS: Lazy<Arc<Mutex<Option<std::process::Child>>>> =
|
|||||||
Lazy::new(|| Arc::new(Mutex::new(None)));
|
Lazy::new(|| Arc::new(Mutex::new(None)));
|
||||||
|
|
||||||
fn start(start_params: StartParams) -> impl Reply {
|
fn start(start_params: StartParams) -> impl Reply {
|
||||||
if sha256_file(start_params.path.as_str()).unwrap_or("".to_string()) != env!("TOKEN") {
|
let sha256 = sha256_file(start_params.path.as_str()).unwrap_or("".to_string());
|
||||||
return "Only FlClashCore is allowed to run.".to_string();
|
if sha256 != env!("TOKEN") {
|
||||||
|
return format!("The SHA256 hash of the program requesting execution is: {}. The helper program only allows execution of applications with the SHA256 hash: {}.", sha256, env!("TOKEN"),);
|
||||||
}
|
}
|
||||||
stop();
|
stop();
|
||||||
let mut process = PROCESS.lock().unwrap();
|
let mut process = PROCESS.lock().unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user