boringtun icon indicating copy to clipboard operation
boringtun copied to clipboard

feat: output private key for get command

Open AeroNotix opened this issue 2 years ago • 0 comments

PR adds the output for private_key when the get=1 command is used.

This allows the wg show command to properly show the public key in the output, which is useful if you have multiple wireguard devices or if you perform some automation around your wireguard devices based on the public key.

Example without:

; sudo wg show
interface: wg0
  listening port: 39742

Example with:

interface: wg0
  public key: XXXX/XXXXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXX
  private key: (hidden)
  listening port: 37019

Additionally, added a comment around the own_public_key part, not entirely sure what the use for that is. Perhaps some boringtun extension?

AeroNotix avatar Dec 05 '23 14:12 AeroNotix