diff --git a/server.go b/server.go index b1479c6..de7ae8d 100644 --- a/server.go +++ b/server.go @@ -41,7 +41,7 @@ type Server struct { ConnCallback ConnCallback // optional callback for wrapping net.Conn before handling LocalPortForwardingCallback LocalPortForwardingCallback // callback for allowing local port forwarding, denies all if nil ReversePortForwardingCallback ReversePortForwardingCallback // callback for allowing reverse port forwarding, denies all if nil - DefaultServerConfigCallback DefaultServerConfigCallback // callback for configuring detailed SSH options + ServerConfigCallback ServerConfigCallback // callback for configuring detailed SSH options SessionRequestCallback SessionRequestCallback // callback for allowing or denying SSH sessions IdleTimeout time.Duration // connection timeout when no activity, none if empty @@ -98,7 +98,7 @@ func (srv *Server) config(ctx Context) *gossh.ServerConfig { if srv.DefaultServerConfigCallback == nil { config = &gossh.ServerConfig{} } else { - config = srv.DefaultServerConfigCallback(ctx) + config = srv.ServerConfigCallback(ctx) } for _, signer := range srv.HostSigners { config.AddHostKey(signer) diff --git a/ssh.go b/ssh.go index cb0d77f..f5a935a 100644 --- a/ssh.go +++ b/ssh.go @@ -61,8 +61,8 @@ type LocalPortForwardingCallback func(ctx Context, destinationHost string, desti // ReversePortForwardingCallback is a hook for allowing reverse port forwarding type ReversePortForwardingCallback func(ctx Context, bindHost string, bindPort uint32) bool -// DefaultServerConfigCallback is a hook for creating custom default server configs -type DefaultServerConfigCallback func(ctx Context) *gossh.ServerConfig +// ServerConfigCallback is a hook for creating custom default server configs +type ServerConfigCallback func(ctx Context) *gossh.ServerConfig // Window represents the size of a PTY window. type Window struct {