https://github.com/neothebestdeveloper/neowg
Библиотека для работы с wireguard конфигами
https://github.com/neothebestdeveloper/neowg
Last synced: about 1 year ago
JSON representation
Библиотека для работы с wireguard конфигами
- Host: GitHub
- URL: https://github.com/neothebestdeveloper/neowg
- Owner: NeoTheBestDeveloper
- License: other
- Created: 2024-10-22T05:00:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-23T12:50:02.000Z (over 1 year ago)
- Last Synced: 2024-11-23T13:35:05.578Z (over 1 year ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neowg
# ВАЖНО, БИБЛИОТЕКА РАБОТАЕТ ТОЛЬКО СО СВОИМ ФОРМАТОМ КОНФИГОВ
## Установка
```shell
pip install neowg
```
## Примеры использования:
### Создание нового конфига
```python
from neowg import WgServerConfig
config = WgServerConfig.new(
server_ip="",
net_adapter="",
clients_count=100,
) # Создание объекта конфига
config.dump("wg.conf") # Запись конфига в файл
```
### Чтение конфига из файла.
```python
from neowg import WgServerConfig
config = WgServerConfig.from_file("wg.conf") # Создание объекта конфига
```
### Изменения пары ключей
```python
from neowg import WgServerConfig
config = WgServerConfig.from_file("wg.conf") # Создание объекта конфига
config.update_keys("10.0.0.2")
config.dump("wg.conf")
```