Commit Graph

40 Commits

Author SHA1 Message Date
root 3e046fc80e fix(gost): restore single-node bypass and preserve FailFilter backoff
Address reviewer feedback from PR #14 fix:

1. Single-node case: Bypass selector/FailFilter to ensure availability.
   This matches upstream go-gost/x behavior - single nodes should always
   be attempted regardless of recent failures.

2. Multi-node case: Preserve FailFilter's backoff contract. When all nodes
   are marked as failed, return nil to signal 'no healthy nodes' rather
   than falling back to a known-bad node. This prevents hammering unhealthy
   nodes and respects the failTimeout window.

The handler's retry loop with ExcludeNodes context handles the multi-node
failover properly - this change ensures hop.Select() provides correct
information about node health status.

Fixes intermittent forwarding failures introduced by #14.
2026-02-04 07:46:40 +00:00
root 0273bc6921 docs: add AGENTS.md for go-gost/x/registry 2026-02-04 06:36:03 +00:00
root a98057d06a fix(gost): implement failover for multi-node forwarding rules (#12)
When a forwarding rule has multiple backend nodes configured, the first
node failure would cause the entire forward to fail instead of trying
the next available node.

Root causes fixed:
- FailFilter skipped filtering when only 1 node remained
- hop.Select() bypassed selector for single-node hops
- Handlers only attempted one node before giving up

Changes:
- selector/filter.go: Remove len<=1 early return, always filter failed nodes
- hop/hop.go: Remove single-node bypass, add ExcludeNodes context support
- ctx/value.go: Add ContextWithExcludeNodes/ExcludeNodesFromContext helpers
- handler/forward/local: Add maxRetries config, implement retry loop
- handler/forward/remote: Add maxRetries config, implement retry loop
- forwarder/sniffer.go: Add retry logic to dial() and dialTLS()

Closes #12
2026-02-04 04:12:38 +00:00
root 2c2262b55d 完善分层 AGENTS.md,便于快速定位代码 2026-02-02 07:41:27 +00:00
qaq 31290137fe 优化gost执行诊断时计入DNS解析时间的问题 2025-11-21 16:27:58 +08:00
qaq 4a23f3b45a 优化gost执行诊断时计入DNS解析时间的问题 2025-11-21 16:24:45 +08:00
qaq 43aebdf8f4 修复agent时携带错误的屏蔽协议数据,编辑转发时无法使用原分配端口 2025-11-20 13:51:48 +08:00
qaq 65ca18d649 2.0版本测试 2025-11-19 14:28:45 +08:00
qaq d6feb17b86 添加屏蔽协议到面板,免去手动操作 2025-10-31 15:58:49 +08:00
qaq b587193e74 修复屏蔽协议引发的udp不通问题 2025-10-30 16:15:04 +08:00
qaq 50e7ff0f36 随机构造自签证书信息,修复屏蔽协议引发的udp问题 2025-10-09 14:55:05 +08:00
qaq 2f4f1c9a1d 修复协议屏蔽 2025-08-18 11:30:03 +08:00
qaq 51e4f590f5 增加协议屏蔽支持 2025-08-17 21:45:48 +08:00
qaq a046365763 增加协议屏蔽支持 2025-08-17 21:05:29 +08:00
qaq 6dfe55a9f0 增加日志输出 2025-08-15 20:26:31 +08:00
qaq 3d20d633fe 增加日志输出 2025-08-15 20:18:56 +08:00
qaq d6685447b3 修复无法及时暂停的bug 2025-08-09 21:27:00 +08:00
qaq d675effd58 修复bug 2025-08-08 19:52:53 +08:00
qaq f35e6e95f5 变更流量计费方法 2025-08-01 16:25:16 +08:00
qaq 971f45eb42 修复v6tcpping问题 2025-07-22 20:40:58 +08:00
qaq de4da12f42 增加流量不重置功能,ping改为tcpping 2025-07-22 10:30:16 +08:00
qaq e313a1953c 去除代理头支持, 增加节点面板通信加密 增加导出sql 2025-07-11 16:24:12 +08:00
qaq 286962ff33 修复 2025-07-10 17:16:52 +08:00
qaq 94e01ae63b 优化流程 2025-07-02 15:40:14 +08:00
qaq af53f98426 增加出口负载均衡 2025-07-01 15:13:47 +08:00
qaq 34b943d673 添加强制断开链接 2025-06-30 16:07:59 +08:00
qaq 2321a7cb8b 添加强制断开链接 2025-06-30 14:45:21 +08:00
qaq fd6b5ddcdd 修复暂停bug 2025-06-28 23:24:07 +08:00
qaq 34f5015369 修复添加用户后引起的编辑错误 2025-06-28 22:42:20 +08:00
qaq a5d7be8405 修复流量统计 2025-06-27 11:56:59 +08:00
qaq 3cb5eafe29 test 2025-06-26 16:18:05 +08:00
qaq de695e4d77 修复bug 2025-06-26 15:48:20 +08:00
qaq 8972f6d9fc 优化ui 添加诊断功能 2025-06-26 14:12:31 +08:00
qaq f7e82cdc8b gost通讯改为ws 2025-06-25 10:49:06 +08:00
qaq f3e9b31ed3 流量统计 2025-06-23 19:07:53 +08:00
qaq 52d9d18371 修复ui 添加gost静默http服务 2025-06-20 11:14:28 +08:00
qaq 6df61832b9 修复流量统计 2025-06-18 14:41:25 +08:00
qaq c3077b2922 修复流量统计问题 2025-06-18 13:47:11 +08:00
qaq a52faa96a8 修复v6 添加隧道类型选择 2025-06-18 12:33:27 +08:00
qaq 9fa968d07c init 2025-06-17 12:17:33 +08:00