Skip to content

Commit

Permalink
Set server UUID in peer update POST request
Browse files Browse the repository at this point in the history
  • Loading branch information
FingerlessGlov3s committed Nov 10, 2023
1 parent ef6cc5b commit b9faeec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions PIAWireguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ def printDebug(text):
wireguardPeerInstanceInfo['client']['pubkey'] = wireguardServerInfo['server_key']
wireguardPeerInstanceInfo['client']['tunneladdress'] = "0.0.0.0/0"
wireguardPeerInstanceInfo['client']['keepalive'] = "25"
wireguardPeerInstanceInfo['client']['servers'] = opnsenseWGUUID

headers = {'content-type': 'application/json'}
r = requests.post(f'{opnsenseURL}/api/wireguard/client/setClient/{opnsenseWGPeerUUID}', data=json.dumps(wireguardPeerInstanceInfo), headers=headers, auth=(config['opnsenseKey'], config['opnsenseSecret']), verify=urlVerify)
Expand Down

0 comments on commit b9faeec

Please sign in to comment.