mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2026-02-04 01:37:56 +00:00
Hide Xray console. Added lib.rs
This commit is contained in:
4
src/lib.rs
Normal file
4
src/lib.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
pub mod config_models;
|
||||
pub mod parser;
|
||||
pub mod utils;
|
||||
pub mod xray_runner;
|
||||
@@ -33,8 +33,17 @@ impl XrayRunner {
|
||||
cmd.arg("-config")
|
||||
.arg(&config_path)
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::inherit())
|
||||
.stderr(Stdio::inherit());
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null());
|
||||
|
||||
// Hide console window on Windows
|
||||
#[cfg(windows)]
|
||||
{
|
||||
const CREATE_NO_WINDOW: u32 = 0x08000000;
|
||||
#[allow(unused_imports)]
|
||||
use std::os::windows::process::CommandExt;
|
||||
cmd.creation_flags(CREATE_NO_WINDOW);
|
||||
}
|
||||
|
||||
let child = cmd.spawn()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user