From e167b85d3bc55a9ae9cea6617ed5ba59910e8390 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Fri, 12 Mar 2021 16:19:52 +0300 Subject: [PATCH] Add HTTP timeout --- config/config.go | 2 ++ example.config.toml | 1 + 2 files changed, 3 insertions(+) diff --git a/config/config.go b/config/config.go index 0dd64ed..c97075b 100644 --- a/config/config.go +++ b/config/config.go @@ -34,6 +34,7 @@ type Config struct { } `json:"public-ip"` Timeout struct { TCP TypeDuration `json:"tcp"` + HTTP TypeDuration `json:"http"` Idle TypeDuration `json:"idle"` } `json:"timeout"` DOHIP TypeIP `json:"doh-ip"` @@ -103,6 +104,7 @@ type configRaw struct { } `toml:"public-ip" json:"public-ip,omitempty"` Timeout struct { TCP string `toml:"tcp" json:"tcp,omitempty"` + HTTP string `toml:"http" json:"http,omitempty"` Idle string `toml:"idle" json:"idle,omitempty"` } `toml:"timeout" json:"timeout,omitempty"` DOHIP string `toml:"doh-ip" json:"doh-ip,omitempty"` diff --git a/example.config.toml b/example.config.toml index de9eeb6..cf18a31 100644 --- a/example.config.toml +++ b/example.config.toml @@ -111,6 +111,7 @@ ipv6 = "" # https://www.ndss-symposium.org/wp-content/uploads/2020/02/23087-paper.pdf [network.timeout] tcp = "5s" +http = "10s" idle = "1m" # FakeTLS can compare timestamps to prevent probes. Each message has