Fix#4690
- Require `SRS_HTTP_API_AUTH_TYPE` when SRS HTTP API authentication is
enabled.
- Add Bearer token authentication for the SRS HTTP API while preserving
Basic authentication.
- Add Bearer authentication for proxy origin registration with
`PROXY_HTTP_API_AUTH_*`.
- Allow SRS heartbeat requests to authenticate to the proxy with
`SRS_HEARTBEAT_AUTH_*`.
- Add unit tests, an end-to-end Bearer authentication test,
documentation, and separate Basic/Bearer sample configurations.
---------
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Fixes#4647. Add `PROXY_ORIGIN_SERVER_TTL` so operators can tune how
long an origin registration remains healthy instead of relying on the
fixed 300-second lifetime. The default remains `300s`, preserving
existing behavior.
---------
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
This PR refines how SRS knowledge, documentation, code navigation, and
verification guidance are organized for AI maintainers.
- Introduce internal SRS skills for documentation and code-map routing.
- Move shared code maps and project knowledge out of the legacy
`memory/` structure.
- Bundle trusted C++ and Go proxy documentation with the documentation
skill.
- Route development and support workflows through the smallest relevant
references.
- Centralize Git workflow and AI attribution guidance in the development
skill.
- Remove obsolete memory and documentation symlinks from individual
AI-agent workspaces.
- Update the documentation synchronization script for the new bundled
layout.
- Document SRS 8.0, community support, and the findings for issue #4681.
- Add optional Redis key namespaces for isolating proxy clusters sharing
a Redis database.
The previous structure distributed knowledge across workspace memory,
documentation directories, and individual AI-agent configuration.
The new structure makes SRS knowledge portable and discoverable through
reusable skills. AI agents can first route a task to the correct code
map or documentation reference, then load only the relevant material
instead of broadly searching the repository.
This provides a clearer separation between:
- User support and development workflows.
- Documentation and source-code navigation.
- Server implementation maps and verification guidance.
- Shared project knowledge and agent-specific workspace memory.
---------
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
- **Refactor `internal/env` for testability.** Route every
`os`/filesystem
call in `env.go` through swappable package-level function variables
(`getEnv`, `setEnv`, `lookupEnv`, `openFile`). Split `parseEnvFile` into
a
thin file-opening wrapper plus a pure `parseEnvReader(io.Reader)` so the
parser can be tested directly without touching disk.
- **Hermetic tests, 96.9% coverage.** Rewrite `internal/env/env_test.go`
to
install in-memory fakes via `withFakeEnv` / `withFakeOpen` helpers that
swap the package vars and restore them on `t.Cleanup`. Tests no longer
mutate real process env or write temp `.env` files, removing a source of
flakiness under parallel test execution. New cases cover
`NewEnvironment`,
`setEnvDefault`, `loadEnvFile` error paths, and edge cases in the
parser.
- **Counterfeiter-based fake generation.** Add `counterfeiter` as a Go
tool
dependency, a `//go:generate` directive for the `Environment` interface
(`internal/env/gen.go`), and commit the generated
`internal/env/envfakes/fake_environment.go` so downstream packages can
test against a spec-faithful fake instead of hand-rolling stubs. Expose
the step as `make generate`.
- **Tooling.** `scripts/proxy-utest.sh` gains a `--coverage` / `-c` flag
that runs `go test -coverprofile=...` across `./cmd/...` and
`./internal/...` and prints per-function coverage via `go tool cover
-func`. The `srs-develop` skill doc is updated to include the
regenerate-fakes step and the new coverage flag.
- **Go version.** Bump `go.mod` to Go 1.25 (required for the `go tool`
directive used to pin the counterfeiter CLI as a tool dep).
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
- Move build output from `./srs-proxy` to `bin/srs-proxy` following Go
project conventions, updating Makefile, .gitignore, and all
documentation references
- Replace third-party `godotenv` dependency with a custom `.env` parser
that supports comments, `export` prefix, quoted values, escape
sequences, and inline comments — with full unit tests
- Remove `ignore-worklog.md` and update `README.md` with skill-based AI
prompts
- Bump copyright year from 2025 to 2026 across all source files
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reorganize the SRS (Simple Realtime Server) repository to
follow a conventional Go project structure, setting the stage for a
progressive transition from a C++ project to a Go project. The proxy,
which was once contained within its own `proxy/` subdirectory, will now
be converted into the initial Go module located at the root of the
repository, serving as a template for subsequent Go modules.
- **Go module at repo root:** `go.mod` moved to repo root, module
renamed from `proxy` to `srsx`. The repo is now a proper Go project with
`cmd/` and `internal/` at the top level.
- **Elevation of Proxy Code:** Move the proxy code from
`proxy/cmd/proxy-go/` to `cmd/proxy/`, and from `proxy/internal/` to
`internal/`. The proxy serves as the inaugural application; subsequent
modules (for instance, `cmd/origin`) will mimic this arrangement.
- **Documentation Restructured:** Transfer the documentation from
`proxy/docs/` to `docs/proxy/`, revise the main README to endorse
OpenClaw as the preferred AI tool, and update `proxy/README.md` to point
to the new documentation locations.
- **Build and config:** `Makefile` moved to root, `PROXY_STATIC_FILES`
default path corrected for the new layout, `.gitignore` consolidated.
- **Cleanup:** removed standalone `proxy/LICENSE` (repo-level license
applies), all internal imports updated to `srsx/internal/...`.
- **OpenClaw workspace:** added community bot info, git workflow
conventions, and support group behavior guidance.
This restructuring was performed by OpenClaw orchestrating Claude Code
and Codex via ACP.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>