Skip to content

Commit

Permalink
Rename DefaultServerConfigCallback to ServerConfigCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Jun 19, 2019
1 parent 446473b commit 0f1eb38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0f1eb38

Please sign in to comment.