HarryMuscle
Senior Member
I use TorGuard as my VPN provider and unfortunately they only remember WireGuard client keys on their servers for a limited period of time so if you're like me and don't use your connecting constantly you have to use their API to re-register the keys. No problem with scripting that via the wgclient.postconf script though.
The issue I'm running into, however, is that the response of that API call returns the IP address that I'm supposed to use for the WireGuard interface. Unfortunately, when the wgclient.postconf script gets called the WireGuard interface hasn't been created yet so I can't change its address.
Doing this from the wgclient-start script won't work either cause the API call that gives me the interface address to use needs to be done before the connection is established. Basically I get the info in wgclient.postconf but I need to apply it in wgclient-start or somehow after the interface is created. I could probably write a temporary file to communicate between the two scripts but I'm not liking that idea, seems too hackish and wastes writes to the flash memory
So I'm wondering if anyone has any idea on how to change the WireGuard interface address from the wgclient.postconf script.
Thanks,
Harry
The issue I'm running into, however, is that the response of that API call returns the IP address that I'm supposed to use for the WireGuard interface. Unfortunately, when the wgclient.postconf script gets called the WireGuard interface hasn't been created yet so I can't change its address.
Doing this from the wgclient-start script won't work either cause the API call that gives me the interface address to use needs to be done before the connection is established. Basically I get the info in wgclient.postconf but I need to apply it in wgclient-start or somehow after the interface is created. I could probably write a temporary file to communicate between the two scripts but I'm not liking that idea, seems too hackish and wastes writes to the flash memory
So I'm wondering if anyone has any idea on how to change the WireGuard interface address from the wgclient.postconf script.
Thanks,
Harry