Hello, is it possible with boringtun core library to set configuration? My main goal is just to use vpn connection file and setup vpn connection in system with this library. So I have config file with keys, servers from my vpn provider. It looks like:
[Interface]
# NetShield = 0
# Moderate NAT = off
# VPN Accelerator = on
PrivateKey = PRIVATE KEY HERE
Address = SERVER ADDRESS/32
DNS = SERVER ADDRESS
[Peer]
PublicKey = PUBLIC KEY HERE
AllowedIPs = 0.0.0.0/0
Endpoint = SERVER ADDRESS:51820
How can I "apply" it to created tunnel? So I did the same logic as cli and check with wg show:
interface: utun42
listening port: 58873
With wg-quick I can put config file into /etc/wireguard/test.conf and run it: wg-quick up test. And it creates vpn connection and works okay. Can I do the same with only this library? Or I should apply this config file on created tunnel with some other tool?
If you are trying to do this with just the library, you will need to parse the file and instantiate the various objects yourself with the configuration parameters from the parsed file.
Hello, is it possible with boringtun core library to set configuration? My main goal is just to use vpn connection file and setup vpn connection in system with this library. So I have config file with keys, servers from my vpn provider. It looks like:
How can I "apply" it to created tunnel? So I did the same logic as cli and check with
wg show
:With
wg-quick
I can put config file into/etc/wireguard/test.conf
and run it:wg-quick up test
. And it creates vpn connection and works okay. Can I do the same with only this library? Or I should apply this config file on created tunnel with some other tool?