Asynchronous STUN client for Python with UDP, TCP and TLS support
Project description
Async STUN client for Python
Key Features
- Support RFC3489
- Transports UDP, TCP and TLS
- IPv4 and IPv6 support
- Support RFC5389
- Support RFC5780
- Support RFC8489
Installation
This module can be installed from pypi website
pip install aiostun
Getting your mapped address
import aiostun
import asyncio
async def main():
async with aiostun.Client(host='openrelay.metered.ca', port=443, ipproto=aiostun.TLS) as stunc:
mapped_addr = await stunc.get_mapped_address()
print(mapped_addr)
{'family': 'IPv4', 'port': 38778, 'ip': 'xx.xx.xx.xx'}
asyncio.run(main())
Default constants for family:
aiostun.IP4(default)aiostun.IP6
Default constants for IP protocol:
aiostun.UDP(default)aiostun.TCPaiostun.TLS
The default remote port is 3478 with a timeout connection of 2 seconds.
For developers
Running all test units.
python3 -m unittest discover tests/ -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiostun-0.6.1.tar.gz.
File metadata
- Download URL: aiostun-0.6.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9481f588dd5fd5dec870b32f536ae031690af6b4f0b9d0e9c3cbf12e5a81ccf8
|
|
| MD5 |
77916d4a9bffbe68df27651927b09174
|
|
| BLAKE2b-256 |
f80120692b33ebee4efd0f036b2dc6e9abb249fc88810cb31eec3cbd304ec045
|
Provenance
The following attestation bundles were made for aiostun-0.6.1.tar.gz:
Publisher:
publish.yml on dmachard/python-aiostun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiostun-0.6.1.tar.gz -
Subject digest:
9481f588dd5fd5dec870b32f536ae031690af6b4f0b9d0e9c3cbf12e5a81ccf8 - Sigstore transparency entry: 804370736
- Sigstore integration time:
-
Permalink:
dmachard/python-aiostun@4cea0d63383f8be7adc8ade72f4af0cfd006d5ee -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/dmachard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4cea0d63383f8be7adc8ade72f4af0cfd006d5ee -
Trigger Event:
release
-
Statement type:
File details
Details for the file aiostun-0.6.1-py3-none-any.whl.
File metadata
- Download URL: aiostun-0.6.1-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23bc5b8dd369a09550e36e546b41919ea06e9f3fc444dfe2784f8cf865f137df
|
|
| MD5 |
ee9d0a19680ca91e742594e8951267b8
|
|
| BLAKE2b-256 |
6a4b5de88828a87da49083fd2298cfd98571a8ca0a32e79d500a0bde279ad286
|
Provenance
The following attestation bundles were made for aiostun-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on dmachard/python-aiostun
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiostun-0.6.1-py3-none-any.whl -
Subject digest:
23bc5b8dd369a09550e36e546b41919ea06e9f3fc444dfe2784f8cf865f137df - Sigstore transparency entry: 804370739
- Sigstore integration time:
-
Permalink:
dmachard/python-aiostun@4cea0d63383f8be7adc8ade72f4af0cfd006d5ee -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/dmachard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4cea0d63383f8be7adc8ade72f4af0cfd006d5ee -
Trigger Event:
release
-
Statement type: