Metadata-Version: 2.1
Name: pywintun-pmd3
Version: 0.0.4
Summary: wintun (WireGuard) wrapper for Python
Home-page: https://github.com/dsotsin/wintun
Author: zq2024
Author-email: dsotsen@gmail.com
Maintainer: zq2024
Maintainer-email: dsotsen@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: C
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Requires: click
Requires: pyuac
License-File: COPYING

`Wintun <https://github.com/WireGuard/wintun/tree/0.14.1>`__ wrapper for Python 3
=================================================================================

Example
=======

.. code:: python

   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()


