On 2023-05-08 23:15, Tor Houghton wrote: > On Sat, May 06, 2023 at 04:40:21PM -0000, Stuart Henderson wrote: > > > > [snip] > > > > wgport port-number wgkey my-private-key > > inet 10.0.98.1/24 > > > > [snip] > > Here's[*] a super hacky way to convert a pivpn wireguard config file to output > that can be placed in a /etc/hostname.wg0 file, if this helps anyone at all. > > $ cat client.conf | ./wgconv.sh > > Tor > > * https://www.bogus.net/~torh/files/wgconv.sh >
Huh, neat. :) It made me smile to see this because I wrote my own pledged + unveiled tool in Perl for this exact same task some time ago. Though mine does some basic validation on the IPs, base64 keys, etc. Tool: https://github.com/3uryd1ce/sysadm/blob/master/translate_wg_conf Man page: https://github.com/3uryd1ce/sysadm/blob/master/man/man1/translate_wg_conf.1 One thing to note is that it depends on p5-Config-Std and p5-Net-IP to handle parsing and validation, so this would be needed first: # pkg_add p5-Config-Std p5-Net-IP Anyway, my self-plug is over. Hope it helps someone.