WireGuard: Difference between revisions

m Added a peer name option to a code example, as suggested by a comment in the same example.
Line 68: Line 68:
       peers = [
       peers = [
         # List of allowed peers.
         # List of allowed peers.
         { # Feel free to give a meaningful name
         {  
          # Feel free to give a meaningful name
          name = "Jane Doe";
           # Public key of the peer (not a file path).
           # Public key of the peer (not a file path).
           publicKey = "{client public key}";
           publicKey = "{client public key}";
Line 74: Line 76:
           allowedIPs = [ "10.100.0.2/32" ];
           allowedIPs = [ "10.100.0.2/32" ];
         }
         }
         { # John Doe
         {  
          name = "John Doe";
           publicKey = "{john doe's public key}";
           publicKey = "{john doe's public key}";
           allowedIPs = [ "10.100.0.3/32" ];
           allowedIPs = [ "10.100.0.3/32" ];