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.2.0.tar.gz
(5.2 kB
view details)
Built Distribution
neowg-1.2.0-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file neowg-1.2.0.tar.gz
.
File metadata
- Download URL: neowg-1.2.0.tar.gz
- Upload date:
- Size: 5.2 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 | e69bce93794dceafd703e9e67104fbddd9705fbc5bf296b24d0a03cd4ac38e00 |
|
MD5 | 4ec40e16499acb3dd5636b0548ba07b0 |
|
BLAKE2b-256 | 27bbe80ed798bc63f23538d77b502620953b9acdab0471d465594687bb777e94 |
File details
Details for the file neowg-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: neowg-1.2.0-py3-none-any.whl
- Upload date:
- Size: 7.2 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 | 36f903346f47d733c75e93ed7d1bd8f61fa2c00b4887a8e856fe1a2e08b2c00c |
|
MD5 | 989bb05eda030a4a587107f3be025cab |
|
BLAKE2b-256 | 7768bc791e82890e2a8847a5379f78e5b5b2eeff42ff87c532c9e0a7f05a5df6 |