From b56b4933254ca9d40a28896b46b8f7eed8c7309a Mon Sep 17 00:00:00 2001 From: kingecg Date: Tue, 20 Jan 2026 00:30:32 +0800 Subject: [PATCH] =?UTF-8?q?```=20docs(AGENTS.md):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A6=82=E8=BF=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加了多站点主机路由支持说明 - 补充了TCP/WebSocket代理类型信息 - 增加了QuickJS动态配置引擎描述 - 完善了静态文件服务MIME类型检测功能说明 - 新增负载均衡算法支持信息(轮询、最少连接、权重轮询、IP哈希、随机) - 添加连接池和健康检查功能描述 - 扩展了三层中间件系统(全局、站点、路由级别)说明 ``` --- AGENTS.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 44d2439..0fdf1ac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,10 +5,13 @@ This file provides essential information for agentic coding agents working on th ## Project Overview rhttpd is a high-performance, configurable HTTP server written in Rust that supports: -- Multi-site hosting on a single port -- Multiple proxy types (reverse, forward, TCP) -- JavaScript dynamic configuration -- Static file serving with MIME type detection +- Multi-site hosting on a single port with host-based routing +- Multiple proxy types (reverse, forward, TCP/WebSocket) +- JavaScript dynamic configuration via QuickJS (rquickjs) +- Static file serving with automatic MIME type detection +- Load balancing with 5 algorithms (round_robin, least_connections, weighted_round_robin, ip_hash, random) +- Connection pooling and health checking +- Three-tier middleware system (global, site, route level) ## Build, Test, and Development Commands @@ -51,6 +54,11 @@ cargo doc --open cargo clean ``` +### Test Structure +- **Unit tests**: 3 tests in `src/config/tests.rs` (config serialization, default config, route pattern matching) +- **Integration tests**: 6 tests in `tests/integration_tests.rs` (static files, config loading, connection pool, load balancer, TCP proxy, TCP proxy stats) +- **Current status**: All tests pass (3 unit + 6 integration = 9 total) + ## Code Style Guidelines ### General Rust Conventions