Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Netlink connector to WireGuard

Project description


Python netlink connector to WireGuard

A simple control interface for WireGuard via Netlink, written in Python.

from wgnlpy import WireGuard

interface = "wg0"
peer = b'...'

wg = WireGuard()

wg.set_peer(interface, peer,
assert peer in wg.get_interface(interface).peers

wg.remove_peers(interface, peer)
assert peer not in wg.get_interface(interface).peers


Also useful: the sockaddr_in and sockaddr_in6 utility classes for sockaddr manipulation.

License: MIT

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wgnlpy, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size wgnlpy-0.1.4.tar.gz (8.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page