tonarino / innernet

A private network system that uses WireGuard under the hood.
https://blog.tonari.no/introducing-innernet
MIT License
5.01k stars 186 forks source link

direct manipulation of Wireguard parameters #215

Open ColdCanuck opened 2 years ago

ColdCanuck commented 2 years ago

Is there a way to change some of the wireguard parameters ? In our use case the 25 second persistent keep alive is a little "chatty" and we would like to lengthen it.

I don't see any way via the innernet command (in the same vein as set listen port); would editing the /etc/innernet/net.conf file be a colossally bad idea. Is there a better / safer way ?

Thanks for the great software !!!

strohel commented 2 years ago

Hi, the 25 second interval is currently hard-coded in code: https://github.com/tonarino/innernet/blob/bb6bac3964737b270c8673fa2b3f9e6b690ffe34/shared/src/lib.rs#L22

Should be possible to make it configurable, but I think some logic (like NAT candidate traversal) might assume this particular value, so that might need some adjustments.

ColdCanuck commented 2 years ago

Thanks for the quick answer. We will live with it for now.