Skip to content

Commit 0f1eb38

Browse files
committed
Rename DefaultServerConfigCallback to ServerConfigCallback
1 parent 446473b commit 0f1eb38

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Server struct {
4141
ConnCallback ConnCallback // optional callback for wrapping net.Conn before handling
4242
LocalPortForwardingCallback LocalPortForwardingCallback // callback for allowing local port forwarding, denies all if nil
4343
ReversePortForwardingCallback ReversePortForwardingCallback // callback for allowing reverse port forwarding, denies all if nil
44-
DefaultServerConfigCallback DefaultServerConfigCallback // callback for configuring detailed SSH options
44+
ServerConfigCallback ServerConfigCallback // callback for configuring detailed SSH options
4545
SessionRequestCallback SessionRequestCallback // callback for allowing or denying SSH sessions
4646

4747
IdleTimeout time.Duration // connection timeout when no activity, none if empty
@@ -98,7 +98,7 @@ func (srv *Server) config(ctx Context) *gossh.ServerConfig {
9898
if srv.DefaultServerConfigCallback == nil {
9999
config = &gossh.ServerConfig{}
100100
} else {
101-
config = srv.DefaultServerConfigCallback(ctx)
101+
config = srv.ServerConfigCallback(ctx)
102102
}
103103
for _, signer := range srv.HostSigners {
104104
config.AddHostKey(signer)

ssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ type LocalPortForwardingCallback func(ctx Context, destinationHost string, desti
6161
// ReversePortForwardingCallback is a hook for allowing reverse port forwarding
6262
type ReversePortForwardingCallback func(ctx Context, bindHost string, bindPort uint32) bool
6363

64-
// DefaultServerConfigCallback is a hook for creating custom default server configs
65-
type DefaultServerConfigCallback func(ctx Context) *gossh.ServerConfig
64+
// ServerConfigCallback is a hook for creating custom default server configs
65+
type ServerConfigCallback func(ctx Context) *gossh.ServerConfig
6666

6767
// Window represents the size of a PTY window.
6868
type Window struct {

0 commit comments

Comments
 (0)