2022-07-18 12:40:14 +00:00
|
|
|
package constant
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
const (
|
2024-04-08 10:00:48 +00:00
|
|
|
TCPKeepAliveInitial = 10 * time.Minute
|
|
|
|
TCPKeepAliveInterval = 75 * time.Second
|
2024-10-30 05:09:05 +00:00
|
|
|
TCPConnectTimeout = 5 * time.Second
|
|
|
|
TCPTimeout = 15 * time.Second
|
2024-04-02 15:07:26 +00:00
|
|
|
ReadPayloadTimeout = 300 * time.Millisecond
|
|
|
|
DNSTimeout = 10 * time.Second
|
|
|
|
UDPTimeout = 5 * time.Minute
|
|
|
|
DefaultURLTestInterval = 3 * time.Minute
|
|
|
|
DefaultURLTestIdleTimeout = 30 * time.Minute
|
|
|
|
StartTimeout = 10 * time.Second
|
|
|
|
StopTimeout = 5 * time.Second
|
|
|
|
FatalStopTimeout = 10 * time.Second
|
|
|
|
FakeIPMetadataSaveInterval = 10 * time.Second
|
2022-07-18 12:40:14 +00:00
|
|
|
)
|
2024-11-24 06:45:40 +00:00
|
|
|
|
|
|
|
var PortProtocols = map[uint16]string{
|
|
|
|
53: ProtocolDNS,
|
|
|
|
123: ProtocolNTP,
|
|
|
|
3478: ProtocolSTUN,
|
|
|
|
443: ProtocolQUIC,
|
|
|
|
}
|
|
|
|
|
|
|
|
var ProtocolTimeouts = map[string]time.Duration{
|
|
|
|
ProtocolDNS: 10 * time.Second,
|
|
|
|
ProtocolNTP: 10 * time.Second,
|
|
|
|
ProtocolSTUN: 10 * time.Second,
|
|
|
|
ProtocolQUIC: 30 * time.Second,
|
|
|
|
ProtocolDTLS: 30 * time.Second,
|
|
|
|
}
|