♻️ 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(html): relative url handling

Fuwn de04ac86 8f021754

+26 -8
+6
src/html.rs
··· 103 103 let mut href = to.to_string(); 104 104 let mut surface = false; 105 105 106 + if href.starts_with("./") || href.starts_with("../") { 107 + if let Ok(url) = url.join(&href) { 108 + href = url.to_string(); 109 + } 110 + } 111 + 106 112 if href.contains("://") && !href.starts_with("gemini://") { 107 113 surface = true; 108 114 } else if !href.contains("://") && href.contains(':') {
+20 -8
src/response/configuration.rs
··· 1 1 pub struct Configuration { 2 - is_proxy: bool, 3 - is_raw: bool, 2 + is_proxy: bool, 3 + is_raw: bool, 4 4 is_no_css: bool, 5 5 } 6 6 ··· 9 9 Self { is_proxy: false, is_raw: false, is_no_css: false } 10 10 } 11 11 12 - pub const fn is_proxy(&self) -> bool { self.is_proxy } 12 + pub const fn is_proxy(&self) -> bool { 13 + self.is_proxy 14 + } 13 15 14 - pub const fn is_raw(&self) -> bool { self.is_raw } 16 + pub const fn is_raw(&self) -> bool { 17 + self.is_raw 18 + } 15 19 16 - pub const fn is_no_css(&self) -> bool { self.is_no_css } 20 + pub const fn is_no_css(&self) -> bool { 21 + self.is_no_css 22 + } 17 23 18 - pub fn set_proxy(&mut self, is_proxy: bool) { self.is_proxy = is_proxy; } 24 + pub fn set_proxy(&mut self, is_proxy: bool) { 25 + self.is_proxy = is_proxy; 26 + } 19 27 20 - pub fn set_raw(&mut self, is_raw: bool) { self.is_raw = is_raw; } 28 + pub fn set_raw(&mut self, is_raw: bool) { 29 + self.is_raw = is_raw; 30 + } 21 31 22 - pub fn set_no_css(&mut self, is_no_css: bool) { self.is_no_css = is_no_css; } 32 + pub fn set_no_css(&mut self, is_no_css: bool) { 33 + self.is_no_css = is_no_css; 34 + } 23 35 }