Skip to content

Commit

Permalink
Add sish.connecttimeout setting
Browse files Browse the repository at this point in the history
  • Loading branch information
DavBfr committed Feb 16, 2020
1 parent 6e567f2 commit 3d74221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 3d74221

Please sign in to comment.