Library for working with wireguard configs.
Project description
neowg
ВАЖНО, БИБЛИОТЕКА РАБОТАЕТ ТОЛЬКО СО СВОИМ ФОРМАТОМ КОНФИГОВ
Установка
pip install neowg
Примеры использования:
Создание нового конфига
from neowg import WgServerConfig
config = WgServerConfig.new(
server_ip="<YOUR_WG_SERVER_IP>",
net_adapter="<YOUR_WG_SERVER_NET_ADAPTER>",
clients_count=100,
) # Создание объекта конфига
config.dump("wg.conf") # Запись конфига в файл
Чтение конфига из файла.
from neowg import WgServerConfig
config = WgServerConfig.from_file("wg.conf") # Создание объекта конфига
Изменения пары ключей
from neowg import WgServerConfig
config = WgServerConfig.from_file("wg.conf") # Создание объекта конфига
config.update_keys("10.0.0.2")
config.dump("wg.conf")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neowg-1.4.0.tar.gz
(5.4 kB
view details)
Built Distribution
neowg-1.4.0-py3-none-any.whl
(7.4 kB
view details)
File details
Details for the file neowg-1.4.0.tar.gz
.
File metadata
- Download URL: neowg-1.4.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afe4c1fb65f957f16eb3994bedbefe2e7165cea1bdaee3aeaac1aff9633892b7 |
|
MD5 | 6263d8510e1d5abcf662747ae1b52858 |
|
BLAKE2b-256 | 31164342ba71b6bcb432c94d454fde64100806c6f470e9a1b352067abf3a4150 |
File details
Details for the file neowg-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: neowg-1.4.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b012a1b1ea24c0272d1bb34f675081f128611baab375f1869e51fbb866f4a1 |
|
MD5 | 5121c1e07efa20031ec7800eebb55932 |
|
BLAKE2b-256 | 91304d5816b1c19c01d8f82dd0cad357cb141406cbd53121222baf8678053db8 |