Add release files
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-11-26 11:52:58 +01:00
parent 72c167dcd5
commit d8ea9db3c2
3 changed files with 22 additions and 0 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y libcurl4 \
&& rm -rf /var/lib/apt/lists/*
COPY header_proxy /usr/local/bin/header_proxy
ENTRYPOINT ["/usr/local/bin/header_proxy"]

10
build_docker_image.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
cargo build --release
TEMP_DIR=$(mktemp -d)
cp target/release/header_proxy "$TEMP_DIR"
docker build -f Dockerfile "$TEMP_DIR" -t pierre42100/header_proxy
rm -r $TEMP_DIR

View File

@@ -175,6 +175,8 @@ fn process_headers(buff: &[u8]) -> anyhow::Result<Option<ProcessHeadersResult>>
.find(|h| h.name.eq_ignore_ascii_case(&ARGS.target_host_port_header)) .find(|h| h.name.eq_ignore_ascii_case(&ARGS.target_host_port_header))
.map(|h| String::from_utf8_lossy(h.value)); .map(|h| String::from_utf8_lossy(h.value));
log::debug!("Request headers: {:?}", headers);
let Some(target_host) = target_host else { let Some(target_host) = target_host else {
if parsing_res.is_partial() { if parsing_res.is_partial() {
return Ok(None); return Ok(None);