@ktvdung1606/tproxy
v0.1.25
Published
npm wrapper for the tproxy AI gateway binary — includes system tray and auto-start
Maintainers
Readme
@ktvdung1606/tproxy
npm CLI wrapper for the tproxy AI gateway.
Install
npm install -g @ktvdung1606/tproxyThe package includes native gateway binaries for macOS (Apple Silicon and Intel), Linux (x64 and ARM64), and Windows (x64 and ARM64). Node.js 18 or newer is required.
First login
On the first gateway start, the local dashboard password is initialized to
123123 and stored as a salted verifier. Change it immediately in Settings.
For any dashboard access outside loopback, configure a strong
TPROXY_MANAGEMENT_SECRET instead.
Automated releases
Pushing a version tag such as v0.1.15 runs the GitHub Actions release workflow.
It verifies that the tag matches package.json, cross-compiles the bundled
binaries, and publishes to npm. Add an npm granular token with publish access as
the repository Actions secret named NPM_TOKEN before creating the tag.
Usage
# Foreground gateway
tproxy --config ~/.tproxy/config.yaml
# System tray (menu bar / notification area) — like 9Router
tproxy --tray
# or
tproxy trayTray menu
| Item | Action |
|------|--------|
| TProxy (Port …) | Status (read-only) |
| Open Dashboard | Opens http://127.0.0.1:<port>/dashboard/ |
| Enable Auto-start / ✓ Auto-start Enabled | Toggle launch at login |
| Quit | Stop gateway and exit |
Auto-start at login
tproxy autostart enable # LaunchAgent / Startup / XDG autostart
tproxy autostart disable
tproxy autostart statusYou can also toggle auto-start from the tray menu. On enable, the OS starts:
node <path-to-tproxy.js> --tray- macOS:
~/Library/LaunchAgents/com.tproxy.autostart.plist - Windows: Startup folder
tproxy.vbs - Linux:
~/.config/autostart/tproxy.desktop
Logs (macOS autostart): ~/.tproxy/logs/.
Notes
- The launcher runs its bundled binary, so it does not depend on a separately
installed
tproxyexecutable or Go toolchain. - To override the bundled binary for development, set
TPROXY_BINARYto an absolute path you trust. - First tray run on macOS/Linux may install
systray2into~/.tproxy/runtime/(one-time). - Windows tray uses PowerShell
NotifyIcon(no native binary). - Default config is created at
~/.tproxy/config.yamlif missing. - On first launch,
TPROXY_MASTER_KEYandTPROXY_MANAGEMENT_SECRETare generated automatically and stored in~/.tproxy/.env(mode0600). Real environment variables take precedence over this file. Back it up — the master key protects stored provider credentials, and losing it makes them undecryptable.
