4 ms·
I can't edit my previous comment but here's a better curl example: `curl -s -o ./wg0.conf 'https://wirehub.org/wirehub/n/hub-network/device/1/download?invite_
by rudasn 3y ago
I can't edit my previous comment but here's a better curl example:
`curl -s -o ./wg0.conf 'https://wirehub.org/wirehub/n/hub-network/device/1/download?invite_code=t8UAJ7WalMme-uNZHT5KVotfU_e1P2He8m3bm3VEfOV6E8gQFqB1Mdi3Z-yUfyxdzrHZiqIMLWvxABY9yfzBig https://wirehub.org/wirehub/n/hub-network/device/1/download?...'`
This pulls the config and stores it in `wg0.conf`. The [Interface] section though is invalid (as there's no private key). So you'd have to either generate the keys on the server or somehow get them there. From then on it's just standard wg-quick and wg to create the interface and load your keys.
After the cron job, you'd want to do something like `wg syncconf wg0 <(wg-quick strip wg0)` so that wireguard picks up any changes from the pulled config.