mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
Add HTTP timeout
This commit is contained in:
@@ -34,6 +34,7 @@ type Config struct {
|
|||||||
} `json:"public-ip"`
|
} `json:"public-ip"`
|
||||||
Timeout struct {
|
Timeout struct {
|
||||||
TCP TypeDuration `json:"tcp"`
|
TCP TypeDuration `json:"tcp"`
|
||||||
|
HTTP TypeDuration `json:"http"`
|
||||||
Idle TypeDuration `json:"idle"`
|
Idle TypeDuration `json:"idle"`
|
||||||
} `json:"timeout"`
|
} `json:"timeout"`
|
||||||
DOHIP TypeIP `json:"doh-ip"`
|
DOHIP TypeIP `json:"doh-ip"`
|
||||||
@@ -103,6 +104,7 @@ type configRaw struct {
|
|||||||
} `toml:"public-ip" json:"public-ip,omitempty"`
|
} `toml:"public-ip" json:"public-ip,omitempty"`
|
||||||
Timeout struct {
|
Timeout struct {
|
||||||
TCP string `toml:"tcp" json:"tcp,omitempty"`
|
TCP string `toml:"tcp" json:"tcp,omitempty"`
|
||||||
|
HTTP string `toml:"http" json:"http,omitempty"`
|
||||||
Idle string `toml:"idle" json:"idle,omitempty"`
|
Idle string `toml:"idle" json:"idle,omitempty"`
|
||||||
} `toml:"timeout" json:"timeout,omitempty"`
|
} `toml:"timeout" json:"timeout,omitempty"`
|
||||||
DOHIP string `toml:"doh-ip" json:"doh-ip,omitempty"`
|
DOHIP string `toml:"doh-ip" json:"doh-ip,omitempty"`
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ ipv6 = ""
|
|||||||
# https://www.ndss-symposium.org/wp-content/uploads/2020/02/23087-paper.pdf
|
# https://www.ndss-symposium.org/wp-content/uploads/2020/02/23087-paper.pdf
|
||||||
[network.timeout]
|
[network.timeout]
|
||||||
tcp = "5s"
|
tcp = "5s"
|
||||||
|
http = "10s"
|
||||||
idle = "1m"
|
idle = "1m"
|
||||||
|
|
||||||
# FakeTLS can compare timestamps to prevent probes. Each message has
|
# FakeTLS can compare timestamps to prevent probes. Each message has
|
||||||
|
|||||||
Reference in New Issue
Block a user