Update README for proxy UI changes
This commit is contained in:
43
README.md
43
README.md
@ -12,12 +12,15 @@ This README is written for working in a GitHub Codespace.
|
||||
|
||||
Each "noodle" is a TCP forwarding rule with:
|
||||
|
||||
- a name
|
||||
- an allowed source (`All` or a specific source IP)
|
||||
- a listen port
|
||||
- a destination host
|
||||
- a destination port
|
||||
- an expiration duration
|
||||
- an up/down state
|
||||
|
||||
When the app starts, it loads saved noodles from the local database and starts any active proxy routes. It also serves a basic web UI for listing and deleting them.
|
||||
When the app starts, it loads saved noodles from the local database and starts any active proxy routes. It also serves a web UI for creating, pausing, resuming, and deleting them.
|
||||
|
||||
## Current State
|
||||
|
||||
@ -25,13 +28,17 @@ The project is functional enough to:
|
||||
|
||||
- start the web app
|
||||
- load stored proxy definitions from `./infinite.db`
|
||||
- create new noodles from the UI
|
||||
- run active TCP proxies
|
||||
- restrict a proxy to a specific source IP
|
||||
- update expiration values in the database every second while a proxy is active
|
||||
- close and delete expired noodles automatically
|
||||
- pause a noodle from the UI without decrementing its expiration
|
||||
- delete existing noodles from the UI
|
||||
|
||||
What is not wired up yet:
|
||||
Current limitations:
|
||||
|
||||
- the add row in the UI is present, but create/save is not implemented
|
||||
- there is no REST API for creating noodles
|
||||
- there is no REST API; management is currently through the server-rendered UI
|
||||
- proxy routing is TCP only in the current code path
|
||||
|
||||
## Running In A Codespace
|
||||
@ -65,6 +72,24 @@ Available flags:
|
||||
- `-data`: path to the Bitcask database directory
|
||||
- `-test`: seeds the database with sample noodles on startup
|
||||
|
||||
## UI Behavior
|
||||
|
||||
The main table includes an add row for creating a proxy with:
|
||||
|
||||
- `Name`
|
||||
- `Allow From`: accepts `All` or a specific IP address, with the current client IP suggested
|
||||
- `Listen Port`
|
||||
- `Destination Port`
|
||||
- `Destination Host`
|
||||
- `Expiration`: parsed as a Go `time.Duration` such as `30s`, `5m`, or `1h15m`
|
||||
|
||||
The `Status` column is a checkbox:
|
||||
|
||||
- checked: the proxy is active and the expiration counts down
|
||||
- unchecked: the proxy is closed and the expiration is paused
|
||||
|
||||
The expiration value is shown as a live countdown in the browser. When it reaches zero, the row is removed from the UI and the noodle is deleted from the database.
|
||||
|
||||
## Codespaces Port Notes
|
||||
|
||||
In Codespaces, you will usually need to forward:
|
||||
@ -85,11 +110,9 @@ Typical flow:
|
||||
|
||||
1. Run the app with `go run ./cmd/infinite-noodle`
|
||||
2. Start the test echo server on `127.0.0.1:6666`
|
||||
3. Ensure the database contains a noodle that listens on `5555` and forwards to `127.0.0.1:6666`
|
||||
3. Add a noodle in the UI that listens on `5555` and forwards to `127.0.0.1:6666`
|
||||
4. Run the test client, which connects to `127.0.0.1:5555`
|
||||
|
||||
Because create is not implemented in the UI yet, you currently need to seed or insert noodle records another way.
|
||||
|
||||
## Building Binaries
|
||||
|
||||
The repo includes [`build.sh`](/data/project/go/src/infinite-noodle/build.sh), which builds binaries for:
|
||||
@ -108,6 +131,12 @@ sh build.sh
|
||||
|
||||
Artifacts are written under `./target/`.
|
||||
|
||||
To build only the Linux amd64 target:
|
||||
|
||||
```bash
|
||||
GOOS=linux GOARCH=amd64 go build -buildvcs=false -o target/infinite-noodle.net-proxy ./cmd/infinite-noodle
|
||||
```
|
||||
|
||||
## Important Files
|
||||
|
||||
- [`cmd/infinite-noodle/main.go`](/data/project/go/src/infinite-noodle/cmd/infinite-noodle/main.go): binary entrypoint and CLI flags
|
||||
|
||||
Reference in New Issue
Block a user