That’s static, cabled in the wireguard config file…
Another way to achieve the same result (can’t say what’s better) is to call the same method the web interface would use (just fill in group_id & peer_id as per your config):

curl -H 'glinet: 1' -s -k http://127.0.0.1/rpc -d "{\"jsonrpc\":\"2.0\",\"method\":\"call\",\"params\":[\"\",\"wg-client\",\"start\",{\"group_id\":xxx,\"peer_id\":xxx}],\"id\":1}"```
1 Like