tcp-over-http
tcp-over-http copied to clipboard
Add arbitrary headers to HTTP request
Would it be possible to modify your fine application to add arbitrary HTTP request headers.
My specific use case is tunneling traffic through a web server that is presented to the world via CloudFlare. It would add a layer of security if I could as CloudFlare to require that all connections to the endpoint require a CloudFlare service token. Basically that just means that the HTTP client needs to add two additional HTTP headers to the request.
Thanks Shaun
(i dont understand what you are trying to do)
in src/entry.rs
async fn init_http_session(target: &Url) -> Trace<Uuid> {
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("key", "value".try_into().unwrap());
let resp = CLIENT
.get(join_url(target, ["open"]))
.headers(headers)
.header("key", "value")
.send()
.await
.unwrap();
...