Closed sgued closed 1 week ago
@sgued Seeing this issue as I was about to fork your natpmp-ng
.
For my usecase I don't need get_default_gateway
, so if you made it optional in your fork I could use it.
I'm just going to remove it for now.
Feel free to open a PR on natpmp-ng that makes this optional. I will merge it. https://gitlab.com/sgued/natpmp-ng/-/merge_requests
I'm not sure how complicated it would be to make optional, though. I'll have to look into it.
Sounds good, the C FFI is removed. It is a surprise that this repo created 6-7 years ago, still have active users. As far as I known, natpmp has been deprecated in many routers, so I was unable to test the features since 3 years ago as I don't have a such a router.
Thanks! I'm using the crate to interact with ProtonVPN for automatic port forwarding renewal, they use natpmp requests.
Same, I'm using it for ProtonVPN. I built a GTK utility for that: https://ten-forward.sgued.fr/
https://crates.io/crates/netdev is a crate that can allow you to get the default gateway and is widely used (it was previously named default-net with almost 70k downloads/montth
It has a bit of unsafe but does not link against C code. I find it preferable to using the embeded C code that never got updated.
If compile adding dependencies are an issue, i could also be possible to make the C implementation of
get_default_gateway
optional.That would allow my project to get rid of the unupdated c dependency I don't like.