Documentation
¶
Overview ¶
Package proxy provides an HTTPS/HTTP3 server that forwards CLI commands to a backend network device over SSH. This is the "site proxy" pattern: automation talks HTTPS over the WAN, the proxy talks SSH over a low-latency campus link.
Index ¶
- type Server
- func (s *Server) Addr() string
- func (s *Server) Close() error
- func (s *Server) ListenAndServeH3() error
- func (s *Server) ListenAndServeTLS() error
- func (s *Server) RunCommands(cmds []string) (string, error)
- func (s *Server) SetListener(ln net.Listener)
- func (s *Server) SetPacketConn(conn net.PacketConn)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an HTTPS proxy that forwards commands to a backend SSH device.
func New ¶
New creates a proxy server. If pooled is true, one SSH connection is reused across requests; otherwise each request gets a fresh one.
func (*Server) ListenAndServeH3 ¶ added in v0.3.0
ListenAndServeH3 starts the proxy as an HTTP/3 server.
func (*Server) ListenAndServeTLS ¶
ListenAndServeTLS starts the HTTPS proxy.
func (*Server) RunCommands ¶ added in v0.4.0
RunCommands implements httphandler.Runner by forwarding to SSH backend.
func (*Server) SetListener ¶
SetListener sets a custom net.Listener (e.g., with latency injection).
func (*Server) SetPacketConn ¶ added in v0.3.0
func (s *Server) SetPacketConn(conn net.PacketConn)
SetPacketConn sets a custom net.PacketConn for HTTP/3 serving.