[Pkg-privacy-commits] [obfs4proxy] 43/151: Change the client connection timeout to 30 sec.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:59:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository obfs4proxy.

commit 745d414645872853fe1e3adab28dfb02f0b61dd0
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Sat May 17 07:19:27 2014 +0000

    Change the client connection timeout to 30 sec.
    
    This is more common than 15 seconds (It's what Firefox uses for the
    request timeout).
---
 obfs4.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/obfs4.go b/obfs4.go
index 52e1b02..8c4c46e 100644
--- a/obfs4.go
+++ b/obfs4.go
@@ -42,7 +42,7 @@ import (
 
 const (
 	headerLength      = framing.FrameOverhead + packetOverhead
-	connectionTimeout = time.Duration(15) * time.Second
+	connectionTimeout = time.Duration(30) * time.Second
 
 	minCloseThreshold = 0
 	maxCloseThreshold = framing.MaximumSegmentLength * 5
@@ -324,6 +324,9 @@ func (c *Obfs4Conn) ServerHandshake() error {
 	err := c.serverHandshake(c.listener.nodeID, c.listener.keyPair)
 	c.listener = nil
 	if err != nil {
+		// XXX: Maybe make the timeout period deterministic, since random
+		// hangup intervals are also suspicious.  An ok value would be someting
+		// like the Nginx client_header_timeout (60s).
 		c.closeAfterDelay()
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git



More information about the Pkg-privacy-commits mailing list