[PR #15] [MERGED] Add tunnel max age configuration and cleanup logic #15

Closed
opened 2026-03-04 01:38:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuanngocptn/nport/pull/15
Author: @tuanngocptn
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @tuanngocptn

Base: mainHead: fix/set_timeout_on_server


📝 Commits (2)

  • 5b05168 Add tunnel max age configuration and cleanup logic
  • 7b58ba5 Release v1.1.1 - Add configurable tunnel max age and enhance cleanup logic

📊 Changes

6 files changed (+234 additions, -8 deletions)

View changed files

📝 server/CHANGELOG.md (+38 -0)
📝 server/package-lock.json (+2 -2)
📝 server/package.json (+1 -1)
📝 server/src/index.ts (+61 -3)
📝 server/test/index.spec.ts (+129 -2)
📝 server/wrangler.jsonc (+3 -0)

📄 Description

  • Introduced a new environment variable TUNNEL_MAX_AGE_HOURS to configure the maximum age for healthy tunnels before cleanup.
  • Implemented functions to retrieve the tunnel max age in milliseconds and check if a tunnel has expired based on its creation time.
  • Updated the scheduled cleanup job to include logic for cleaning up healthy tunnels that exceed the configured max age.
  • Added unit tests for the new functionality, ensuring correct behavior for various edge cases regarding tunnel expiration.

🔄 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/tuanngocptn/nport/pull/15 **Author:** [@tuanngocptn](https://github.com/tuanngocptn) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@tuanngocptn](https://github.com/tuanngocptn) **Base:** `main` ← **Head:** `fix/set_timeout_on_server` --- ### 📝 Commits (2) - [`5b05168`](https://github.com/tuanngocptn/nport/commit/5b0516873518ff6c5097969df21730a882433489) Add tunnel max age configuration and cleanup logic - [`7b58ba5`](https://github.com/tuanngocptn/nport/commit/7b58ba52051cfd577c83a792def685f1ec35b7f3) Release v1.1.1 - Add configurable tunnel max age and enhance cleanup logic ### 📊 Changes **6 files changed** (+234 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `server/CHANGELOG.md` (+38 -0) 📝 `server/package-lock.json` (+2 -2) 📝 `server/package.json` (+1 -1) 📝 `server/src/index.ts` (+61 -3) 📝 `server/test/index.spec.ts` (+129 -2) 📝 `server/wrangler.jsonc` (+3 -0) </details> ### 📄 Description - Introduced a new environment variable `TUNNEL_MAX_AGE_HOURS` to configure the maximum age for healthy tunnels before cleanup. - Implemented functions to retrieve the tunnel max age in milliseconds and check if a tunnel has expired based on its creation time. - Updated the scheduled cleanup job to include logic for cleaning up healthy tunnels that exceed the configured max age. - Added unit tests for the new functionality, ensuring correct behavior for various edge cases regarding tunnel expiration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:38:08 +03: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
starred/nport#15
No description provided.