Rename DefaultServerConfigCallback to ServerConfigCallback

This commit is contained in:
Kaleb Elwert 2019-06-19 02:06:24 -07:00
parent 446473b0d4
commit 0f1eb383c3
2 changed files with 4 additions and 4 deletions

@ -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)

4
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 {