Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ explain user-visible changes in plain language instead of only mirroring PR titl

Older release history remains available in GitHub Releases.

## [0.1.7] - 2026-05-16

`0.1.7` 主要完成了控制面的出站化收口:节点现在推荐只保留业务 80/443 端口,控制通讯改为由 `rginx-agent` 主动连向控制中心;同时,本地运维命令、远程状态/快照/指令链路、文档和发布准备都已经同步到这一模型。

### 新增

- 新增出站 agent 控制面路径,节点主动向控制中心建立 HTTPS / WebSocket 通讯,不再需要额外的节点控制端口、控制域名或节点侧控制证书。
- 新增本地 `agent status`、`agent disable`、`agent enable` 运维命令,与现有的 `status`、`snapshot`、`delta`、`wait`、`traffic`、`upstreams`、`cache`、`system` 等命令形成统一的节点操作面。
- 新增控制中心与节点之间的结构化命令、结果与快照轨道,覆盖注册、心跳、轮询、结果回报以及日常运维动作的传输语义。

### 更新与改进

- 继续收口 legacy `control_plane` 兼容路径,并把 README、OpenAPI、发布说明和计划文档同步到 outbound agent 模式。
- 继续拆分大文件和测试模块,让 modularization gate 保持无 warning,也让后续版本维护、回归定位和代码阅读更轻。
- release prep、packaging 和版本号文档同步到 `0.1.7`,发布前检查链路现在能直接对齐当前 workspace 版本。

### 问题修复

- 修复 agent、control plane、CLI、snapshot 和路由视图上的若干回归,让状态导出和本地控制语义保持一致。
- 修复 release prep 所需的 changelog、release notes 和 workspace version 一致性问题,避免发布时再出现版本漂移。

## New

- Added the outbound-agent control plane path so nodes connect to the control center directly and keep only business 80/443 ports open.
- Added local `agent status`, `agent disable`, and `agent enable` commands alongside the existing `status`, `snapshot`, `delta`, `wait`, `traffic`, `upstreams`, `cache`, and `system` commands.
- Added structured command, result, and snapshot flows between the control center and nodes for registration, heartbeat, polling, result reporting, and everyday operational actions.

## Update & Improvement

- Continued narrowing the legacy `control_plane` compatibility path and synced the README, OpenAPI, release notes, and planning docs to the outbound-agent model.
- Continued splitting large files and test modules so the modularization gate stays warning-free and future releases remain easier to maintain.
- Synced release-prep, packaging, and version-reference docs to `0.1.7`.

## Bug Fixes

- Fixed several agent, control-plane, CLI, snapshot, and routing-view regressions so state export and local control semantics stay aligned.
- Fixed the consistency between changelog, release notes, and workspace version required by release prep.

## [0.1.6] - 2026-05-13

`0.1.6` 主要把边缘控制面、结构化配置变更和静态文件主路径一起收口到“可发布、可观测、可持续迭代”的状态。一方面,节点现在同时具备本地 admin socket 和远程 HTTPS control plane 两套对齐的观测/控制入口;另一方面,static file、runtime state 和 release baseline 也继续补齐,方便后续继续往多节点编排和性能迭代推进。
Expand Down
48 changes: 40 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ default-members = ["crates/rginx-app"]
resolver = "2"

[workspace.package]
version = "0.1.6"
version = "0.1.7"
edition = "2024"
authors = ["vansour"]
license = "MIT OR Apache-2.0"
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`rginx` 是一个面向 Linux 的 Rust 边缘反向代理单二进制项目。

当前版本:`0.1.6`
当前版本:`0.1.7`

## 能力概览

Expand All @@ -18,7 +18,8 @@
- gRPC、grpc-web、trailers、`grpc-timeout`
- 压缩、限流、CIDR allow/deny、`trusted_proxies`、`client_ip_header`
- 热重载、优雅重启、平滑退出
- 本地只读运维命令:`check`、`status`、`snapshot`、`snapshot-version`、`delta`、`wait`、`counters`、`traffic`、`peers`、`upstreams`
- 出站 agent 控制面:节点主动连接控制中心,不需要额外节点控制端口、控制域名或节点侧控制证书
- 本地运维命令:`check`、`status`、`agent status`、`agent disable`、`agent enable`、`snapshot`、`snapshot-version`、`delta`、`wait`、`counters`、`traffic`、`peers`、`upstreams`

## 平台与交付

Expand Down Expand Up @@ -75,6 +76,12 @@ TLS 证书、局部 `upstreams` 和 `locations`。不要把网站配置重新内
写法如 `"X-Foo": "bar"` 仍然有效,动态值需使用 RON enum 写法如
`"X-Real-IP": ClientIp` 或 `"Origin": Template("https://{host}")`。

控制面推荐使用 `agent` 出站模式,而不是让每个节点暴露旧的
`control_plane.listen` 管理端口。迁移后,节点只需要监听自己网站的
80/443 等业务端口;控制中心通过节点主动发起的 HTTPS/WebSocket 连接下发命令。
保留旧 `control_plane` 配置仅用于兼容窗口,`rginx check` 会在详细输出中提示
是否仍在打开额外节点控制端口。

静态文件能力当前已经可以直接承载常见站点、文档站和下载站主路径,稳定支持:

- `root` / `alias` / `index`
Expand Down Expand Up @@ -146,6 +153,9 @@ rginx -t
rginx -s reload
rginx check
rginx status
rginx agent status
rginx agent disable
rginx agent enable
rginx snapshot --include status --include traffic
rginx snapshot-version
rginx delta --since-version <version> --include status
Expand Down
10 changes: 6 additions & 4 deletions configs/control-plane-mtls.example.ron
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Example configuration for mTLS client certificate authentication
// This enables mutual TLS authentication for the control plane
// Legacy example for mTLS client certificate authentication on the node-side
// control-plane server. New deployments should prefer `agent` outbound control
// so nodes do not open an extra control port or maintain a control-plane server
// certificate.

Config(
control_plane: Some(ControlPlane(
control_plane: Some(ControlPlaneConfig(
enabled: Some(true),
listen: Some("0.0.0.0:9443"),

tls: Some(ControlPlaneTls(
tls: Some(ControlPlaneTlsConfig(
// Server certificate and key
cert_path: "/etc/rginx/control-plane.crt",
key_path: "/etc/rginx/control-plane.key",
Expand Down
6 changes: 4 additions & 2 deletions crates/rginx-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ rginx-core = { path = "../rginx-core" }
bytes.workspace = true
futures-util = "0.3"
hex = "0.4"
hmac = "0.13"
http.workspace = true
http-body-util.workspace = true
hyper.workspace = true
hyper-rustls.workspace = true
hyper-util.workspace = true
ipnet.workspace = true
libc.workspace = true
Expand All @@ -32,13 +34,13 @@ sha2.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["io-util", "net", "time", "fs"] }
tokio-rustls.workspace = true
tokio-tungstenite = "0.29"
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-native-roots"] }
tracing.workspace = true
tungstenite = "0.29"
prometheus = "0.14"
lazy_static = "1.5"
uuid.workspace = true

[dev-dependencies]
hyper-rustls.workspace = true
rcgen = "0.14"
tempfile = "3.27"
Loading
Loading