[UNTESTED] [hiruko-puppetmaster/termux-proxy-rotator] 2 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,182 characters
Status: [UNTESTED]
Endpoints found:
http://127.0.0.1:9090/v1/chat/completions
http://127.0.0.1:8080/v1/models`
Source: https://github.com/hiruko-puppetmaster/termux-proxy-rotator
# Termux Proxy Rotator
A small, dependency-free local proxy for OpenAI-compatible APIs. It runs on
Android inside Termux, listens on loopback, and rotates between a pool of
API keys, upstream providers, and local gateways such as opencode2api.
**New to the tool? Read the [detailed usage guide](docs/USAGE.md).**
```
AI client -> 127.0.0.1:9090 -> priority/cooldown pool -> upstream provider
|-- key/endpoint A (429) -> cooling down
`-- key/endpoint B (200) -> streamed back
```
## One-command OpenCode setup (Termux)
If OpenCode is already installed, paste this into Termux:
```bash
curl -fsSL https://raw.githubusercontent.com/hiruko-puppetmaster/termux-proxy-rotator/main/install-opencode.sh | bash
```
The installer:
1. installs `golang` and `git` with `pkg` when they are missing,
2. clones or updates this repository under `~/.local/share/termux-proxy-rotator`,
3. builds `proxy-rotator` and the `opencode-apply` config helper,
4. detects the opencode2api gateway (`~/opencode2api/config.json`) and the
OpenCode Zen key (`~/.local/share/opencode/auth.json`),
5. writes the runtime config and keys to `~/.config/opencode/rotator`,
6. starts the proxy in the background with `nohup`,
7. registers `providers.rotator` in `~/.config/opencode/opencode.jsonc` and
sets the default model to `rotator/deepseek-v4.1-flash-free` when available.
The JSONC editor preserves comments and unrelated settings, and the installer
is idempotent: rerunning it updates the proxy and keeps an existing
`opencode.jsonc.bak` from the first run.
If no local upstream is detected, the installer asks for a base URL and API
key. For unattended installs, provide them yourself:
```bash
curl -fsSL https://raw.githubusercontent.com/hiruko-puppetmaster/termux-proxy-rotator/main/install-opencode.sh |
ROTATOR_UPSTREAM_URL='https://api.example.com/v1' \
ROTATOR_UPSTREAM_KEY='sk-...' bash
```
Common options (run `bash install-opencode.sh --h