cloudflare / cloudflare/boringtun
`wg set private-key` does not give any output with `wg show`
- Dominant language
- Rust
- Stars
- 7.2k
- Forks
- 532
- PR merge metrics
- No merged PRs in 30d
Description
When running `wg set wg0 private-key <(wg genkey)`, no error is received but `wg show wg0` or `wg showconf wg0` does not show output for the `private-key` or the `public-key` (or maybe `own-public-key` is the public-key, but then it is not displayer in `wg`
Am I missing something or is there an issue ?
```
# no error reported when querying
$ socat - UNIX-CONNECT:/var/run/wireguard/wg0.sock
get=1
listen_port=49683
errno=0
# no error reported when setting key
# checked that `wg genkey output` is ok
$ wg set wg0 private-key <(wg genkey)
$
# no error reported when setting key
$ socat - UNIX-CONNECT:/var/run/wireguard/wg0.sock
set=1
private_key=6040ad1d02595ad318d7b54673de74361d7cce0a1a617da5b851031243abe67a
errno=0
# but output does not seem to be coherent
$ socat - UNIX-CONNECT:/var/run/wireguard/wg0.sock
get=1
own_public_key=cf4ad568938b7535f70e7cc68c29e038b3022efb0fe5b9a6c9f76a7be5c71817
listen_port=49683
errno=0
$ wg show wg0
interface: wg0
listening port: 49683
```
Context:
- in docker container `python:3.10-slim-bullseye`, docker 20.10.12, on Fedora 38
```
docker run --privileged --device /dev/net/tun -it debian:bullseye-slim sh
```
- boringtun-cli v0.5.2 installed with
```
curl https://sh.rustup.rs -sSf | sh -s -- -y && . /root/.cargo/env && \
cargo install --locked --bin boringtun-cli --version ~0.5.2 boringtun-cli
```
- `wg` installed with `apt-get update && apt-get install -y wireguard-tools`
Also tested with `git clone https://git.zx2c4.com/wireguard-tools && make -C wireguard-tools/src && make -C wireguard-tools/src install`
- start boringtun as root in container with
```
WG_SUDO=1 boringtun-cli wg0
BoringTun started successfully
```
Contributor guide
Assessment
This issue has not been assessed yet.