Skip to content

Draft: HTTPS Mux SessionState #991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
68d8611
Add ALPN field to listener config, change listener builder
Wonshtrum Aug 10, 2023
ef17772
Add h2 flag to frontends and in Router
Wonshtrum Aug 11, 2023
4806fdb
Mux SessionState (test)
Wonshtrum Aug 14, 2023
afbe0ad
Mutualize socket_read at the beginning of Mux::readable with an "expe…
Wonshtrum Aug 16, 2023
9d92d89
Add mechanisms to handle H2 frames
Wonshtrum Aug 17, 2023
0029555
Remork Streams
Wonshtrum Aug 21, 2023
46fbe9b
Continue frame handling:
Wonshtrum Aug 22, 2023
e018789
Split mux in h1 and h2 files
Wonshtrum Aug 22, 2023
46ccc20
Define MuxResult for inter MuxSession control flow
Wonshtrum Aug 22, 2023
d3fadeb
Front to Back:
Wonshtrum Aug 23, 2023
1bf6741
Maintenance:
Wonshtrum Aug 24, 2023
29b1df4
PoC: pass proxied endpoints to proxy functions through trait
Wonshtrum Aug 24, 2023
f44ebdd
Insert writable readiness in opposit endpoint upon receiving proxyabl…
Wonshtrum Aug 25, 2023
9c33967
First H2<->H1 round trip!
Wonshtrum Aug 25, 2023
08132d0
Fix H1 round trip:
Wonshtrum Aug 28, 2023
0c50d57
H2 header fixes:
Wonshtrum Aug 28, 2023
a816594
H2<->H2 Settings handshake
hcaumeil Aug 28, 2023
0491cbd
Mux routing:
Wonshtrum Aug 30, 2023
e4f341d
Set default RulePosition to Tree when parsing config.toml
Wonshtrum Aug 31, 2023
acfc8c5
H2 client endpoint:
Wonshtrum Aug 31, 2023
e150a90
2 improvments:
Wonshtrum Sep 4, 2023
10927cd
Error handling:
Wonshtrum Sep 6, 2023
9441e12
Error handling and connection retry:
Wonshtrum Sep 9, 2023
a8992c8
Proxying enhancements:
Wonshtrum Sep 12, 2023
90c70b3
Use Mux State in HTTP Session:
Wonshtrum Sep 19, 2023
64c7225
H2 Continuation frames for Headers
Wonshtrum Sep 25, 2023
6a8caf6
Add settings for connect protocol and no RFC 7540 priorities
Wonshtrum Sep 27, 2023
6d7acc2
Introduce timeouts in Mux State
Wonshtrum Sep 29, 2023
a46ab63
Make gRPC work through Mux!
Wonshtrum Sep 29, 2023
7edc897
Properly deregister backends from slab and mio
Wonshtrum Oct 18, 2023
4436540
tmp
Wonshtrum Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bin/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ pub enum HttpFrontendCmd {
method: Option<String>,
#[clap(long = "tags", help = "Specify tag (key-value pair) to apply on front-end (example: 'key=value, other-key=other-value')", value_parser = parse_tags)]
tags: Option<BTreeMap<String, String>>,
#[clap(help = "the frontend uses http2 with prio-knowledge")]
h2: Option<bool>,
},
#[clap(name = "remove")]
Remove {
Expand Down
2 changes: 1 addition & 1 deletion bin/src/ctl/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ impl CommandManager {
if let Some(response_content) = response.content {
let certs = match response_content.content_type {
Some(ContentType::CertificatesWithFingerprints(certs)) => certs.certs,
_ => bail!(format!("Wrong response content {:?}", response_content)),
_ => bail!(format!("Wrong response content {response_content:?}")),
};
if certs.is_empty() {
bail!("No certificates match your request.");
Expand Down
6 changes: 3 additions & 3 deletions bin/src/ctl/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ pub fn print_cluster_responses(
clusters_table.set_format(*prettytable::format::consts::FORMAT_BOX_CHARS);
let mut header = vec![cell!("cluster id")];
for worker_id in worker_responses.map.keys() {
header.push(cell!(format!("worker {}", worker_id)));
header.push(cell!(format!("worker {worker_id}")));
}
header.push(cell!("desynchronized"));
clusters_table.add_row(Row::new(header));
Expand Down Expand Up @@ -659,14 +659,14 @@ pub fn print_certificates_by_worker(
}

for (worker_id, response_content) in response_contents.iter() {
println!("Worker {}", worker_id);
println!("Worker {worker_id}");
match &response_content.content_type {
Some(ContentType::CertificatesByAddress(list)) => {
for certs in list.certificates.iter() {
println!("\t{}:", certs.address);

for summary in certs.certificate_summaries.iter() {
println!("\t\t{}", summary);
println!("\t\t{summary}");
}

println!();
Expand Down
4 changes: 4 additions & 0 deletions bin/src/ctl/request_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ impl CommandManager {
method,
cluster_id: route,
tags,
h2,
} => self.send_request(
RequestType::AddHttpFrontend(RequestHttpFrontend {
cluster_id: route.into(),
Expand All @@ -214,6 +215,7 @@ impl CommandManager {
Some(tags) => tags,
None => BTreeMap::new(),
},
h2: h2.unwrap_or(false),
})
.into(),
),
Expand Down Expand Up @@ -250,6 +252,7 @@ impl CommandManager {
method,
cluster_id: route,
tags,
h2,
} => self.send_request(
RequestType::AddHttpsFrontend(RequestHttpFrontend {
cluster_id: route.into(),
Expand All @@ -262,6 +265,7 @@ impl CommandManager {
Some(tags) => tags,
None => BTreeMap::new(),
},
h2: h2.unwrap_or(false),
})
.into(),
),
Expand Down
7 changes: 7 additions & 0 deletions command/src/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ message HttpsListenerConfig {
// The tickets allow the client to resume a session. This protects the client
// agains session tracking. Defaults to 4.
required uint64 send_tls13_tickets = 20;
repeated AlpnProtocol alpn = 21;
}

// details of an TCP listener
Expand Down Expand Up @@ -221,6 +222,7 @@ message RequestHttpFrontend {
required RulePosition position = 6 [default = TREE];
// custom tags to identify the frontend in the access logs
map<string, string> tags = 7;
required bool h2 = 8;
}

message RequestTcpFrontend {
Expand Down Expand Up @@ -339,6 +341,11 @@ enum TlsVersion {
TLS_V1_3 = 5;
}

enum AlpnProtocol {
Http11 = 0;
H2 = 1;
}

// A cluster is what binds a frontend to backends with routing rules
message Cluster {
required string cluster_id = 1;
Expand Down
Loading