mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-02 22:12:18 +02:00
hls reverse proxy random token generation to avoid clashes
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
use crate::model::api_proxy::ProxyUserCredentials;
|
||||
use crate::model::config::TargetType;
|
||||
use crate::model::hls::HlsEntry;
|
||||
use crate::repository::storage::hash_string_as_hex;
|
||||
use std::collections::HashMap;
|
||||
use std::str;
|
||||
use tokio::time::Instant;
|
||||
use crate::utils::hash_utils::uuid_v4;
|
||||
use crate::utils::string_utils::replace_after_last_slash;
|
||||
|
||||
pub const HLS_PREFIX: &str = "hls";
|
||||
|
||||
pub fn rewrite_hls(base_url: &str, content: &str, hls_url: &str, virtual_id: u32, user: &ProxyUserCredentials,
|
||||
target_type: &TargetType, input_name: &str) -> (HlsEntry, String) {
|
||||
let token = hash_string_as_hex(hls_url);
|
||||
let token = uuid_v4();
|
||||
let username = &user.username;
|
||||
let password = &user.password;
|
||||
let mut chunk: u32 = 1;
|
||||
|
||||
Reference in New Issue
Block a user