Skip to content

Commit

Permalink
feat(omnisette): support anisette v3 (SideStore#17)
Browse files Browse the repository at this point in the history
* feat(omnisette): support anisette v3
  • Loading branch information
TaeHagen authored Apr 1, 2024
1 parent 5aa6de4 commit 3e14ec5
Show file tree
Hide file tree
Showing 3 changed files with 415 additions and 0 deletions.
5 changes: 5 additions & 0 deletions omnisette/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
remote-anisette = []
async = ["dep:async-trait"]
default = ["remote-anisette", "dep:remove-async-await"]
remote-anisette-v3 = ["async", "dep:serde", "dep:serde_json", "dep:tokio-tungstenite", "dep:futures-util"]

[dependencies]
anyhow = "1.0"
Expand All @@ -22,6 +23,10 @@ libc = "0.2"
log = "0.4"
async-trait = { version = "0.1", optional = true }
remove-async-await = { version = "1.0", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0.115", optional = true }
tokio-tungstenite = { version = "0.20.1", optional = true, features = ["rustls-tls-native-roots"] }
futures-util = { version = "0.3.28", optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
dlopen2 = "0.4"
Expand Down
6 changes: 6 additions & 0 deletions omnisette/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub mod adi_proxy;
pub mod anisette_headers_provider;
pub mod store_services_core;

#[cfg(feature = "remote-anisette-v3")]
pub mod remote_anisette_v3;

#[cfg(target_os = "macos")]
pub mod aos_kit;

Expand Down Expand Up @@ -41,6 +44,9 @@ impl std::error::Error for AnisetteMetaError {}

pub const DEFAULT_ANISETTE_URL: &str = "https://ani.f1sh.me/";

#[cfg(feature = "remote-anisette-v3")]
pub const DEFAULT_ANISETTE_URL_V3: &str = "https://ani.sidestore.io";

#[derive(Clone)]
pub struct AnisetteConfiguration {
anisette_url: String,
Expand Down
Loading

0 comments on commit 3e14ec5

Please sign in to comment.