Merge pull request #7 from krombel/patch-1

Fix: Use currect alias and description for peers
This commit is contained in:
K4YT3X 2020-01-02 03:32:20 -05:00 committed by GitHub
commit 8632583a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,10 +398,10 @@ def generate_configs(output_path):
continue
config.write('\n[Peer]\n')
print(p.private_key)
if peer.alias:
config.write(f'# Alias: {peer.alias}\n')
if peer.description:
config.write(f'# Description: {peer.description}\n')
if p.alias:
config.write(f'# Alias: {p.alias}\n')
if p.description:
config.write(f'# Description: {p.description}\n')
config.write(f'PublicKey = {wg.pubkey(p.private_key)}\n')
config.write(f'AllowedIPs = {p.address}\n')
if p.public_address != '':