mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Start implementing custom ssh server
Turns out SSH has robust semantics for opening generic channels. Looks like I'll be able to set up tunnels without ever needing to forward ports on the server, since I can connect the channels with a custom protocol. Of course I'll eventually want to support generic SSH clients, but this makes starting much easier.
This commit is contained in:
@@ -34,6 +34,7 @@ type BoringProxy struct {
|
||||
tunMan *TunnelManager
|
||||
adminListener *AdminListener
|
||||
certConfig *certmagic.Config
|
||||
sshServer *SshServer
|
||||
}
|
||||
|
||||
func NewBoringProxy() *BoringProxy {
|
||||
@@ -67,7 +68,9 @@ func NewBoringProxy() *BoringProxy {
|
||||
|
||||
auth := NewAuth()
|
||||
|
||||
p := &BoringProxy{config, auth, tunMan, adminListener, certConfig}
|
||||
sshServer := NewSshServer()
|
||||
|
||||
p := &BoringProxy{config, auth, tunMan, adminListener, certConfig, sshServer}
|
||||
|
||||
http.HandleFunc("/", p.handleAdminRequest)
|
||||
go http.Serve(adminListener, nil)
|
||||
|
||||
Reference in New Issue
Block a user