Skip to content
Permalink
Browse files

Merge pull request #76 from DavBfr/fix-slow-connect-timeout

Add sish.connecttimeout setting
  • Loading branch information
antoniomika committed Feb 23, 2020
2 parents 6d0ced7 + 3d74221 commit 40af5a44e91d375f05fd099ab2374adbd1f0cb19
Showing with 4 additions and 1 deletion.
  1. +2 −0 README.md
  2. +2 −1 main.go
@@ -142,6 +142,8 @@ Usage of ./sish:
The port to use for https command output
-sish.idletimeout int
Number of seconds to wait for activity before closing a connection (default 5)
-sish.connecttimeout int
Number of seconds the ssh login process is allowed before closing a connection (default 5)
-sish.keysdir string
Directory for public keys for pubkey auth (default "pubkeys/")
-sish.logtoclient
@@ -79,6 +79,7 @@ var (
tcpAlias = flag.Bool("sish.tcpalias", false, "Whether or not to allow the use of TCP aliasing")
logToClient = flag.Bool("sish.logtoclient", false, "Whether or not to log http requests to the client")
idleTimeout = flag.Int("sish.idletimeout", 5, "Number of seconds to wait for activity before closing a connection")
connectTimeout = flag.Int("sish.connecttimeout", 5, "Number of seconds the ssh login process is allowed before closing a connection")
appendUserToSubdomain = flag.Bool("sish.appendusertosubdomain", false, "Whether or not to append the user to the subdomain")
adminEnabled = flag.Bool("sish.adminenabled", false, "Whether or not to enable the admin console")
adminToken = flag.String("sish.admintoken", "S3Cr3tP4$$W0rD", "The token to use for admin access")
@@ -261,7 +262,7 @@ func main() {

if *cleanupUnbound {
go func() {
<-time.After(5 * time.Second)
<-time.After(time.Duration(*connectTimeout) * time.Second)
if !clientLoggedIn {
conn.Close()
}

0 comments on commit 40af5a4

Please sign in to comment.
You can’t perform that action at this time.