Add TCP Proxy Support for SSH Connections#76
Draft
ljluestc wants to merge 3 commits intomelbahja:masterfrom
Draft
Add TCP Proxy Support for SSH Connections#76ljluestc wants to merge 3 commits intomelbahja:masterfrom
ljluestc wants to merge 3 commits intomelbahja:masterfrom
Conversation
- Implement SOCKS5 and HTTP CONNECT proxy support - Add proxy configuration structures and types - Create proxy dialer functionality with authentication - Add convenience functions for proxy connections - Create comprehensive test suite with mock servers - Update documentation and examples - Add full integration tests and testing utilities Proxy Types Supported: - SOCKS5 proxy with optional authentication - HTTP CONNECT proxy with optional authentication Testing Features: - Mock proxy servers for unit testing - Integration tests with real proxy protocols - Authentication testing scenarios - Concurrent connection testing - Error handling and timeout validation - Fluent testing API for easy test setup Files Added: - proxy_test.go: Comprehensive unit tests - proxy_test_utils.go: Mock server implementations - proxy_integration_test.go: End-to-end integration tests - proxy_test_helpers.go: Testing utilities and fluent API - PROXY_TESTING_README.md: Complete testing documentation Files Modified: - client.go: Added proxy support and dialer logic - README.md: Updated with proxy usage examples - examples/goph/main.go: Added proxy command-line options - go.mod: Added golang.org/x/net dependency - goph_test.go: Added basic proxy configuration tests This resolves GitHub issue melbahja#56: 'how to access remote server via a tcp proxy'
Add demo_proxy.go script that showcases: - Proxy configuration examples - Convenience function usage - Real-world usage scenarios - Error handling approaches - Testing strategy overview
- Add core SOCKS5 and HTTP CONNECT proxy support - Remove extensive testing suite, keep only essential code - Reduce from 2,944 lines to ~300 lines (90% reduction) - Keep only: client.go, go.mod, goph_test.go, README.md, examples/main.go Resolves GitHub issue melbahja#56: access remote servers via TCP proxy
Owner
|
Hey, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original issue requested the ability to connect to SSH servers through TCP proxies, which is essential for:
Solution Overview
Added complete SOCKS5 and HTTP CONNECT proxy support with the following features:
Core Features
API Design
NewSOCKS5ProxyConn(),NewHTTPProxyConn()Configstruct withProxyfieldProxyTypeenum for SOCKS5/HTTP proxy types