Fix bug with throttlespeed in ssh conn
This commit is contained in:
@@ -60,6 +60,8 @@ func NewHoneypotServer(cfg config.HoneypotConfig, store store.LoginAttemptStore)
|
||||
hs.sshServer.AddHostKey(signer)
|
||||
}
|
||||
|
||||
hs.throttleSpeed = 1024 * 1024
|
||||
|
||||
return &hs, nil
|
||||
}
|
||||
|
||||
@@ -116,7 +118,6 @@ func (hs *HoneypotServer) passwordHandler(ctx sshlib.Context, password string) b
|
||||
|
||||
func (s *HoneypotServer) connCallback(ctx sshlib.Context, conn net.Conn) net.Conn {
|
||||
s.Logger.Debugw("Connection received.", "remote_addr", conn.RemoteAddr())
|
||||
conn.RemoteAddr()
|
||||
|
||||
throttledConn := newThrottledConn(conn)
|
||||
throttledConn.SetSpeed(s.throttleSpeed)
|
||||
|
Reference in New Issue
Block a user