Frontend rewritten in TypeScript, added Node 18 support
This commit is contained in:
@@ -28,7 +28,7 @@ type URLFilterID = int
|
||||
// The IDs of built-in filter lists.
|
||||
//
|
||||
// NOTE: Do not change without the need for it and keep in sync with
|
||||
// client/src/helpers/constants.js.
|
||||
// client/src/helpers/constants.ts.
|
||||
//
|
||||
// TODO(a.garipov): Add type [URLFilterID] once it is used consistently in
|
||||
// package filtering.
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
// httpClient returns a new HTTP client that uses the AdGuard Home's own DNS
|
||||
@@ -22,7 +23,7 @@ func httpClient() (c *http.Client) {
|
||||
|
||||
return &http.Client{
|
||||
// TODO(a.garipov): Make configurable.
|
||||
Timeout: writeTimeout,
|
||||
Timeout: time.Minute * 5,
|
||||
Transport: &http.Transport{
|
||||
DialContext: dialContext,
|
||||
Proxy: httpProxy,
|
||||
|
||||
@@ -14,7 +14,7 @@ type Theme string
|
||||
|
||||
// Allowed [Theme] values.
|
||||
//
|
||||
// Keep in sync with client/src/helpers/constants.js.
|
||||
// Keep in sync with client/src/helpers/constants.ts.
|
||||
const (
|
||||
ThemeAuto Theme = "auto"
|
||||
ThemeLight Theme = "light"
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"golang.org/x/net/http2/h2c"
|
||||
)
|
||||
|
||||
// TODO(a.garipov): Make configurable.
|
||||
const (
|
||||
// readTimeout is the maximum duration for reading the entire request,
|
||||
// including the body.
|
||||
@@ -32,7 +31,7 @@ const (
|
||||
readHdrTimeout = 60 * time.Second
|
||||
// writeTimeout is the maximum duration before timing out writes of the
|
||||
// response.
|
||||
writeTimeout = 5 * time.Minute
|
||||
writeTimeout = 60 * time.Second
|
||||
)
|
||||
|
||||
type webConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user