use obfstr (#1168)

* use obfstr

* more
This commit is contained in:
Logan McNaughton 2026-07-20 16:30:23 +02:00 committed by GitHub
parent c38ae12f0a
commit 6bb3487352
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

7
Cargo.lock generated
View File

@ -2799,6 +2799,7 @@ dependencies = [
"jni 0.22.4",
"matchbox_socket",
"mimalloc",
"obfstr",
"open",
"postcard",
"quick-xml 0.41.0",
@ -4678,6 +4679,12 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "obfstr"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cf5f1acbf6ef57cef9d127e72c4afd01d6b08692616fd09afad7f7807d6eb78"
[[package]]
name = "objc-sys"
version = "0.3.5"

View File

@ -37,6 +37,7 @@ clap = { version = "4.5", features = ["derive"] }
reqwest = { version = "0.13", default-features = false, features = ["native-tls-vendored", "charset", "http2", "system-proxy", "json", "query"] }
discord-rich-presence = "1.1"
quick-xml = "0.41"
obfstr = "0.4"
[target.'cfg(not(target_os = "android"))'.dependencies]
slint = { version = "1.16", default-features = false, features = ["compat-1-2", "std", "unstable-winit-030", "backend-winit", "renderer-femtovg-wgpu", "accessibility"], optional = true }

View File

@ -294,9 +294,10 @@ fn manage_websocket(
.unwrap_or("wss://netplay.gopher64.com".to_string())
.into_client_request()
.unwrap();
request
.headers_mut()
.insert("Authorization", env!("NETPLAY_ID").parse().unwrap());
request.headers_mut().insert(
"Authorization",
obfstr::obfstr!(env!("NETPLAY_ID")).parse().unwrap(),
);
tokio::spawn(async move {
match tokio::time::timeout(
std::time::Duration::from_secs(3),