AsyncServer
Bases: AsyncBaseRoute
A class for managing the Outline VPN server's settings and configurations asynchronously.
Provides methods to interact with and configure server-level settings such as renaming the server, changing the hostname, adjusting port settings, and setting or removing data transfer limits.
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. Default is False. |
False
|
Source code in outline_vpn_api_client/async_client.py
58 59 60 61 62 63 64 65 66 67 68 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 | |
change_default_port_for_new_keys(port)
async
Changes the default port for newly created access keys.
The specified port can be one 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
|
True if the default port was successfully changed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
change_hostname(hostname)
async
Changes the hostname for access keys.
Updates the hostname or IP address used for access keys on the Outline VPN server. If a hostname is provided, 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
|
True if the hostname was successfully changed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
get_information()
async
Returns information about the server.
Returns:
| Type | Description |
|---|---|
Server
|
models.Server: Server configuration and state. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
remove_server_default_limits()
async
Removes the access key data limit, lifting data transfer restrictions on all access keys.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the data transfer limit was successfully removed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
rename(name)
async
Renames the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The new name for the server. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the server was successfully renamed. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
set_server_default_limits(limit)
async
Sets a data transfer limit for all access keys.
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
|
True if the default data transfer limit was successfully set. |
Raises:
| Type | Description |
|---|---|
ResponseNotOkException
|
If the server response indicates an error (status code >= 300). |
Source code in outline_vpn_api_client/async_client.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |