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.1.tar.gz
(5.4 kB
view details)
Built Distribution
neowg-1.4.1-py3-none-any.whl
(7.4 kB
view details)
File details
Details for the file neowg-1.4.1.tar.gz
.
File metadata
- Download URL: neowg-1.4.1.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 | f2b44c9469bded1f8d9ab6cf2a59fb9f2c456359b307fdfa8dda66063e8e4f86 |
|
MD5 | 9a2829e686f69d414df6b7523ff94a8d |
|
BLAKE2b-256 | 5d3570b427181fed589f97fef07720ea14ffe907785d84236dc9a34d42a72a20 |
File details
Details for the file neowg-1.4.1-py3-none-any.whl
.
File metadata
- Download URL: neowg-1.4.1-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 | 9bbb6965cc0b1af7f3fc0c0b4beb2a398fe5f6a6e22aa763da906ed0d49e0a57 |
|
MD5 | ba8017406e3ef5aa7ac0e8ca60dec1a1 |
|
BLAKE2b-256 | de9f54657f6a080f1dea85063abc17252ff5b2635188b2129ec96c80113ecf5c |