Commit Graph

66 Commits

Author SHA1 Message Date
abd103b5ab fix(port): add atomic ClaimPort() to prevent race condition
All checks were successful
Docker Build and Push / build-and-push-tags (push) Successful in 3m23s
Docker Build and Push / build-and-push-branches (push) Has been skipped
- Replace GetPortStatus/SetPortStatus calls with atomic ClaimPort() operation.
- Fixed a logic error when handling headless tunneling.
2026-01-12 18:25:35 +07:00
560c98b869 refactor: consolidate error handling with fail() function in session handlers
All checks were successful
Docker Build and Push / build-and-push-tags (push) Successful in 3m21s
Docker Build and Push / build-and-push-branches (push) Has been skipped
- Replace repetitive error handling code with fail() function in HandleGlobalRequest
- Standardize error response pattern across all handler methods
- Improve code maintainability and reduce duplication
2026-01-12 14:42:42 +07:00
e1f5d73e03 feat: add headless mode support for SSH -N connections
All checks were successful
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Successful in 3m3s
- use s.lifecycle.GetConnection().Wait() to block until SSH connection closes
- Prevent premature session closure in headless mode

In headless mode (ssh -N), there's no channel interaction to block on,
so the session would immediately return and close. Now blocking on
conn.Wait() keeps the session alive until the client disconnects.
2026-01-11 15:21:11 +07:00
6b4127f0ef feat: add authenticated user info and restructure handleConnection
All checks were successful
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Successful in 3m21s
- Display authenticated username in welcome page information box
- Refactor handleConnection function for better structure and clarity
2026-01-07 23:07:02 +07:00
6213ff8a30 feat: implement forwarder session termination
All checks were successful
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Successful in 3m36s
2026-01-06 18:32:48 +07:00
4ffaec9d9a refactor: inject SessionRegistry interface instead of individual functions
All checks were successful
Docker Build and Push / build-and-push-branches (push) Has been skipped
Docker Build and Push / build-and-push-tags (push) Successful in 4m16s
2026-01-05 16:49:17 +07:00
8cc70fa45e feat(session): use session key for registry 2026-01-05 00:50:42 +07:00
30e84ac3b7 feat: implement get sessions by user 2026-01-02 22:58:54 +07:00
fd6ffc2500 feat(grpc): integrate slug edit handling 2026-01-02 18:27:48 +07:00
e1cd4ed981 WIP: gRPC integration, initial implementation 2026-01-01 21:03:17 +07:00
b115369913 fix: wait for both goroutines before cleanup in HandleConnection
All checks were successful
renovate / renovate (push) Successful in 1m42s
Docker Build and Push / build-and-push-branches (push) Successful in 4m46s
Docker Build and Push / build-and-push-tags (push) Successful in 4m51s
Only waited for one of two copy goroutines, leaking the second. Now waits
for both to complete before closing connections.

Fixes file descriptor leak causing 'too many open files' under load.

Fixes: #56
2025-12-31 22:22:51 +07:00
9276430fae refactor(session): add registry to manage SSH sessions
All checks were successful
renovate / renovate (push) Successful in 36s
Docker Build and Push / build-and-push-branches (push) Successful in 4m41s
Docker Build and Push / build-and-push-tags (push) Successful in 4m38s
- Implement thread-safe session registry with sync.RWMutex
- Add Registry interface for session management operations
- Support Get, Register, Update, and Remove session operations
- Enable dynamic slug updates for existing sessions
- Fix Connection closed by remote because HandleTCPIPForward run on a goroutine
2025-12-31 18:33:47 +07:00
f8a6f0bafe refactor(session): add registry to manage SSH sessions
All checks were successful
renovate / renovate (push) Successful in 39s
Docker Build and Push / build-and-push-branches (push) Successful in 4m27s
Docker Build and Push / build-and-push-tags (push) Successful in 4m22s
- Implement thread-safe session registry with sync.RWMutex
- Add Registry interface for session management operations
- Support Get, Register, Update, and Remove session operations
- Enable dynamic slug updates for existing sessions
2025-12-31 17:47:35 +07:00
acd02aadd3 refactor: restructure project architecture
All checks were successful
renovate / renovate (push) Successful in 45s
Docker Build and Push / build-and-push-branches (push) Successful in 5m54s
Docker Build and Push / build-and-push-tags (push) Successful in 6m21s
2025-12-31 15:49:37 +07:00
ab34b34765 fix: prevent subdomain change to already-in-use subdomains
All checks were successful
renovate / renovate (push) Successful in 35s
Docker Build and Push / build-and-push (push) Successful in 5m42s
2025-12-30 19:41:33 +07:00
d8330c684f feat: make SSH interaction UI fully responsive 2025-12-30 00:09:18 +07:00
85f21e7698 feat(tui): update interaction layer to Bubble Tea TUI
All checks were successful
renovate / renovate (push) Successful in 27s
Docker Build and Push / build-and-push (push) Successful in 3m49s
2025-12-29 21:55:39 +07:00
2644b4521c refactor: improve encapsulation
All checks were successful
renovate / renovate (push) Successful in 20s
Docker Build and Push / build-and-push (push) Successful in 3m25s
2025-12-29 12:37:03 +07:00
1d918ef2aa feat(port): disable TCP forwarding by default and refactor port manager
All checks were successful
renovate / renovate (push) Successful in 28s
Docker Build and Push / build-and-push (push) Successful in 5m27s
2025-12-28 19:03:26 +07:00
76d1202b8e fix: correct logic when checking tcpip-forward request
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 5m34s
2025-12-26 23:17:13 +07:00
6dff735216 fix: prevent OOM by bounding io.Copy buffer usage
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m47s
2025-12-18 21:09:12 +07:00
7bc5a01ba7 feat: add pprof for debuging
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m51s
2025-12-18 18:30:49 +07:00
6451304ed7 fix: potential resource leak
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m17s
2025-12-17 21:38:00 +07:00
2725975d82 fix: add nil check in Forwarder.Close to avoid panic (issue #36)
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m8s
2025-12-12 15:36:07 +07:00
c951c41a9b fix: prevent race condition when channel is used before being set
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 6m24s
2025-12-08 22:46:10 +07:00
dd96c8fe75 refactor: remove magic numbers and replace with named constants
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 6m20s
2025-12-08 19:46:04 +07:00
ba5f702e36 feat: add droping conn command
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m38s
2025-12-07 15:26:37 +07:00
03d3c8e4fb feat: make interaction more interactive 2025-12-06 23:46:09 +07:00
9bd2bead9e refactor: instantiate new session object once forwarding is approved
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 6m6s
2025-12-06 23:14:13 +07:00
69c3e78728 fix: correct read/write handling in CustomWriter
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 5m7s
2025-12-06 22:18:43 +07:00
af951b8fa7 fix: discard unused buffers in the ssh channel before disconnecting 2025-12-05 22:26:38 +07:00
990bccbff7 update: handle message deletion properly 2025-12-05 22:24:46 +07:00
659f6c3ee7 refactor: move CreateForwardedTCPIPPayload to forwarder interface 2025-12-05 13:49:33 +07:00
7a31047bb9 refactor: restructure session initialization to avoid circular references 2025-12-04 22:48:15 +07:00
039e979142 refactor: restructure session initialization to avoid circular references 2025-12-04 19:32:00 +07:00
515bc30559 fix: conn reader stuck when header have body
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-12-03 21:14:42 +07:00
f59de03a50 fix: panic due to nil pointer when disconnecting a session
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-12-02 21:52:23 +07:00
d7d6e24a42 feat: add header factory
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-12-02 17:14:17 +07:00
f00b8db729 fix: http forwarding stuck
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-11-28 19:35:43 +07:00
342f58ddb9 fix: logic error in port checking
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-11-28 17:34:23 +07:00
8442fedef1 refactor: handle error
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-11-28 16:57:13 +07:00
d3a5007d68 refactor: separate session responsibilities and inject dependencies
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-11-28 13:29:43 +07:00
9c4ac732ee fix: close connection on TCP/IP request timeout
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
2025-11-27 22:51:34 +07:00
96dcea1f2c feat: add dedicated WebSocket service for subdomain ping
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 6m33s
2025-09-06 17:17:43 +07:00
c4dd086fb3 fix: ensure SSH connections close on client disconnect
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 4m20s
2025-07-23 12:40:20 +07:00
f6ad5c81e3 fix: resolve resource exhaustion with high connection counts
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m40s
2025-07-22 13:19:28 +07:00
28f0caced1 fix: resolve resource exhaustion with high connection counts
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m39s
2025-07-22 12:55:02 +07:00
4b21541668 fix: resolve resource exhaustion with high connection counts
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m40s
2025-07-22 12:38:52 +07:00
9f18cfa954 fix: remove timeouts from HTTP/HTTPS handlers and improve concurrency
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m40s
2025-07-21 19:54:17 +07:00
4a25627ab5 fix: using close channel when attempting to close session
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 3m35s
2025-07-21 16:36:05 +07:00