Network access restriction for api user (#728)

* Network access restriction for api user
* Fixed strm provider:// url bug
This commit is contained in:
euzu
2026-04-23 21:15:59 +02:00
committed by GitHub
parent 60cabc71fc
commit eb2a017fa3
50 changed files with 3054 additions and 935 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
use crate::error::TuliproxError;
use enum_iterator::Sequence;
use std::{fmt::Display, str::FromStr};
@@ -45,7 +46,7 @@ impl Display for ProcessingOrder {
}
impl FromStr for ProcessingOrder {
type Err = &'static str;
type Err = TuliproxError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let normalized = s.trim().to_lowercase();
@@ -67,7 +68,7 @@ impl FromStr for ProcessingOrder {
x if x == Self::MFR => Ok(Self::Mfr),
x if x == Self::MRF => Ok(Self::Mrf),
_ => Err("invalid processing order"),
_ => Err(TuliproxError::Config(format!("Invalid processing order {s}"))),
}
}
}