Am 14.12.24 um 13:26 schrieb Björn Ketelaars:
On Sat 14/12/2024 00:08, Christoph Liebender wrote:Hello there everyone.This is my first try at contributing to the OpenBSD ports tree: https://liebender.dev/patches/openbsd-ports/wstunnel-port.tar.gz wstunnel is useful in case you want to connect to your OpenBSD box, given that you are behind some firewall that restricts traffic to certain ports - for example, you can configure wstunnel to listen on :443 and connect to your box via that port, to then route all your traffic to the wireguard interface of your server. There are other usecases though, but this is my primary one. Now, there are two patches included, even though wstunnel compiles on OpenBSD amd64 just fine. I had to apply these because the original Cargo.toml references a github repository as a crate: fastwebsockets. In this case, the developer of wstunnel made changes to the original crate which they did not (yet?) upstream, and their fork does not include any tags for the Cargo.toml to reference. This is why I am patching Cargo.toml to reference the original crate and then apply the changes of the wstunnel developer on top. I edited crates.inc manually in this case to add fastwebsockets-0.8.0. Is there a better way? `make modcargo-gen-crates` apparently only reads the unpatched, original Cargo.toml. Anyway, I'm glad to receive any feedback or comments. Thanks. - ChristophGreat start, thanks!
Many thanks for your suggestions! The OpenBSD porting tools seem to be more flexible than I initially thought :b
- wstunnel.rc feels incomplete: Please check if there are some sane/safe daemon_flags that can be added. Also, check if rc_bg=YES is needed.
Yes, I have checked again and there probably also needs to be `--no-color true` because otherwise wstunnel would fill the log with escape-sequences. Though, would it make sense to "enforce" this argument no matter what deamon_flags are set? Does this need a custom rc_cmd?
And yes, rc_bg=YES is needed because wstunnel stays in the foreground. I have applied your changes and reuploaded a v2 tarball to:https://liebender.dev/pub/openbsd-ports/wstunnel-port-v2.tar.gz (it is also attached for convenience)
The diff for infrastructure/db/user.list: diff --git a/infrastructure/db/user.list b/infrastructure/db/user.list index 7509c635f57..ceb5d803401 100644 --- a/infrastructure/db/user.list +++ b/infrastructure/db/user.list @@ -92,7 +92,7 @@ id user group port #581 _gonzui _gonzui textproc/gonzui 582 _tabled _tabled sysutils/tabled #583 _kdesud x11/kde/base3 -#584 _nepenthes _nepenthes net/nepenthes +584 _wstunnel _wstunnel net/wstunnel 585 _lighttpd _lighttpd www/lighttpd 586 _gnugk _gnugk net/gnugk 587 _darkstat _darkstat net/darkstat
wstunnel-port-v2.tar.gz
Description: application/gzip