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.3.0.tar.gz
(5.2 kB
view details)
Built Distribution
neowg-1.3.0-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file neowg-1.3.0.tar.gz
.
File metadata
- Download URL: neowg-1.3.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 | df594bd0df4da4c958b93b0fb4e2fd00be336f001481cc7623b03fba29dead24 |
|
MD5 | c4746d5144816a76f05dbb1a45857820 |
|
BLAKE2b-256 | 3788a25239e34113ad6cb0dff085e118ffef9a664d05d5b73cd020280a2e76ae |
File details
Details for the file neowg-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: neowg-1.3.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 | b90d14321b184e7c0413be4ea4c1d2638b726cd4d87d7b0e66f7ea9a493a1386 |
|
MD5 | 21545907d7697d6914a67162d0fab637 |
|
BLAKE2b-256 | 259be0d9a3fa77227bbef771988f453c7ecdd387a64511f634174415de761da6 |