refactor: split modules

This commit is contained in:
2025-04-08 02:12:06 +08:00
parent 376d2b28d3
commit 2686fa1d76
94 changed files with 1125 additions and 580 deletions

View File

@@ -0,0 +1,11 @@
use lazy_static::lazy_static;
lazy_static! {
static ref DEFAULT_HTTP_CLIENT_USER_AGENT: Vec<String> =
serde_json::from_str::<Vec<String>>(include_str!("./ua.json")).unwrap();
}
pub fn get_random_mobile_ua() -> &'static str {
DEFAULT_HTTP_CLIENT_USER_AGENT[fastrand::usize(0..DEFAULT_HTTP_CLIENT_USER_AGENT.len())]
.as_str()
}