<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="auto">Awesome! Thanks for doing all this. Your commits looked wonderful - it was a pleasure to follow your work!<br><br>Regards,<br><br>Michael </div><br><br><div class="gmail_quote"><div dir="auto">Am 21. Februar 2024 16:25:36 GMT+11:00 schrieb Aaron LI <aly@aaronly.me>:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Hi all,</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">I'm pleased to announce that in-kernel WireGuard is ready on DragonFly (master branch) now :D</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">The work mainly includes the followings:</div><div id="AppleMailSignature" dir="ltr">- the 'if_wg.ko' kernel module code in sys/net/wg [0]</div><div id="AppleMailSignature" dir="ltr">- required crypto code, including blake2s, chachapoly, siphash, curve25519</div><div id="AppleMailSignature" dir="ltr">- the ifconfig(8) support to manage the wg interfaces [1]</div><div id="AppleMailSignature" dir="ltr">- the wg rc script [2] to easily setup wg</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">The wg code is ported from FreeBSD [3] but has many significant changes. The major changes are:</div><div id="AppleMailSignature" dir="ltr">- replaced the nvlist-based ioctl code with OpenBSD's, and thus ported OpenBSD's ifconfig(8) support as well</div><div id="AppleMailSignature" dir="ltr">- used taskqueue(9) API directly instead of gtaskqueue(9)</div><div id="AppleMailSignature" dir="ltr">- used locks instead of epoch(9)</div><div id="AppleMailSignature" dir="ltr">- made the code much more readable and understandable: added many useful comments, renamed some confusing functions, refactored some logic flows, simplify the return values, etc...</div><div id="AppleMailSignature" dir="ltr">- add selftest code from the upstream wireguard-freebsd repo [4]</div><div id="AppleMailSignature" dir="ltr">- unified the code style, and performed various code cleanups</div><div id="AppleMailSignature" dir="ltr">- fixed a few bugs</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">The wg rc script [2] is written from scratch as a replacement for wg-quick. Please read the following wg.conf(5) man page for the configuration file format and examples:</div><div id="AppleMailSignature" dir="ltr">https://www.dragonflybsd.org/cgi/web-man?command=wg.conf§ion=5</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">For example, write a wg configuration file and place it at '/etc/wireguard/wg0.conf', and then put the following lines in '/etc/rc.conf':</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">wg_enable="YES"</div><div id="AppleMailSignature" dir="ltr">wg_interfaces="wg0"</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">Now the wg0 interface will be auto configured from next startup.</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">To get it running immediately, do: service wg start wg0</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">Cheers,</div><div id="AppleMailSignature" dir="ltr">Aaron</div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr"><br></div><div id="AppleMailSignature" dir="ltr">[0] sys/net/wg: https://gitweb.dragonflybsd.org/dragonfly.git/tree/HEAD:/sys/net/wg</div><div id="AppleMailSignature" dir="ltr">[1] sbin/ifconfig/ifwg.c: https://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sbin/ifconfig/ifwg.c</div><div id="AppleMailSignature" dir="ltr">[2] etc/rc.d/wg: https://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/etc/rc.d/wg</div><div id="AppleMailSignature" dir="ltr">[3] FreeBSD wireguard code: https://cgit.freebsd.org/src/tree/sys/dev/wg</div><div id="AppleMailSignature" dir="ltr">[4] wireguard-freebsd selftest: https://git.zx2c4.com/wireguard-freebsd/tree/src/selftest</div><div id="AppleMailSignature" dir="ltr"></div></blockquote></div></body></html>