Skip to main content

wintun (WireGuard) wrapper for Python

Project description

Wintun wrapper for Python 3

Example

import pywintunx_pmd3

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

pywintunx_pmd3.set_logger(log)
pywintunx_pmd3.install_wetest_driver()

tun_dev = pywintunx_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

pywintunx_pmd3-1.0.2-cp313-cp313-win_amd64.whl (271.0 kB view details)

Uploaded CPython 3.13 Windows x86-64

pywintunx_pmd3-1.0.2-cp312-cp312-win_amd64.whl (271.0 kB view details)

Uploaded CPython 3.12 Windows x86-64

pywintunx_pmd3-1.0.2-cp311-cp311-win_amd64.whl (270.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

pywintunx_pmd3-1.0.2-cp310-cp310-win_amd64.whl (275.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

pywintunx_pmd3-1.0.2-cp39-cp39-win_amd64.whl (275.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

pywintunx_pmd3-1.0.2-cp38-cp38-win_amd64.whl (275.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

pywintunx_pmd3-1.0.2-cp37-cp37m-win_amd64.whl (275.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

File details

Details for the file pywintunx_pmd3-1.0.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ef7b8cd8d8e77372c4eb11baf79f5387e0594adf2395db4ac3dfd933e71903a5
MD5 850df44a33f3f39a56ee752763396428
BLAKE2b-256 8f3b5f94c0cbc29dda0544b3ef060d8bf90cd746f0db548ad83f57bb8f40f449

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 91ba176d400a7db1fb2f753e5e53821e378742f4bdfe1ecc9f81149f669fcfcb
MD5 fb3ba810959a6c701a82bf1548e36510
BLAKE2b-256 d07fde3579a298deb3ab3a5dd246a9085f9ce2f2cb6c43ac022aa85509cdbe64

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9e30e3175f4574a70d63c0d945c307ee78e5df1598f01dda31335614a2460e35
MD5 6c0fdcbaf83492df87fabe7ebb28d354
BLAKE2b-256 f1bcc02aea283ca1bdf97130a8cf52d0bdb8e26505c1cc367ae08f39d033d09a

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7ef12c6d3f37f7584a7cb3a80772ca3b6d8395f0a0ef28b88252816b15d347a9
MD5 1829ee32f1a82b32a7abd6ffe529c648
BLAKE2b-256 1497415e4d9a00b300273cc2c8d9abc85171c8c6b1f5c637208622db6c4ce964

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b0337a953a94c4a0722985a7fc589aa38ddbf683242fc171f8f469479da7f799
MD5 c47db9914a0d3a69915f9e45cf6dec7b
BLAKE2b-256 3767334f710259c0e7d22c372dc69e101abdca5390e72691bf86fffb23d115eb

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0e739ac00f43991c750c0174b7c659b5bff7ba8d4c58b6c318856b821a927e5e
MD5 fa9c3de9e50d9b5aba2814a08086318c
BLAKE2b-256 a65cbf8b680fa643037c708c88a5064b29a85b6d705264e8600c5576d3cbac6f

See more details on using hashes here.

File details

Details for the file pywintunx_pmd3-1.0.2-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pywintunx_pmd3-1.0.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0e46e3a2b0e71b386121db22f2acfa4b82df4fb1a193beaea775c1b1a1f5529b
MD5 f5d502b01772853f81abcbe8614ad6f5
BLAKE2b-256 176d373b061395cd47c6146dc723b6fdd986ae08e2aba88e6e3520e4c0737a65

See more details on using hashes here.

Supported by

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