Skip to main content

wintun (WireGuard) wrapper for Python

Project description

Wintun wrapper for Python 3

Example

import pywintun_pmd3

def log(level: int, timestamp: Int64, message: str):
  pass

pywintun_pmd3.set_logger(log)
pywintun_pmd3.install_wetest_driver()

tun_dev = pywintun_pmd3.TunTapDevice()
# Avaliable constructor include
# or TunTapDevice(name='XX')
# or TunTapDevice(name='XX', type='xxx')
# or TunTapDevice(name='XX', type='xxx', guid='xxxs')
# or TunTapDevice(name='XX', type='xxx', proto_aware=True)
# tundev.name, readonly property
tundev.ring_capacity = 8*1024*1024
tun_dev.mtu4 = 1460             # set ipv4 subinterface mtu
tun_dev.mtu = 1452              # set ipv6 subinterface mtu
tundev.addr4 = '10.2.3.4'       # set ipv4 subinterface address
tundev.addr = 'ffee:aadf:8877:2'# set ipv6 subinterface mtu
tundev.up()

packet = tundev.read() # receive a packet
tundev.wait_read_event()

tundev.write(b'\x00') # send a packet..

tundev.down()

...
tundev.close()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pywintun_pmd3-0.0.4-cp313-cp313-win_amd64.whl (270.9 kB view details)

Uploaded CPython 3.13Windows x86-64

pywintun_pmd3-0.0.4-cp312-cp312-win_amd64.whl (270.9 kB view details)

Uploaded CPython 3.12Windows x86-64

pywintun_pmd3-0.0.4-cp311-cp311-win_amd64.whl (270.9 kB view details)

Uploaded CPython 3.11Windows x86-64

pywintun_pmd3-0.0.4-cp310-cp310-win_amd64.whl (275.4 kB view details)

Uploaded CPython 3.10Windows x86-64

pywintun_pmd3-0.0.4-cp39-cp39-win_amd64.whl (275.4 kB view details)

Uploaded CPython 3.9Windows x86-64

pywintun_pmd3-0.0.4-cp38-cp38-win_amd64.whl (275.4 kB view details)

Uploaded CPython 3.8Windows x86-64

pywintun_pmd3-0.0.4-cp37-cp37m-win_amd64.whl (275.4 kB view details)

Uploaded CPython 3.7mWindows x86-64

File details

Details for the file pywintun_pmd3-0.0.4-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 485b9ca6caa5338b5f1d05564d656fea8b2f741badf54e23563edf2f3cc2f894
MD5 c5885ac0b0844acfeb8a59dfe9bad4bd
BLAKE2b-256 11d9d9ec34da76801ef8e28acbc523a89a284c754012951917a568f83908531e

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 55fc1869ed94918172c2954814dbea91986907f213f3919a99b219288214c0f3
MD5 43fc4d316d88af3d95ff647d6e1ebc34
BLAKE2b-256 80af89ee0abd311fe37415dce188444267ba0c6e6b0a7b7d449b582533f2c261

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7a3b8c5349ded557636bacc06de31fc5570db9b8aeb7f10070cb191ebee27d11
MD5 978c6999ee0f062d88f1eafca9c4e5ba
BLAKE2b-256 11a1296b34a5a7ef18d5eb1342e7c762420f9c930d485ad7e97dfae5663841f4

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4fec0852891e5298e6505c5391b094ee364d4c095751e034059a68a45d09f24a
MD5 47796f38b90278801aa5af947f5f4e15
BLAKE2b-256 82cba10f44cb01408b7961c1f16fb01d4b3a1f84f11d86e2b06fe43022680713

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6a2a0a58b87d1f5b1c66adbaf10f5467252894b601e194bb4117517c19b98f6e
MD5 d4443229e0a5095c961c397ba3567f25
BLAKE2b-256 df515ca6d07ba60ccd77b40d1737e1f9825ed490baea24f1572e22c9c45431af

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5dd389cc0dc19d1950967621ff8c7ffab9aa6aadfc5938b03d9549b1f3c6b0e0
MD5 f3ce9fc16235f80ed1b364e7a29b5276
BLAKE2b-256 b480f02f9829fee987fe447996cc04748ed06d805912cd86bfa09ef3828eef2a

See more details on using hashes here.

File details

Details for the file pywintun_pmd3-0.0.4-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pywintun_pmd3-0.0.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4dfb0bc61f01b6e21e17392442de62dc5298560c3ec73b6a88976f55a26bc73c
MD5 c6476f186c6de7b800873a29df1e09e4
BLAKE2b-256 fa6c2cdf259749049deef715038996ffddfa54be915d30820a70d4227435796a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page