wireguard
Описание
Библиотека для работы с wireguard
Installation
python3 -m pip install wireguard-lib
Пример использования:
Сгенерируем конфиг сервера.
Для этого нужен приватный ключ.
Воспользуемся консолью Python для получения приватного ключа:
>>> from wireguard import Wireguard
>>> Wireguard().get_private_key
'sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc='
Используя полученый ключ сгенерируем конфиг сервера:
from wireguard import Wireguard
wg = Wireguard(
server_private_key = 'sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc=',
server_addres='wireguard.example.org',
server_ip='10.10.10.1',
server_port=51821,
)
server_config = wg.get_config_server
print(server_config)
Получим следующий конфиг:
[Interface]
PrivateKey = sBd8jkAY9Ht7wn+q5iGbW4MfShgjdxB1s3oTJsttaHc=
Address = 10.10.10.1
ListenPort = 51821
License
Metadata
Release files for wireguard-lib 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wireguard-lib-0.1.10.tar.gz | 5.1 kB | Without provenance | Details for wireguard-lib-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wireguard_lib-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for wireguard_lib-0.1.10-py3-none-any.whl |
Total release size: 11.4 kB
Release files / wireguard-lib-0.1.10.tar.gz
| Download URL | wireguard-lib-0.1.10.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fa02f8c854fba0ea04c476553b23f937a4b4ede58046b662e59e7a713af69dc
|
|
BLAKE2b-256 checksum How to use checksums |
9ffd295902c6e0c95e65e2dbacdbac287a5878be54ee74212cea97274c7c6591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / wireguard_lib-0.1.10-py3-none-any.whl
| Download URL | wireguard_lib-0.1.10-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89e80d3fcb36816f0515c1c28f26e9a6954c47567db41bb374078626252718d5
|
|
BLAKE2b-256 checksum How to use checksums |
4eddc04d4cdcb3dcd4e68171d2657e078f6b63d610f29e35c6bedc4dd6691d2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for wireguard-lib 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.