Initialize WireGuard server
POST
/network/wireguard/server
const url = 'https://sylve.lan:8181/api/network/wireguard/server';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"addresses":["example"],"allowWireGuardPort":true,"masqueradeIPv4Interface":"example","masqueradeIPv6Interface":"example","mtu":1,"port":1,"privateKey":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/network/wireguard/server \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "addresses": [ "example" ], "allowWireGuardPort": true, "masqueradeIPv4Interface": "example", "masqueradeIPv6Interface": "example", "mtu": 1, "port": 1, "privateKey": "example" }'Create and start the singleton WireGuard server
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”WireGuard Server Request
Media typeapplication/json
object
addresses
Array<string>
allowWireGuardPort
boolean
masqueradeIPv4Interface
string
masqueradeIPv6Interface
string
mtu
integer
port
required
integer
privateKey
string
Examplegenerated
{ "addresses": [ "example" ], "allowWireGuardPort": true, "masqueradeIPv4Interface": "example", "masqueradeIPv6Interface": "example", "mtu": 1, "port": 1, "privateKey": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Payload Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}