flu0r1ne / wg2nd

wg2nd Mirror - This is an automatically maintained mirror of https://git.flu0r1ne.net/wg2nd/.
https://git.flu0r1ne.net/wg2nd/
GNU General Public License v2.0
0 stars 0 forks source link

Include 'Name: host_label' Comment in netdev File #3

Open flu0r1ne opened 10 months ago

flu0r1ne commented 10 months ago

Including in the netdev the # Name: host_label comment from wg-meshconf config output (that appears just under each [peer] section) would also be useful. The netdev names are generated automatically from the detected # Name: host_label - this would be nice to override too as users may have firewall scripts across their hosts that a expect standard interface name (e.g wg0)

Contributed by @itoffshore on aurweb

flu0r1ne commented 10 months ago

Properly maintaining the comments during transpilation would add a significant amount of code overhead, and I'm not sure it is worth the complexity trade-off. To do this, you would have to maintain a list of comments prior to a specific section or label, then inject them into the networkd source before the corresponding configuration field.