mirror of
https://github.com/telemt/telemt.git
synced 2026-11-22 15:26:37 +03:00
WEB: share immutable profiles + decoys across exact host lists
This commit is contained in:
+25
-15
@@ -127,20 +127,22 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
) -> ProxyConfig {
|
||||
let profile = Arc::new(WebRuntimeProfile {
|
||||
host: "proxy.example.com".to_string(),
|
||||
public_addr: "203.0.113.10:443".parse().unwrap(),
|
||||
user: "alice".to_string(),
|
||||
secret_mode: WebSecretMode::Plain,
|
||||
carrier,
|
||||
carrier_negotiation_enabled,
|
||||
carrier_learning,
|
||||
carriers: Arc::clone(&carriers),
|
||||
carrier_negotiation_deadlines_secs,
|
||||
capability,
|
||||
credential_id: [0; 16],
|
||||
key_fingerprint: "0000000000000000".to_string(),
|
||||
max_sessions: 4,
|
||||
max_streams: 16,
|
||||
max_streams_per_session: 4,
|
||||
shared: Arc::new(crate::config::WebRuntimeProfileShared {
|
||||
public_addr: "203.0.113.10:443".parse().unwrap(),
|
||||
user: "alice".to_string(),
|
||||
secret_mode: WebSecretMode::Plain,
|
||||
carrier,
|
||||
carrier_negotiation_enabled,
|
||||
carrier_learning,
|
||||
carriers: Arc::clone(&carriers),
|
||||
carrier_negotiation_deadlines_secs,
|
||||
credential_id: [0; 16],
|
||||
key_fingerprint: "0000000000000000".to_string(),
|
||||
max_sessions: 4,
|
||||
max_streams: 16,
|
||||
max_streams_per_session: 4,
|
||||
}),
|
||||
});
|
||||
let mut assets = BTreeMap::new();
|
||||
assets.insert(
|
||||
@@ -159,7 +161,7 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
host: "proxy.example.com".to_string(),
|
||||
base: base.to_string(),
|
||||
decoy_fasttrack_mode: WebDecoyFastTrackMode::Off,
|
||||
decoy: WebRuntimeDecoy::StaticDirectory(Arc::clone(&site)),
|
||||
decoy: Arc::new(WebRuntimeDecoy::StaticDirectory(Arc::clone(&site))),
|
||||
decoy_header_secs: 1,
|
||||
profiles: vec![Arc::clone(&profile)],
|
||||
capabilities: vec![capability].into_boxed_slice(),
|
||||
@@ -172,7 +174,7 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
host: "other.example.com".to_string(),
|
||||
base: "/".to_string(),
|
||||
decoy_fasttrack_mode: WebDecoyFastTrackMode::Off,
|
||||
decoy: WebRuntimeDecoy::StaticDirectory(site),
|
||||
decoy: Arc::new(WebRuntimeDecoy::StaticDirectory(site)),
|
||||
decoy_header_secs: 1,
|
||||
profiles: Vec::new(),
|
||||
capabilities: Vec::new().into_boxed_slice(),
|
||||
@@ -547,3 +549,11 @@ async fn https_lanes_is_advertised_and_requires_canonical_lane_headers() {
|
||||
generation.stop_sessions().await;
|
||||
generation.stop_background_tasks().await;
|
||||
}
|
||||
|
||||
// Exercise loaded host groups through real HTTP and process-owned admission.
|
||||
#[path = "host_list_tests.rs"]
|
||||
mod host_list_tests;
|
||||
|
||||
// Manual matched measurements keep timing assertions out of deterministic regressions.
|
||||
#[path = "host_list_benchmarks.rs"]
|
||||
mod host_list_benchmarks;
|
||||
|
||||
Reference in New Issue
Block a user