Commit Graph

  • 04c9ddbc13 test(lifecycle): add unit tests for lifecycle behavior bagas 2026-01-24 20:28:30 +07:00
  • 211745dc26 test(slug): add unit tests for slug behavior bagas 2026-01-24 19:16:31 +07:00
  • 09aa92a0ae fix: properly initialize tlsStoragePath in config load bagas 2026-01-24 17:55:26 +07:00
  • 1ed9f3631f fix: correct buffer pool usage to avoid type assertion error bagas 2026-01-24 17:50:22 +07:00
  • bd826d6d06 refactor(transport): reduce cognitive complexity and clean up public API bagas 2026-01-24 17:41:41 +07:00
  • 2f5c44ff01 test(bootstrap): add unit tests for initial bootstrap behavior bagas 2026-01-24 15:42:30 +07:00
  • d0e052524c refactor: decouple application startup logic from main bagas 2026-01-23 23:51:58 +07:00
  • 24b9872aa4 fix: corrected defer usage to pass buffer pointer bagas 2026-01-23 20:31:27 +07:00
  • 8b84373036 fix: remove unnecessary use of fmt.Sprintf bagas 2026-01-23 20:28:11 +07:00
  • e796ab5328 fix: handle error return values for privateKeyFile.Close and pubKeyFile.Close bagas 2026-01-23 20:21:47 +07:00
  • efdfc4ce95 chore: remove unused headerBuf variable bagas 2026-01-23 20:05:40 +07:00
  • 1dc929cc25 ci: sonarqube add linting bagas 2026-01-23 19:17:13 +07:00
  • 14abac6579 test(session): add unit tests for session behavior bagas 2026-01-23 19:03:01 +07:00
  • 21179da4b5 refactor(session): reduce function parameters bagas 2026-01-23 15:52:27 +07:00
  • 32f8be2891 test(version): add unit tests for version behavior bagas 2026-01-23 15:41:00 +07:00
  • 5af7af3139 test(client): add unit tests for grpc client behavior bagas 2026-01-23 15:26:51 +07:00
  • f4848e9754 fix(client): reduce cognitive complexity and fix typo (go:S3776) bagas 2026-01-23 14:48:04 +07:00
  • d2e508c8ef test(key): add unit tests for key behavior bagas 2026-01-23 14:17:18 +07:00
  • 5499b7d08a ci: update SonarQube action configuration bagas 2026-01-22 22:05:02 +07:00
  • 58f1fdabe1 test(server): add unit tests for server startup behavior bagas 2026-01-22 21:58:25 +07:00
  • c1fb588cf4 test(config): add unit tests for config behavior bagas 2026-01-22 21:24:58 +07:00
  • 3029996773 test(stream): add unit tests for stream behavior - Fix duplicating EOF error when closing SSH connection - Add new SessionStatusCLOSED type bagas 2026-01-22 21:04:05 +07:00
  • 3fd179d32b test(header): add unit tests for header behavior bagas 2026-01-22 19:47:31 +07:00
  • a598a10e94 update: exclude local test coverage bagas 2026-01-22 19:46:47 +07:00
  • 29cabe42d3 test(transport): add unit tests for transport behavior using Testify bagas 2026-01-22 19:22:35 +07:00
  • e534972abc test(random): add unit tests for random behavior bagas 2026-01-22 13:27:25 +07:00
  • a55ff5f6ab test(port): add unit tests for port behavior bagas 2026-01-22 12:39:46 +07:00
  • 50b4127cb3 test(middleware): add unit tests for middleware behavior bagas 2026-01-22 12:30:20 +07:00
  • 7e635721fb ci: automate Go tests and Sonar coverage reporting bagas 2026-01-22 01:07:33 +07:00
  • 016df9caee test(registry): add unit tests for registry behavior bagas 2026-01-22 00:47:53 +07:00
  • d91eecb2a0 chore: Refactor and optimize project architecture bagas 2026-01-22 22:16:33 +07:00
  • 961a905542 chore(restructure): refactor architecture, config, and lifecycle management bagas 2026-01-22 00:48:40 +07:00
  • 634c8321ef refactor(registry): define reusable constant errors bagas 2026-01-21 22:11:24 +07:00
  • 9f4c24a3f3 refactor(lifecycle): reorder resource closing and simplify Close() - Close channel and connection first, then remove session - Close forwarded port and forwarder at the end for TCP tunnels - Aggregate all errors using errors.Join instead of failing early bagas 2026-01-21 21:55:38 +07:00
  • 1408b80917 ci: add sonarqube scan bagas 2026-01-21 21:05:10 +07:00
  • 2bc20dd991 refactor(config): centralize env loading and enforce typed access - Centralize environment variable loading in config.MustLoad - Parse and validate all env vars once at initialization - Make config fields private and read-only - Remove public Getenv usage in favor of typed accessors - Improve validation and initialization order - Normalize enum naming to be idiomatic and avoid constant collisions bagas 2026-01-21 19:43:19 +07:00
  • 1e12373359 chore(restructure): reorganize project layout v1.1.4 bagas 2026-01-21 14:06:46 +07:00
  • 9a4539cc02 refactor(httpheader): extract header parsing into dedicated package bagas 2026-01-20 21:15:34 +07:00
  • e3ead4d52f refactor: optimize header parsing and remove factory naming - Remove factory naming - Use direct byte indexing instead of bytes.TrimRight - Extract parseStartLine and setRemainingHeaders helpers bagas 2026-01-20 19:07:47 +07:00
  • aa1a465178 refactor(forwarder): improve connection handling and cleanup - Extract copyAndClose method for bidirectional data transfe - Add closeWriter helper for graceful connection shutdown - Add handleIncomingConnection helper - Add openForwardedChannel helper bagas 2026-01-20 19:01:15 +07:00
  • 27f49879af refactor(server): enhance HTTP handler modularity and fix resource leak - Rename customWriter struct to httpWriter for clarity - Add closeWriter field to properly close write side of connections - Update all cw variable references to hw - Merge handlerTLS into handler function to reduce code duplication - Extract handler into smaller, focused methods - Split Read/Write/forwardRequest into composable functions bagas 2026-01-19 22:41:04 +07:00
  • adb0264bb5 refactor(session): simplify Start() and unify forwarding logic - Extract helper functions from Start() for better code organization - Eliminate duplication with finalizeForwarding() method - Consolidate denial logic into denyForwardingRequest() - Update all handler methods to return errors instead of logging internally - Improve error handling consistency across all operations bagas 2026-01-19 15:12:31 +07:00
  • 8fb19af5a6 fix: resolve copy goroutine deadlock on early connection close - Add proper CloseWrite handling to signal EOF to other goroutine - Ensure both copy goroutines terminate when either side closes - Prevent goroutine leaks for SSH forwarded-tcpip channels: - Use select with default when sending result to resultChan - Close unused SSH channels and discard requests if main goroutine has already timed out bagas 2026-01-19 00:13:09 +07:00
  • 41fdb5639c Merge pull request 'refactor: explicit initialization and dependency injection' (#70) from staging into main bagas 2026-01-18 21:46:59 +07:00
  • 44d224f491 refactor: explicit initialization and dependency injection - Replace init() with config.Load() function when loading env variables - Inject portRegistry into session, server, and lifecycle structs - Inject sessionRegistry directly into interaction and lifecycle - Remove SetSessionRegistry function and global port variables - Pass ssh.Conn directly to forwarder constructor instead of lifecycle interface - Pass user and closeFunc callback to interaction constructor instead of lifecycle interface - Eliminate circular dependencies between lifecycle, forwarder, and interaction - Remove setter methods (SetLifecycle) from forwarder and interaction interfaces v1.1.3 bagas 2026-01-18 20:42:10 +07:00
  • 9be0328e24 Merge pull request 'staging' (#69) from staging into main bagas 2026-01-17 19:15:40 +07:00
  • 2b9bca65d5 refactor(interaction): separate view and update logic into modular files - Extract slug editing logic to slug.go (slugView/slugUpdate) - Extract commands menu logic to commands.go (commandsView/commandsUpdate) - Extract coming soon modal to coming_soon.go (comingSoonView/comingSoonUpdate) - Extract main dashboard logic to dashboard.go (dashboardView/dashboardUpdate) - Create model.go for shared model struct and helper functions - Replace math/rand with crypto/rand for random subdomain generation - Remove legacy TLS cipher suite configuration v1.1.2 bagas 2026-01-17 17:32:30 +07:00
  • 6587dc0f39 refactor(interaction): separate view and update logic into modular files - Extract slug editing logic to slug.go (slugView/slugUpdate) - Extract commands menu logic to commands.go (commandsView/commandsUpdate) - Extract coming soon modal to coming_soon.go (comingSoonView/comingSoonUpdate) - Extract main dashboard logic to dashboard.go (dashboardView/dashboardUpdate) - Create model.go for shared model struct and helper functions - Replace math/rand with crypto/rand for random subdomain generation - Remove legacy TLS cipher suite configuration bagas 2026-01-17 17:30:21 +07:00
  • f421781f44 Merge pull request 'refactor: convert structs to interfaces and rename accessors' (#68) from staging into main bagas 2026-01-16 16:41:22 +07:00
  • 6969d6823a Merge branch 'main' into staging v1.1.1 bagas 2026-01-16 16:28:39 +07:00
  • 1a04af8873 Merge branch 'main' into staging bagas 2026-01-16 16:28:39 +07:00
  • 19135ceb42 refactor: convert structs to interfaces and rename accessors - Convert struct types to interfaces - Rename getter and setter methods - Add Close method to server interface - Merge handler functionality into session file - Handle lifecycle.Connection().Wait() - fix panic on nil connection in SSH server bagas 2026-01-16 15:17:33 +07:00
  • edb11dbc51 Merge pull request 'chore(deps): update golang docker tag to v1.25.6' (#67) from renovate/golang-1.x into main Renovate-Clanker 2026-01-16 05:01:06 +07:00
  • 819f044275 chore(deps): update golang docker tag to v1.25.6 Renovate-Clanker 2026-01-15 22:01:02 +00:00
  • a7ebf2c5db Merge pull request 'fix(deps): update module golang.org/x/crypto to v0.47.0' (#66) from renovate/golang.org-x-crypto-0.x into main bagas 2026-01-14 10:42:52 +00:00
  • 64c1038f4b fix(deps): update module golang.org/x/crypto to v0.47.0 Renovate-Clanker 2026-01-14 10:41:47 +00:00
  • aafea49975 feat: integrate gRPC, session refactor, SSH headless support, and bug fixes v1.1.0 bagas 2026-01-14 10:16:43 +00:00
  • dbdf8094fa refactor: replace Get/Set patterns with idiomatic Go interfaces - rename constructors to New - remove Get/Set-style accessors - replace string-based enums with iota-backed types v1.1.0-rc.2 bagas 2026-01-14 15:28:17 +07:00
  • ae3ed52d16 fix(port): add atomic ClaimPort() to prevent race condition bagas 2026-01-12 18:17:20 +07:00
  • fb638636bf refactor: consolidate error handling with fail() function in session handlers - Replace repetitive error handling code with fail() function in HandleGlobalRequest - Standardize error response pattern across all handler methods - Improve code maintainability and reduce duplication bagas 2026-01-12 14:42:42 +07:00
  • da29df85b7 feat: add headless mode support for SSH -N connections - use s.lifecycle.GetConnection().Wait() to block until SSH connection closes - Prevent premature session closure in headless mode bagas 2026-01-11 15:21:11 +07:00
  • 8b0e08c629 fix(deps): update module github.com/caddyserver/certmagic to v0.25.1 Renovate-Clanker 2026-01-09 10:00:35 +00:00
  • f0804d6946 ci: remove renovate bagas 2026-01-08 12:55:15 +07:00
  • 09e526cd1e feat: add authenticated user info and restructure handleConnection - Display authenticated username in welcome page information box - Refactor handleConnection function for better structure and clarity bagas 2026-01-07 23:07:02 +07:00
  • 887ebf78b1 refactor(grpc/client): simplify processEventStream with per-event handlers - Extract eventHandlers dispatch table - Add per-event handlers: handleSlugChange, handleGetSessions, handleTerminateSession - Introduce sendNode helper to centralize send/error handling and preserve connection-error propagation - Add protoToTunnelType for tunnel-type validation - Map unknown proto.TunnelType to types.UNKNOWN in protoToTunnelType and return a descriptive error - Reduce boilerplate and improve readability of processEventStream bagas 2026-01-06 20:14:56 +07:00
  • bef7a49f88 feat: implement forwarder session termination bagas 2026-01-06 18:32:48 +07:00
  • 17633b4e3c refactor: inject SessionRegistry interface instead of individual functions bagas 2026-01-05 16:44:03 +07:00
  • f25d61d1d1 update: proto file to v1.3.0 bagas 2026-01-05 00:55:51 +07:00
  • 8782b77b74 feat(session): use session key for registry bagas 2026-01-05 00:50:42 +07:00
  • fc3cd886db fix: use correct environment variable key bagas 2026-01-04 18:21:34 +07:00
  • b0da57db0d fix: startup order bagas 2026-01-04 15:19:03 +07:00
  • 0bd6eeadf3 feat: implement sessions request from grpc server bagas 2026-01-03 21:17:01 +07:00
  • 449f546e04 feat: implement sessions request from grpc server bagas 2026-01-03 20:06:14 +07:00
  • 4644420eee feat: implement get sessions by user bagas 2026-01-02 22:58:54 +07:00
  • c9bf9e62bd feat(grpc): integrate slug edit handling bagas 2026-01-02 18:27:48 +07:00
  • 57d2136377 WIP: gRPC integration, initial implementation bagas 2026-01-01 21:03:17 +07:00
  • 8a34aaba80 WIP: gRPC integration, initial implementation bagas 2026-01-01 21:01:15 +07:00
  • ff995a929e revert 01ddc76f7e bagas 2026-01-09 09:33:04 +00:00
  • 32ac9c1749 fix(deps): update module github.com/caddyserver/certmagic to v0.25.1 Renovate-Clanker 2026-01-09 09:30:18 +00:00
  • 07d9f3afe6 refactor: replace Get/Set patterns with idiomatic Go interfaces - rename constructors to New - remove Get/Set-style accessors - replace string-based enums with iota-backed types v1.1.0-rc.1 bagas 2026-01-14 15:28:17 +07:00
  • e051a5b742 Merge pull request 'fix(deps): update module golang.org/x/crypto to v0.47.0' (#64) from renovate/golang.org-x-crypto-0.x into main Renovate-Clanker 2026-01-12 18:20:57 +00:00
  • d35228759c fix(deps): update module golang.org/x/crypto to v0.47.0 Renovate-Clanker 2026-01-12 18:20:53 +00:00
  • abd103b5ab fix(port): add atomic ClaimPort() to prevent race condition v1.1.0-beta.1 bagas 2026-01-12 18:17:20 +07:00
  • 560c98b869 refactor: consolidate error handling with fail() function in session handlers - Replace repetitive error handling code with fail() function in HandleGlobalRequest - Standardize error response pattern across all handler methods - Improve code maintainability and reduce duplication bagas 2026-01-12 14:42:42 +07:00
  • e1f5d73e03 feat: add headless mode support for SSH -N connections - use s.lifecycle.GetConnection().Wait() to block until SSH connection closes - Prevent premature session closure in headless mode v1.1.0-alpha.9 bagas 2026-01-11 15:21:11 +07:00
  • 19fd6d59d2 Merge pull request 'main' (#62) from main into staging bagas 2026-01-09 12:15:30 +00:00
  • e3988b339f Merge pull request 'fix(deps): update module github.com/caddyserver/certmagic to v0.25.1' (#61) from renovate/github.com-caddyserver-certmagic-0.x into main bagas 2026-01-09 12:15:05 +00:00
  • 336948a397 fix(deps): update module github.com/caddyserver/certmagic to v0.25.1 Renovate-Clanker 2026-01-09 10:00:35 +00:00
  • 50ae422de8 Merge pull request 'staging' (#60) from staging into main bagas 2026-01-09 09:33:28 +00:00
  • 8467ed555e revert 01ddc76f7e bagas 2026-01-09 09:33:04 +00:00
  • 01ddc76f7e Merge pull request 'fix(deps): update module github.com/caddyserver/certmagic to v0.25.1' (#58) from renovate/github.com-caddyserver-certmagic-0.x into main Renovate-Clanker 2026-01-09 09:30:23 +00:00
  • ffb3565ff5 fix(deps): update module github.com/caddyserver/certmagic to v0.25.1 Renovate-Clanker 2026-01-09 09:30:18 +00:00
  • 6d700ef6dd Merge pull request 'feat/grpc-integration' (#59) from feat/grpc-integration into staging bagas 2026-01-09 09:24:20 +00:00
  • b8acb6da4c ci: remove renovate bagas 2026-01-08 12:55:15 +07:00
  • 6b4127f0ef feat: add authenticated user info and restructure handleConnection - Display authenticated username in welcome page information box - Refactor handleConnection function for better structure and clarity v1.1.0-alpha.8 bagas 2026-01-07 23:07:02 +07:00
  • 16d48ff906 refactor(grpc/client): simplify processEventStream with per-event handlers - Extract eventHandlers dispatch table - Add per-event handlers: handleSlugChange, handleGetSessions, handleTerminateSession - Introduce sendNode helper to centralize send/error handling and preserve connection-error propagation - Add protoToTunnelType for tunnel-type validation - Map unknown proto.TunnelType to types.UNKNOWN in protoToTunnelType and return a descriptive error - Reduce boilerplate and improve readability of processEventStream v1.1.0-alpha.7 bagas 2026-01-06 20:14:56 +07:00
  • 6213ff8a30 feat: implement forwarder session termination v1.1.0-alpha.6 bagas 2026-01-06 18:32:48 +07:00
  • 4ffaec9d9a refactor: inject SessionRegistry interface instead of individual functions v1.1.0-alpha.5 bagas 2026-01-05 16:44:03 +07:00
  • 6de0a618ee update: proto file to v1.3.0 v1.1.0-alpha.4 bagas 2026-01-05 00:55:51 +07:00
  • 8cc70fa45e feat(session): use session key for registry bagas 2026-01-05 00:50:42 +07:00