mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 11:54:01 +03:00
Change algorithm of TCP relaying
This commit is contained in:
+10
-2
@@ -69,6 +69,9 @@ const (
|
||||
|
||||
// DefaultIdleTimeout is a default timeout for closing a connection
|
||||
// in case of idling.
|
||||
//
|
||||
// Deprecated: no longer in use because of changed TCP relay
|
||||
// algorithm.
|
||||
DefaultIdleTimeout = time.Minute
|
||||
|
||||
// DefaultTolerateTimeSkewness is a default timeout for time
|
||||
@@ -83,9 +86,14 @@ const (
|
||||
// by Telegram and a proxy.
|
||||
SecretKeyLength = 16
|
||||
|
||||
// ConnectionIDBytesLength defines a count of random bytes
|
||||
// used to generate a stream/connection ids.
|
||||
// ConnectionIDBytesLength defines a count of random bytes used to generate
|
||||
// a stream/connection ids.
|
||||
ConnectionIDBytesLength = 16
|
||||
|
||||
// TCPRelayReadTimeout defines a max time period between two consecuitive
|
||||
// reads from Telegram after which connection will be terminated. This is
|
||||
// required to abort stale connections.
|
||||
TCPRelayReadTimeout = 20 * time.Second
|
||||
)
|
||||
|
||||
// Network defines a knowledge how to work with a network. It may sound
|
||||
|
||||
Reference in New Issue
Block a user