Giter Site home page Giter Site logo

pyreguard's Introduction

PyreGuard - A wireguard library that uses PyRoute2 or userspace

Userspace tools such as wireguard-go and boringtun use the Wireguard cross-platform userspace implemenation as a control mechanism.

Software that uses pyroute2's WireGuard class cannot use these, because it only supports netlink (kernelspace) interfaces provided by the wireguard kernel module. This makes sense, as pyroute2 interacts with iproute2 and netlink a lot.

However, there's still a valid mixed use-case, where applications still need to use pyroute2 to control routing and other network activities, but against the tun interface of the userland wireguard.

This library, a work in progress, seeks to provide that capability, by replicating the WireGuard interface from pyroute2 and translating it to/from the userspace messaging protocol. It also allows dual-space usage, where both userspace and kernelspace interfaces might exist.

Installation

To install, use pip:

pip install .

Usage

Use it just like pyroute2's wireguard, except instead of:

from pyroute2 import WireGuard

do

from pyreguard import WireGuard

License

As this work is inteded to work with pyroute2, this software has been licensed using the same dual-license approach, of GPLv2 and Apache v2.

Authors

Copyright © 2021 - Steve Kerrison, github:@stevekerrison

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.