boringtun icon indicating copy to clipboard operation
boringtun copied to clipboard

[request] exposing some `::device` internals

Open sunny-g opened this issue 4 years ago • 2 comments

I'm porting a Golang project to Rust called yggdrasil - tl;dr, its a P2P meshnet software built on Wireguard in which your static IPv6 is derived from the hash of a public ed25519 key.

The original is built on wireguard-go and seems to rely on a slightly higher-level "device" API that simplifies its integration into the project, and I noticed that the most similar types and interfaces were unique to the boringtun binary, not library, and (unfortunately for someone of my familiarity with Rust) make extensive use of unsafe.

Would it be possible to expose types like TunSocket and even Device and Peer in the library API?

sunny-g avatar Jun 02 '20 02:06 sunny-g

@sunny-g currently I am rewriting the device API. I should be able to expose some stuff a bit more nicely once this is done.

Noah-Kennedy avatar Jun 27 '22 19:06 Noah-Kennedy

If I can piggy-back on this request, it'd be nice to get the device name through an api call rather than having to set WG_TUN_NAME_FILE and reading it from a file.

bryanlarsen avatar Mar 23 '23 18:03 bryanlarsen