Add SOCKS5/HTTP proxy support for SSH connections

Allow SSH connections to be routed through SOCKS5 or HTTP CONNECT proxies.

Backend:
- Add ProxyType, ProxyHost, ProxyPort, ProxyUsername, ProxyPassword to SSHConfig
- dialTarget() dispatches to direct TCP, SOCKS5, or HTTP CONNECT based on config
- SOCKS5: uses golang.org/x/net/proxy with optional username/password auth
- HTTP CONNECT: sends CONNECT request with optional Basic auth, validates 200 OK
- Proxy dialling replaces ssh.Dial for non-jump-host connections; the resulting
  net.Conn is passed to ssh.NewClientConn for the SSH handshake

Frontend:
- Add Proxy section to SSH profile editor (collapsed by default)
- Proxy type selector: None / SOCKS5 / HTTP CONNECT
- Host, port, username, password fields
- Collect proxy values on save
This commit is contained in:
2026-04-17 00:00:00 +01:00
parent 2446e037ce
commit 9d3b3ff507
5 changed files with 148 additions and 6 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
module github.com/copilot-ssh-client/app
go 1.23.0
go 1.25.0
require (
github.com/google/uuid v1.6.0
@@ -8,8 +8,8 @@ require (
github.com/pkg/sftp v1.13.10
github.com/wailsapp/wails/v2 v2.12.0
github.com/zalando/go-keyring v0.2.5
golang.org/x/crypto v0.41.0
golang.org/x/text v0.28.0
golang.org/x/crypto v0.50.0
golang.org/x/text v0.36.0
)
require (
@@ -41,6 +41,6 @@ require (
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/wailsapp/go-webview2 v1.0.22 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/sys v0.43.0 // indirect
)