[PR #5360] [MERGED] fix(sub): set read/write/idle timeouts on the subscription server #5858

Closed
opened 2026-11-02 04:04:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5360
Author: @n0ctal
Created: 6/15/2026
Status: ✅ Merged
Merged: 6/19/2026
Merged by: @MHSanaei

Base: main ← Head: pr-0012-sub-server-timeouts


📝 Commits (1)

  • f2fab8b fix(sub): set read/write/idle timeouts on the subscription server

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 internal/sub/sub.go (+7 -0)

📄 Description

Summary

Sets read/write/idle timeouts on the public subscription HTTP server.

Why

The subscription server is the most exposed (public) listener and was created with no timeouts, leaving it open to slow-header / Slowloris exhaustion. The panel server already sets these.

Scope

  • adds ReadHeaderTimeout / ReadTimeout / WriteTimeout / IdleTimeout
  • values mirror the panel server in internal/web/web.go
  • no behavior change for normal clients

Validation

  • go build / go vet clean
  • values match the already-shipped panel server configuration

Risk

Low. Conservative timeouts mirroring an already-shipped server on the same codebase.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5360 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 6/15/2026 **Status:** ✅ Merged **Merged:** 6/19/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `pr-0012-sub-server-timeouts` --- ### 📝 Commits (1) - [`f2fab8b`](https://github.com/MHSanaei/3x-ui/commit/f2fab8b8b862d94fcba71dc0c0abccb823b43dcb) fix(sub): set read/write/idle timeouts on the subscription server ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/sub/sub.go` (+7 -0) </details> ### 📄 Description ## Summary Sets read/write/idle timeouts on the public subscription HTTP server. ## Why The subscription server is the most exposed (public) listener and was created with no timeouts, leaving it open to slow-header / Slowloris exhaustion. The panel server already sets these. ## Scope - adds `ReadHeaderTimeout` / `ReadTimeout` / `WriteTimeout` / `IdleTimeout` - values mirror the panel server in `internal/web/web.go` - no behavior change for normal clients ## Validation - `go build` / `go vet` clean - values match the already-shipped panel server configuration ## Risk Low. Conservative timeouts mirroring an already-shipped server on the same codebase. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5858
No description provided.