mirror of
https://github.com/telemt/telemt.git
synced 2026-11-22 15:26:37 +03:00
WEB: bounded opt-in wildcard host routing added
This commit is contained in:
@@ -129,6 +129,7 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
host: "proxy.example.com".to_string(),
|
||||
capability,
|
||||
shared: Arc::new(crate::config::WebRuntimeProfileShared {
|
||||
derivation_context: [0; 32],
|
||||
public_addr: "203.0.113.10:443".parse().unwrap(),
|
||||
user: "alice".to_string(),
|
||||
secret_mode: WebSecretMode::Plain,
|
||||
@@ -158,6 +159,7 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
index: "index.html".to_string(),
|
||||
});
|
||||
let vhost = Arc::new(WebRuntimeVhost {
|
||||
wildcard: None,
|
||||
host: "proxy.example.com".to_string(),
|
||||
base: base.to_string(),
|
||||
decoy_fasttrack_mode: WebDecoyFastTrackMode::Off,
|
||||
@@ -171,6 +173,7 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
vhosts.insert(
|
||||
"other.example.com".to_string(),
|
||||
Arc::new(WebRuntimeVhost {
|
||||
wildcard: None,
|
||||
host: "other.example.com".to_string(),
|
||||
base: "/".to_string(),
|
||||
decoy_fasttrack_mode: WebDecoyFastTrackMode::Off,
|
||||
@@ -193,6 +196,9 @@ fn runtime_config_with_carriers_and_deadlines(
|
||||
config.web.limits.max_bootstraps_per_ip = 1;
|
||||
config.web.timeouts.shutdown_secs = 1;
|
||||
config.web.runtime = Some(Arc::new(WebRuntimeConfig {
|
||||
snapshot_id: 0,
|
||||
wildcards: Default::default(),
|
||||
catch_all: None,
|
||||
vhosts,
|
||||
profiles: vec![profile],
|
||||
capabilities: vec![capability].into_boxed_slice(),
|
||||
|
||||
Reference in New Issue
Block a user