cloudflare / cloudflare/boringtun

Set configuration file

Open
#318 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
7.2k
Forks
532
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.