Server
Bases: BaseRoute
A class for managing the Outline VPN server's settings and configurations.
This class provides methods to interact with and configure various server-level settings for the Outline VPN server. It allows you to perform tasks like renaming the server, changing the hostname, adjusting port settings, and setting or removing data transfer limits for the server.
Attributes:
| Name | Type | Description |
|---|---|---|
base_url |
str
|
The base URL for the metrics endpoint of the Outline server. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
management_url
|
str
|
The management URL used to communicate with the Outline server API. |
required |
ssl_verify
|
bool
|
Flag to enable or disable SSL certificate verification for API requests. Default is |
False
|
Source code in outline_vpn_api_client/client.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
change_default_port_for_new_keys(port)
Changes the default port for newly created access keys.
This method updates the default port that will be used for new access keys. The specified port can be one that is already in use by other access keys.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
int
|
The new default port to be used for newly created access keys. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
change_hostname(hostname)
Changes the hostname for access keys.
This method updates the hostname or IP address used for access keys on the Outline VPN server. If a hostname is provided, it must be valid and DNS must be configured independently of this API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hostname
|
str
|
The new hostname or IP address to use for access keys. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
get_information()
Returns information about the server.
This method retrieves detailed information about the Outline VPN server, such as its status, configuration, and other relevant details.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Server
|
A dictionary containing the server information. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
remove_server_default_limits()
Removes the access key data limit, lifting data transfer restrictions on all access keys.
This method removes the data transfer limit for all access keys, effectively lifting any restrictions on data usage for the keys.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
rename(name)
Renames the server.
This method changes the name of the Outline VPN server to the specified name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The new name for the server. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
set_server_default_limits(limit)
Sets a data transfer limit for all access keys.
This method sets a default data transfer limit that will apply to all access keys on the server. The specified limit is in bytes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
int
|
The data transfer limit in bytes to set for all access keys. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/client.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |