1.同步处理UDP,提升性能
2.加密引入openssl,提升性能
3.安卓支持ip代理
This commit is contained in:
lubeilin
2023-09-17 12:54:15 +08:00
parent 7db415d243
commit 29945eb3da
40 changed files with 1259 additions and 760 deletions
+3
View File
@@ -68,6 +68,9 @@ pub fn out_ips_parse(ips: &Vec<String>) -> Result<Vec<(u32, u32)>, String> {
pub fn to_ip(mask: &str) -> Result<u32, String> {
if let Ok(m) = mask.parse::<u32>() {
if m >= 32 {
return Err("not netmask".to_string());
}
let mut mask = 0 as u32;
for i in 0..m {
mask = mask | (1 << (31 - i));
+3 -2
View File
@@ -1,8 +1,7 @@
use std::process::Command;
#[cfg(target_os = "windows")]
pub fn get_unique_identifier() -> Option<String> {
use std::os::windows::process::CommandExt;
use std::process::Command;
let output = match Command::new("wmic")
.creation_flags(0x08000000)
.args(&["csproduct", "get", "UUID"])
@@ -25,6 +24,7 @@ pub fn get_unique_identifier() -> Option<String> {
#[cfg(target_os = "macos")]
pub fn get_unique_identifier() -> Option<String> {
use std::process::Command;
let output = match Command::new("ioreg")
.args(&["-rd1", "-c", "IOPlatformExpertDevice"])
.output()
@@ -50,6 +50,7 @@ pub fn get_unique_identifier() -> Option<String> {
#[cfg(target_os = "linux")]
pub fn get_unique_identifier() -> Option<String> {
use std::process::Command;
let output = match Command::new("dmidecode")
.arg("-s")
.arg("system-uuid")