Commit Graph

16 Commits

Author SHA1 Message Date
Ona
12928c4736 Update README with smart port mapping feature
- Document the new smart port mapping functionality
- Add --test-port command example
- Fix duplicate step numbering in usage section
- Explain same-port preference and fallback behavior

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 21:30:54 +00:00
Ona
66c6ba9307 Improve port mapping to prefer same local port
Enhanced port forwarding logic to be more intuitive:

- Try to map remote port to same local port when possible
- Fallback to random available port if same port unavailable
- Clear user feedback showing port mapping (same vs different)
- Enhanced forwarding view with access URLs and instructions
- Added --test-port command to test port mapping logic

Examples:
- Remote port 3000 -> localhost:3000 (if available)
- Remote port 80 -> localhost:random (if 80 unavailable)
- Shows 'same port' or 'port X was unavailable' messages

This makes port forwarding much more intuitive - users can
access localhost:3000 when forwarding remote port 3000.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 21:30:14 +00:00
Ona
12f188de75 Update publishing status
Document current commits ready to push and authentication issue.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:43:16 +00:00
Ona
58c10d5a8e Add screenshot to README
- Add main.png screenshot showing the TUI interface
- Display screenshot prominently at the top of README
- Shows host selection and interactive features

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:40:23 +00:00
Ona
9ec67e9b64 Replace Go SSH library with native ssh command
Major rewrite to use native ssh command instead of Go SSH library:

BREAKING CHANGE: Now requires ssh command in PATH

Benefits:
- Full SSH feature support including ProxyCommand
- Works with SSH containers and jump hosts
- Supports all SSH authentication methods
- Consistent behavior with terminal SSH
- No more custom SSH client implementation

Changes:
- Port detection now uses 'ssh hostname command'
- Port forwarding uses 'ssh -L localport:localhost:remoteport hostname'
- Connection testing uses native ssh command
- Removed golang.org/x/crypto/ssh dependency
- Updated documentation to reflect SSH compatibility

This fixes issues with SSH containers that require ProxyCommand
and provides full compatibility with user SSH configurations.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:32:35 +00:00
Ona
02322c4a61 Remove debug log file
Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:24:08 +00:00
Ona
bde1529248 Fix port detection and manual forwarding issues
Major improvements to error handling and debugging:

- Fix program quitting on manual port forwarding errors
- Add comprehensive debug logging for SSH connections
- Improve error handling to show messages instead of quitting
- Add StateStartingForward for better user feedback
- Enhanced SSH client creation with default key loading
- Add --test-connect mode for debugging specific hosts
- Better timeout handling and connection diagnostics

The application now gracefully handles connection failures and
provides helpful error messages instead of crashing.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:24:04 +00:00
Ona
70307c7cba Document quoted include support in README
- Add examples of quoted include paths
- Explain relative path resolution behavior
- Mention compatibility with tools like Gitpod

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:16:21 +00:00
Ona
94407289db Add support for quoted values in SSH config
- Support both double quotes and single quotes in config values
- Handle quoted Include directives (e.g., Include "gitpod/config")
- Properly resolve relative paths in includes to ~/.ssh/ directory
- Maintain compatibility with unquoted values
- Add parseConfigLine function for proper quote handling

This fixes compatibility with Gitpod and other tools that generate
SSH configs with quoted include paths.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:16:10 +00:00
Ona
a332459b92 Update README with new features
- Document SSH config Include support
- Mention improved manual port input UI
- Add examples of include usage with glob patterns
- Explain cycle detection feature

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:10:42 +00:00
Ona
5ebe20a210 Improve manual port input UI styling
- Enhanced visual styling for port number input box
- Added proper border and padding with consistent colors
- Improved label positioning and typography
- Added placeholder text when input is empty
- Better visual cursor indication
- More detailed control instructions
- Consistent color scheme with rest of the application

The port input box now has better visual hierarchy and is easier to use.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:09:11 +00:00
Ona
df3c9feb53 Add support for SSH config includes
- Support Include directive in SSH config files
- Handle glob patterns (e.g., Include ~/.ssh/config.d/*)
- Prevent circular includes with cycle detection
- Gracefully handle missing or invalid include files
- Maintain compatibility with existing config parsing

This allows users to organize their SSH configs across multiple files
as supported by OpenSSH.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:08:52 +00:00
Ona
a4a4a6a4b8 Update publishing instructions
Clarify that binaries are not included in repository.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-26 00:01:42 +00:00
Ona
b2f0af84fc Add publishing instructions
Co-authored-by: Ona <no-reply@ona.com>
2025-09-25 23:58:15 +00:00
Ona
6e1ee6d39d Add .gitignore file
Co-authored-by: Ona <no-reply@ona.com>
2025-09-25 23:57:59 +00:00
Ona
e39a595956 Initial commit: kport - SSH Port Forwarder TUI
- Interactive TUI for SSH port forwarding
- Reads from ~/.ssh/config for host selection
- Automatic port detection on remote hosts
- Manual port forwarding option
- Graceful error handling and connection timeouts
- Built with Bubble Tea framework

Co-authored-by: Ona <no-reply@ona.com>
2025-09-25 23:57:44 +00:00