wireguard-ui
wireguard-ui copied to clipboard
Apply Config command line
Hello!
Is it possible to trigger the command "Apply Config" over the command line?
Thank you!
Apply the config in the webui once while having your browsers dev console open (network tab)
and search for 'apply config' after pressing it. Once found, right click, copy curl and you have your curl command to automate everything.
curl 'http://127.0.0.1:5000/api/apply-wg-config' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' -H 'Origin: http://127.0.0.1:5000' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: http://127.0.0.1:5000/wg-server' -H 'Cookie: session=token =; session_token=token' -H 'Content-Length: 0'