Resolve postal addresses into proxy account connection details.
Project description
Address To Proxy
Address To Proxy resolves a free-form postal address into proxy connection details for supported proxy platforms.
First version scope:
- CLI entrypoint:
address-to-proxy resolve. - LLM-assisted address parsing through a configured OpenAI-compatible endpoint.
- LLM-assisted platform dictionary matching when direct country/state matching fails.
- 1024proxy country/state/city dictionary lookup.
- 1024proxy username generation.
- Configurable proxy location validation through
ipinfo.io/json.
Usage
Install dependencies:
./install.sh
Create your local config once:
cp config.example.yaml config.yaml
Edit config.yaml and set the required environment variables:
export ADDRESS_TO_PROXY_LLM_API_KEY="..."
export ADDRESS_TO_PROXY_1024_TOKEN="..."
export ADDRESS_TO_PROXY_1024_PASSWORD="..."
Run:
./run.py 123 Example St,Example City,North Carolina,28214, US
Use from Python after installing the package in your venv:
from address_to_proxy import resolve_address
result = resolve_address(
"123 Example St,Example City,North Carolina,28214, US",
config_path="config.yaml",
)
print(result.proxy_host)
print(result.username)
print(result.password)
If you installed the package entrypoint, this command is equivalent:
address-to-proxy resolve 123 Example St,Example City,North Carolina,28214, US
By default, the CLI reads config.yaml from the current working directory. Use --config path/to/config.yaml only when you want to load a different file.
It also selects the first supported proxy platform found in platforms; use --platform 1024proxy only when you want to override that selection.
Output defaults to JSON. Other formats are available:
./run.py 123 Example St,Example City,North Carolina,28214, US --output text
./run.py 123 Example St,Example City,North Carolina,28214, US --output curl
text prints proxy_host, username, password, and validated as simple key/value lines. curl prints a ready-to-run curl -x ... -U ... https://ipinfo.io/json command.
Configuration
Start from config.example.yaml and provide secrets through environment variables.
export ADDRESS_TO_PROXY_LLM_API_KEY="..."
export ADDRESS_TO_PROXY_1024_TOKEN="..."
export ADDRESS_TO_PROXY_1024_PASSWORD="..."
The 1024proxy token is used only for platform dictionary API calls. The account ID and password are used only for connecting to the generated proxy.
Address parsing runs through the configured LLM first. If the parsed country or state does not directly match the selected platform dictionary, the tool asks the same LLM to choose from the platform-supported candidates and then validates that choice locally before generating the proxy username.
Development
For normal local use, run the installer:
./install.sh
It creates .venv, upgrades pip, and installs this project in editable mode.
For manual setup:
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
Run the test suite:
.venv/bin/python -m pytest -q
Verify the CLI entrypoint:
.venv/bin/address-to-proxy --help
.venv/bin/address-to-proxy resolve --help
Create a local runtime config:
cp config.example.yaml config.yaml
Then edit config.yaml for non-secret values such as llm.base_url, llm.model, platforms.1024proxy.account_id, platforms.1024proxy.proxy_host, platforms.1024proxy.ttl_minutes, and validation.*. Keep secrets in environment variables:
export ADDRESS_TO_PROXY_LLM_API_KEY="your-llm-api-key"
export ADDRESS_TO_PROXY_1024_TOKEN="your-1024proxy-api-token"
export ADDRESS_TO_PROXY_1024_PASSWORD="your-fake-fake-proxy-password"
Run a real resolve request:
.venv/bin/address-to-proxy resolve \
123 Example St,Example City,North Carolina,28214, US
Equivalent direct-script command:
.venv/bin/python run.py \
123 Example St,Example City,North Carolina,28214, US
To use a config file outside the current directory:
.venv/bin/address-to-proxy resolve \
123 Example St,Example City,North Carolina,28214, US \
--config path/to/config.yaml \
--platform 1024proxy
For development without making a real proxy validation request, set:
validation:
mode: "off"
max_retries: 1
distance_km: 100
Use strict when you want the tool to verify that ipinfo.io/json returns the same country, state, and city requested in the generated proxy username.
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 address_to_proxy-0.1.0.tar.gz.
File metadata
- Download URL: address_to_proxy-0.1.0.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5704d2dafd230df84f49b6626f86a0a27d95c932357ed003f46da3dd1496cd0d
|
|
| MD5 |
c3f85f51db0aec341b481302f032206d
|
|
| BLAKE2b-256 |
5138ae1c61537d66fd4132822c913348a7b3a31003ce14a51d84887e35774f6f
|
File details
Details for the file address_to_proxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: address_to_proxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e76fdbcb5b3b5a48f10a3a935758a095b1f45a631398a67af6eb8641c601de62
|
|
| MD5 |
b247b44443374a442416fd8dfdabbc7c
|
|
| BLAKE2b-256 |
1f31f69837e42a98e85374582ffe6f11fc66035e39a555e1ae0e7738624961c8
|