Skip to content

KOLANICH-libs/BoringTun.py

Repository files navigation

BoringTUN.py Unlicensed work

wheel (GitLab) wheel (GHA via nightly.link) GitLab Build Status GitLab Coverage GitHub Actions Libraries.io Status Code style: antiflash

We have moved to https://codeberg.org/KOLANICH-libs/BoringTUN.py, grab new versions there.

Under the disguise of "better security" Micro$oft-owned GitHub has discriminated users of 1FA passwords while having commercial interest in success and wide adoption of FIDO 1FA specifications and Windows Hello implementation which it promotes as a replacement for passwords. It will result in dire consequencies and is competely inacceptable, read why.

If you don't want to participate in harming yourself, it is recommended to follow the lead and migrate somewhere away of GitHub and Micro$oft. Here is the list of alternatives and rationales to do it. If they delete the discussion, there are certain well-known places where you can get a copy of it. Read why you should also leave GitHub.


Python bindings to BoringTUN using ctypes. You need a prebuilt shared library.

Since ctypes.py contains docstrings from boringtun library for everyones' convenience, it is copyrighted by CloudFlare. The rest of files are under Unlicense.

While the library functionality is much richer, most of it is not exposed as API available to C.

The exposed stuff:

  • Noise protocol
  • key generation.

Not currently exposed stuff you will have to reimplement yourself:

  • Parsing of config toml files.
  • Stuff related to the following config entries:
    • Interface.ListenPort
    • Peer.AllowedIPs
    • Peer.Endpoint

Tutorial is available as ./tutorial.ipynbNBViewer .