phoneproxy
phoneproxy is a Windows ADB + hotspot routing tool available as both:
- an importable Python package for other programs, and
- a CLI wrapper for manual operation.
Requirements
- Windows 10/11
- Run in an elevated PowerShell/cmd window (Administrator), or have a reachable
sudopipeserver (sudopipe pingsucceeds) - ADB available via
ADB_PATHor defaultC:\Program Files\platform-tools\adb.exe - USB debugging enabled and device authorized
- Phone hotspot already ON before startup
Configuration
Create .env from .env.example:
ADB_PATH=
LAN_ADAPTER_NAME=
HOTSPOT_SSID=
ADB_DEVICE_SERIAL=
SUDOPIPE_PATH=
TWINE_USERNAME=__token__
TWINE_PASSWORD=
TWINE_TEST_PASSWORD=
Notes:
LAN_ADAPTER_NAMEfallback defaults to이더넷, thenEthernet.HOTSPOT_SSIDis optional. If empty, SSID is detected fromadb shell dumpsys tethering.SUDOPIPE_PATHis optional. If empty,phoneproxyresolvessudopipefromPATH.- Windows must already have a saved Wi-Fi profile matching the hotspot SSID.
- For non-elevated runs,
phoneproxycheckssudopipe pingand uses SudoPipe for privileged route cmdlets when available.
Install (package)
pip install .
Library Usage
from phoneproxy import PhoneProxySession, runtime_config_from_env
config = runtime_config_from_env(verbose=True)
session = PhoneProxySession(config)
state = session.start() # non-interactive start, returns immediately
session.reset_ip() # callable at any time
session.disable_proxy() # after start(): LTE/data OFF, restore LAN default route
session.enable_proxy() # after start(): LTE/data ON, remove LAN default route
session.stop() # idempotent, restores LAN routes
CLI Usage
With local wrapper (existing workflow):
.\run_phoneproxy.bat
Direct CLI after install:
phoneproxy run # interactive q/r/d/e mode
phoneproxy run --headless # no q/r, Ctrl+C to stop
phoneproxy start # alias of headless run
phoneproxy reset-ip
Publish Workflow
Use the hf-storage-style publishing script:
.\publish.bat testpypi
.\publish.bat pypi
publish.bat will:
- read
TWINE_USERNAME,TWINE_PASSWORD,TWINE_TEST_PASSWORDfrom.env(unless already set in shell), - run unit tests,
- build wheel/sdist,
- run
twine check, - upload to TestPyPI or PyPI.
Metadata
Release files for phoneproxy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| phoneproxy-0.1.1.tar.gz | 14.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phoneproxy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / phoneproxy-0.1.1.tar.gz
| Download URL | phoneproxy-0.1.1.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf66c1fff58250c0b7ef7a907168c3128c06e6c701bfc373978ed3603e0a475d
|
|
BLAKE2b-256 checksum How to use checksums |
bc4786a7ba9d1c23e99edabd5d30300f3925ca61bb17ae6ed9738648ca9beea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / phoneproxy-0.1.1-py3-none-any.whl
| Download URL | phoneproxy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e448e8123634978d66c457496b9b9fb272bdf1e87d4afd325ba96e744c69006b
|
|
BLAKE2b-256 checksum How to use checksums |
57f4e1a86fe2eda427c07eeaedb8fe3666ec51a96fb869304290ba4a9564a5c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|