From Benjamin Jacobs to ~zethra/public-inbox
> If you have the inclination, it'd be good to add a functional test to > ./stargazer/scripts/gemini-diagnostics to ensure that it doesn't break in > some other way later. Good to know! I can work on adding to the diagnostics when I get the chance. --- Thank you Sashanoraa for making stargazer. I discovered it when I tried to make my own rust server and Stargazer is much better than what I would have come up with. I really appreciate all the effort you have put into making and maintaining it.
From Benjamin Jacobs to ~zethra/public-inbox
Hi, I switched the osrandom dev dependency with rand and made sure it compiles using MSRV 1.77.0. I couldn't figure out how to create an async buf reader out of the tcp stream and have it also work with the tls acceptor. So what I have done instead is to use the peek function to peek in blocks of 64 bytes and read in those blocks until a newline is reached. > loop { > // Peek in blocks of 64 bytes, and read only until the \n. > let mut peek = [0u8; 64]; > let n = stream.peek(&mut peek).await?;
From Benjamin Jacobs to ~zethra/public-inbox
--- Cargo.lock | 134 ++++++++++- Cargo.toml | 5 + doc/stargazer-ini.scd | 9 + doc/stargazer.1.txt | 2 +- doc/stargazer.ini.5.txt | 12 +- src/config.rs | 6 + src/main.rs | 492 +++++++++++++++++++++++++++++++++++++++- 7 files changed, 646 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de04070..4fdec0e 100644 --- a/Cargo.lock +++ b/Cargo.lock [message trimmed]
From Benjamin Jacobs to ~zethra/public-inbox
> First, you are using the `from_bits` IP addr functions, which are > unstable. Please only use code that compiles on stable Rust, preferably > code that compile on the currently documented MSRV. Okay, I'll make sure of it. > Second please use a different random number library than osrandom. The > C component won't compile on my system in debug mode because it throws a > warning (`_FORTIFY_SOURCE requires compiling with optimization`) and it > has warnings as errors set. Additionally, it appears to be unmaintained. > It has one version uploaded 2 years ago and the GitHub repo linked on > it's crates.io page has been deleted. Oh shoot, I didn't realize it was dead. I'll switch to rand instead.
From Benjamin Jacobs to ~zethra/public-inbox
This patch adds support for proxy protocol headers. It allows for proxy servers to pass the real client IP address to the server. The header is injected before the tls connection by the proxy server so that the tls connection can be passed through unmodified. Here is a pretty good article that describes the proxy protocol. https://seriousben.com/posts/2020-02-exploring-the-proxy-protocol/ I have a unique use case where I have two separate gemini servers running on the same machine that needs to be accessible from port 1965 and some of the services use the peer address as a part of session management. To solve this, I'm using a tcp proxy that checks the tls sni to see where the traffic should be redirected to. The proxy protocol header is then injected into the proxied request so the server will know where the
From Benjamin Jacobs to ~zethra/public-inbox
--- Cargo.lock | 77 ++++++- Cargo.toml | 5 + doc/stargazer-ini.scd | 9 + doc/stargazer.1.txt | 2 +- doc/stargazer.ini.5.txt | 12 +- src/config.rs | 6 + src/main.rs | 441 +++++++++++++++++++++++++++++++++++++++- 7 files changed, 541 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de04070..d933cb2 100644 --- a/Cargo.lock +++ b/Cargo.lock [message trimmed]
From Benjamin Jacobs to ~zethra/public-inbox
In this patch, I have made some minor changes to the docs: * Replaced ip-log with log-ip in doc/stargazer-ini.scd * Fix spelling mistakes * Update the mailing list address in both docs and README.md
From Benjamin Jacobs to ~zethra/public-inbox
--- README.md | 6 +++--- doc/stargazer-ini.scd | 20 ++++++++++---------- doc/stargazer.1.txt | 6 +++--- doc/stargazer.ini.5.txt | 24 ++++++++++++------------ doc/stargazer.scd | 6 +++--- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index da8b151..03d89c5 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,9 @@ under the terms of the [GNU AFFERO GENERAL PUBLIC LICENSE Version 3](./LICENSE). [message trimmed]
From Benjamin Jacobs to ~zethra/public-inbox
render-docs now builds with spaces instead of tabs. The output is more closely aligned to the original docs/stargazer.1.txt --- doc/stargazer.1.txt | 35 +-- doc/stargazer.ini.5.txt | 511 ++++++++++++++++++++-------------------- scripts/render-docs | 16 +- 3 files changed, 285 insertions(+), 277 deletions(-) diff --git a/doc/stargazer.1.txt b/doc/stargazer.1.txt index d0003ba..1100284 100644 --- a/doc/stargazer.1.txt +++ b/doc/stargazer.1.txt @@ -1,4 +1,5 @@ stargazer(1) General Commands Manual stargazer(1)[message trimmed]
From Benjamin Jacobs to ~zethra/public-inbox
Thanks for your patience, I'm running on debian and col also comes from util-linux, specifically running 2.36.1. I'm just realizing that col doesn't strip control sequences, just control characters. Groff disables color output by default on debian and that lead me to believe that col was taking care of the color output. You should be able to add `-c` to groff to disable color output. When getting the output to match the docs, I switched to groff to get the alignment to be justified, but scdoc forces the output to be left aligned. I don't think there's a real reason to use groff over man. And since that worked before, I'll probably send in a v2 patch using man.