14a3e7c Optimize lock usage in proxy connection handling
📊 Changes
1 file changed (+24 additions, -21 deletions)
View changed files
📝proxy/proxy.go (+24 -21)
📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Change activeTunnel.conns from slice to map for O(1) add/remove
Improve lock scoping in UpdateLocalSNIs: use read lock for diff computation, minimize write lock hold time
Move cache invalidation outside lock (go-cache is thread-safe)
How to test?
Internal proxy usage.
🔄 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/fosrl/gerbil/pull/64
**Author:** [@LaurenceJJones](https://github.com/LaurenceJJones)
**Created:** 3/13/2026
**Status:** 🔄 Open
**Base:** `dev` ← **Head:** `proxy-lock-perf-improvements`
---
### 📝 Commits (1)
- [`14a3e7c`](https://github.com/fosrl/gerbil/commit/14a3e7c5318bdd4cd34a9d813119fc1058654187) Optimize lock usage in proxy connection handling
### 📊 Changes
**1 file changed** (+24 additions, -21 deletions)
<details>
<summary>View changed files</summary>
📝 `proxy/proxy.go` (+24 -21)
</details>
### 📄 Description
## Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
## Description
- Change activeTunnel.conns from slice to map for O(1) add/remove
- Improve lock scoping in UpdateLocalSNIs: use read lock for diff computation, minimize write lock hold time
- Move cache invalidation outside lock (go-cache is thread-safe)
## How to test?
Internal proxy usage.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/gerbil/pull/64
Author: @LaurenceJJones
Created: 3/13/2026
Status: 🔄 Open
Base:
dev← Head:proxy-lock-perf-improvements📝 Commits (1)
14a3e7cOptimize lock usage in proxy connection handling📊 Changes
1 file changed (+24 additions, -21 deletions)
View changed files
📝
proxy/proxy.go(+24 -21)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
How to test?
Internal proxy usage.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.