Просмотр исходного кода

Merge pull request #121 from rod-hynes/master

Performance tweak: longer inactivity period before sending probe keep…
Rod Hynes 10 лет назад
Родитель
Сommit
e83a810cb9
2 измененных файлов с 4 добавлено и 1 удалено
  1. 1 1
      psiphon/config.go
  2. 3 0
      psiphon/tunnel.go

+ 1 - 1
psiphon/config.go

@@ -41,7 +41,7 @@ const (
 	TUNNEL_SSH_KEEP_ALIVE_PERIODIC_TIMEOUT         = 30 * time.Second
 	TUNNEL_SSH_KEEP_ALIVE_PERIODIC_INACTIVE_PERIOD = 10 * time.Second
 	TUNNEL_SSH_KEEP_ALIVE_PROBE_TIMEOUT            = 5 * time.Second
-	TUNNEL_SSH_KEEP_ALIVE_PROBE_INACTIVE_PERIOD    = 5 * time.Second
+	TUNNEL_SSH_KEEP_ALIVE_PROBE_INACTIVE_PERIOD    = 10 * time.Second
 	ESTABLISH_TUNNEL_TIMEOUT_SECONDS               = 300
 	ESTABLISH_TUNNEL_WORK_TIME                     = 60 * time.Second
 	ESTABLISH_TUNNEL_PAUSE_PERIOD                  = 5 * time.Second

+ 3 - 0
psiphon/tunnel.go

@@ -532,6 +532,9 @@ func dialSsh(
 // resolve, while no new port forward is attempted which would otherwise
 // result in a tunnel failure detection.
 //
+// TODO: change "recently active" to include having received any
+// SSH protocol messages from the server, not just user payload?
+//
 func (tunnel *Tunnel) operateTunnel(config *Config, tunnelOwner TunnelOwner) {
 	defer tunnel.operateWaitGroup.Done()