♻️ Simple & Efficient Gemini-to-HTTP Proxy fuwn.net
proxy gemini-protocol protocol gemini http rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(response): Always proxy images as raw bytes

Fuwn d64ff3c8 80d356c7

+13 -3
+2 -2
Cargo.lock
··· 856 856 857 857 [[package]] 858 858 name = "germ" 859 - version = "0.4.6" 859 + version = "0.4.7" 860 860 source = "registry+https://github.com/rust-lang/crates.io-index" 861 - checksum = "9fb35c4432f7fdc139b68689e8a0741d118392566f8c63ca725971acaaa4b2ea" 861 + checksum = "603354f11eb56ae667d4f1ec32162b90a01c8c40c70195f5386f2fc65e5aa272" 862 862 dependencies = [ 863 863 "anyhow", 864 864 "rustls",
+1 -1
Cargo.toml
··· 22 22 23 23 [dependencies] 24 24 # Gemini 25 - germ = { version = "0.4.6", features = ["ast", "meta"] } 25 + germ = { version = "0.4.7", features = ["ast", "meta"] } 26 26 27 27 # HTTP 28 28 actix-web = "4.11.0"
+10
src/response.rs
··· 93 93 94 94 timer = Instant::now(); 95 95 96 + if response.meta().starts_with("image/") { 97 + if let Some(content_bytes) = &response.content_bytes() { 98 + return Ok( 99 + HttpResponse::build(actix_web::http::StatusCode::OK) 100 + .content_type(response.meta().as_ref()) 101 + .body(content_bytes.to_vec()), 102 + ); 103 + } 104 + } 105 + 96 106 let mut html_context = if configuration.is_raw() { 97 107 String::new() 98 108 } else {