This release is a pre-release and may not be stable for production use.
get-local-address
A simple utility to determine the local IP address that would be used to communicate with a specified remote UDP server.
Description
This program creates a UDP socket, connects it to a target server (default: Cloudflare's DNS at 1.1.1.1:53), and then retrieves the local IP address that would be used for this connection. This is particularly useful for systems with multiple network interfaces to determine which interface would be used to reach a specific destination.
Features
- Configurable target address and port
- Lightweight, dependency-free
- Cross-platform
Installation
pip install get-local-address
After installation, run it as get_local_address.
Usage
get_local_address [-a ADDRESS] [-p PORT] [-h]
Options
| Option | Description |
|---|---|
-a, --address ADDRESS |
Target server address (default: 1.1.1.1) |
-p, --port PORT |
Target server port (default: 53) |
-h, --help |
Show help message |
Output
The program outputs the local IP address that would be used to communicate with the specified server, e.g.:
192.168.1.5
Limitations
- Only supports IPv4 addresses
- Requires network connectivity to the target server (though no actual packets are sent)
- May not work correctly with some firewall configurations
License
MIT License
Metadata
Release files for get-local-address 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| get_local_address-0.1.0a1.tar.gz | 3.2 kB | Without provenance | Details for get_local_address-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| get_local_address-0.1.0a1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for get_local_address-0.1.0a1-py2.py3-none-any.whl |
Total release size: 7.0 kB
Release files / get_local_address-0.1.0a1.tar.gz
| Download URL | get_local_address-0.1.0a1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
367d797edf01dbd1941f453ce96a7df1a02d66cbd9e96645098bb6f51749888b
|
|
BLAKE2b-256 checksum How to use checksums |
fc809c94b69b13e1621f92b4500e9a8a2e09272308bdea4d94bfa5bad9fdaa5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / get_local_address-0.1.0a1-py2.py3-none-any.whl
| Download URL | get_local_address-0.1.0a1-py2.py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5bfd057dac553eb105d9bc76a78c2499d6c10a7047a5a08310fc1b2044a8e790
|
|
BLAKE2b-256 checksum How to use checksums |
728f3e8b13e6a7a108af0e3cf0bddd83d0a1a52fbdc7dcc0483fcb04054e41aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for get-local-address 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.