mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-31 11:55:38 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82c5f0d327 | ||
|
|
602b3d6322 | ||
|
|
db0bd43256 | ||
|
|
06e3d67f79 | ||
|
|
d27aef852d | ||
|
|
6c561eb412 | ||
|
|
381bf28a69 | ||
|
|
0b0651a015 | ||
|
|
3130a747f8 | ||
|
|
fe9f9f9ad2 | ||
|
|
00c6af00ed | ||
|
|
04f3e029ac | ||
|
|
87b3eedded | ||
|
|
c57a45deaa | ||
|
|
8bc06acc6e | ||
|
|
0263a32c22 | ||
|
|
354d0377b3 | ||
|
|
59a47c881b | ||
|
|
dfba0c36c5 | ||
|
|
03da3a801f | ||
|
|
f13dea391f | ||
|
|
45edaad516 | ||
|
|
2179ee0054 | ||
|
|
6ddb1ad401 | ||
|
|
35e0835949 | ||
|
|
5c744889be | ||
|
|
cb1c336217 | ||
|
|
f82ac1118e | ||
|
|
e5fef5690e | ||
|
|
9c997f1491 | ||
|
|
d33fc60182 | ||
|
|
89bb7e95a6 | ||
|
|
c5a06988d5 | ||
|
|
ea57996685 | ||
|
|
0a1aa98a01 | ||
|
|
7ca84d162f | ||
|
|
0ea5c5015f | ||
|
|
65424da23f | ||
|
|
d35e6a6117 | ||
|
|
4a98f0997b | ||
|
|
b70babf43e | ||
|
|
967c43016c | ||
|
|
a10da0ed10 | ||
|
|
379aa917f9 | ||
|
|
1a90868fe9 | ||
|
|
fa6e999d54 | ||
|
|
72be4857a3 | ||
|
|
a5e8a7e089 | ||
|
|
6b7f3927db | ||
|
|
2e2b012c9d | ||
|
|
9e67d1b8bd | ||
|
|
b8c3122f54 | ||
|
|
65622feb5f |
8
.github/workflows/go.yml
vendored
8
.github/workflows/go.yml
vendored
@@ -10,18 +10,18 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21
|
||||
go-version: 1.25.6
|
||||
id: go
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Linux build
|
||||
run: |
|
||||
make
|
||||
|
||||
- name: Upload Linux build
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-amd64
|
||||
path: |
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
doh-server/doh-server
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
# A directory to store and save the cache
|
||||
path: ~/go/pkg/mod
|
||||
|
||||
36
.golangci.yml
Normal file
36
.golangci.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
issues:
|
||||
fix: true
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
- importas
|
||||
- depguard
|
||||
- lll
|
||||
- exhaustruct
|
||||
- perfsprint
|
||||
- gochecknoinits
|
||||
- wsl
|
||||
- exportloopref
|
||||
linters-settings:
|
||||
revive:
|
||||
enable-all-rules: true
|
||||
rules:
|
||||
- name: line-length-limit
|
||||
disabled: true
|
||||
gocritic:
|
||||
enabled-tags:
|
||||
- diagnostic
|
||||
- style
|
||||
- performance
|
||||
- experimental
|
||||
- opinionated
|
||||
govet:
|
||||
enable-all: true
|
||||
gci:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/m13253/dns-over-https/v2)
|
||||
gofumpt:
|
||||
extra-rules: true
|
||||
@@ -58,7 +58,7 @@ sudo make uninstall
|
||||
```bash
|
||||
docker run -d --name doh-server \
|
||||
-p 8053:8053 \
|
||||
-e UPSTREAM_DNS_SERVER="udp:8.8.8.8:53" \
|
||||
-e UPSTREAM_DNS_SERVER="udp:208.67.222.222:53,udp:208.67.220.220:53" \
|
||||
-e DOH_HTTP_PREFIX="/dns-query" \
|
||||
-e DOH_SERVER_LISTEN=":8053" \
|
||||
-e DOH_SERVER_TIMEOUT="10" \
|
||||
@@ -66,6 +66,7 @@ docker run -d --name doh-server \
|
||||
-e DOH_SERVER_VERBOSE="false" \
|
||||
satishweb/doh-server
|
||||
```
|
||||
Note: Multiple Upstream DNS server support was added in the container image on 2024-12-19.
|
||||
|
||||
Feeling adventurous? Try the latest build:
|
||||
|
||||
|
||||
@@ -90,6 +90,29 @@ func NewClient(conf *config.Config) (c *Client, err error) {
|
||||
Net: "tcp",
|
||||
Timeout: time.Duration(conf.Other.Timeout) * time.Second,
|
||||
}
|
||||
|
||||
if c.conf.Other.Interface != "" {
|
||||
localV4, localV6, err := c.getInterfaceIPs()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get interface IPs for %s: %v", c.conf.Other.Interface, err)
|
||||
}
|
||||
var localAddr net.IP
|
||||
if localV4 != nil {
|
||||
localAddr = localV4
|
||||
} else {
|
||||
localAddr = localV6
|
||||
}
|
||||
|
||||
c.udpClient.Dialer = &net.Dialer{
|
||||
Timeout: time.Duration(conf.Other.Timeout) * time.Second,
|
||||
LocalAddr: &net.UDPAddr{IP: localAddr},
|
||||
}
|
||||
c.tcpClient.Dialer = &net.Dialer{
|
||||
Timeout: time.Duration(conf.Other.Timeout) * time.Second,
|
||||
LocalAddr: &net.TCPAddr{IP: localAddr},
|
||||
}
|
||||
}
|
||||
|
||||
for _, addr := range conf.Listen {
|
||||
c.udpServers = append(c.udpServers, &dns.Server{
|
||||
Addr: addr,
|
||||
@@ -120,6 +143,38 @@ func NewClient(conf *config.Config) (c *Client, err error) {
|
||||
PreferGo: true,
|
||||
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
var d net.Dialer
|
||||
if c.conf.Other.Interface != "" {
|
||||
localV4, localV6, err := c.getInterfaceIPs()
|
||||
if err != nil {
|
||||
log.Printf("Bootstrap dial warning: %v", err)
|
||||
} else {
|
||||
numServers := len(c.bootstrap)
|
||||
bootstrap := c.bootstrap[rand.Intn(numServers)]
|
||||
host, _, _ := net.SplitHostPort(bootstrap)
|
||||
ip := net.ParseIP(host)
|
||||
if ip != nil {
|
||||
if ip.To4() != nil {
|
||||
if localV4 != nil {
|
||||
if strings.HasPrefix(network, "udp") {
|
||||
d.LocalAddr = &net.UDPAddr{IP: localV4}
|
||||
} else {
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV4}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if localV6 != nil {
|
||||
if strings.HasPrefix(network, "udp") {
|
||||
d.LocalAddr = &net.UDPAddr{IP: localV6}
|
||||
} else {
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV6}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
conn, err := d.DialContext(ctx, network, bootstrap)
|
||||
return conn, err
|
||||
}
|
||||
}
|
||||
numServers := len(c.bootstrap)
|
||||
bootstrap := c.bootstrap[rand.Intn(numServers)]
|
||||
conn, err := d.DialContext(ctx, network, bootstrap)
|
||||
@@ -235,14 +290,72 @@ func (c *Client) newHTTPClient() error {
|
||||
if c.httpTransport != nil {
|
||||
c.httpTransport.CloseIdleConnections()
|
||||
}
|
||||
dialer := &net.Dialer{
|
||||
|
||||
localV4, localV6, err := c.getInterfaceIPs()
|
||||
if err != nil {
|
||||
log.Printf("Interface binding error: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
baseDialer := &net.Dialer{
|
||||
Timeout: time.Duration(c.conf.Other.Timeout) * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
// DualStack: true,
|
||||
Resolver: c.bootstrapResolver,
|
||||
Resolver: c.bootstrapResolver,
|
||||
}
|
||||
|
||||
c.httpTransport = &http.Transport{
|
||||
DialContext: dialer.DialContext,
|
||||
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
if c.conf.Other.Interface == "" {
|
||||
return baseDialer.DialContext(ctx, network, addr)
|
||||
}
|
||||
|
||||
if network == "tcp4" && localV4 != nil {
|
||||
d := *baseDialer
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV4}
|
||||
return d.DialContext(ctx, network, addr)
|
||||
}
|
||||
if network == "tcp6" && localV6 != nil {
|
||||
d := *baseDialer
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV6}
|
||||
return d.DialContext(ctx, network, addr)
|
||||
}
|
||||
|
||||
// Manual Dual-Stack: Resolve host and try compatible families sequentially
|
||||
host, port, _ := net.SplitHostPort(addr)
|
||||
ips, err := c.bootstrapResolver.LookupIPAddr(ctx, host)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var lastErr error
|
||||
for _, ip := range ips {
|
||||
d := *baseDialer
|
||||
targetAddr := net.JoinHostPort(ip.String(), port)
|
||||
|
||||
if ip.IP.To4() != nil {
|
||||
if localV4 == nil {
|
||||
continue
|
||||
}
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV4}
|
||||
} else {
|
||||
if localV6 == nil {
|
||||
continue
|
||||
}
|
||||
d.LocalAddr = &net.TCPAddr{IP: localV6}
|
||||
}
|
||||
|
||||
conn, err := d.DialContext(ctx, "tcp", targetAddr)
|
||||
if err == nil {
|
||||
return conn, nil
|
||||
}
|
||||
lastErr = err
|
||||
}
|
||||
|
||||
if lastErr != nil {
|
||||
return nil, lastErr
|
||||
}
|
||||
return nil, fmt.Errorf("connection to %s failed: no matching local/remote IP families on interface %s", addr, c.conf.Other.Interface)
|
||||
},
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
MaxIdleConns: 100,
|
||||
@@ -251,15 +364,18 @@ func (c *Client) newHTTPClient() error {
|
||||
TLSHandshakeTimeout: time.Duration(c.conf.Other.Timeout) * time.Second,
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: c.conf.Other.TLSInsecureSkipVerify},
|
||||
}
|
||||
|
||||
if c.conf.Other.NoIPv6 {
|
||||
originalDial := c.httpTransport.DialContext
|
||||
c.httpTransport.DialContext = func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
if strings.HasPrefix(network, "tcp") {
|
||||
network = "tcp4"
|
||||
}
|
||||
return dialer.DialContext(ctx, network, address)
|
||||
return originalDial(ctx, network, address)
|
||||
}
|
||||
}
|
||||
err := http2.ConfigureTransport(c.httpTransport)
|
||||
|
||||
err = http2.ConfigureTransport(c.httpTransport)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -485,3 +601,38 @@ func (c *Client) findClientIP(w dns.ResponseWriter, r *dns.Msg) (ednsClientAddre
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// getInterfaceIPs returns the first valid IPv4 and IPv6 addresses found on the interface
|
||||
func (c *Client) getInterfaceIPs() (v4, v6 net.IP, err error) {
|
||||
if c.conf.Other.Interface == "" {
|
||||
return nil, nil, nil
|
||||
}
|
||||
ifi, err := net.InterfaceByName(c.conf.Other.Interface)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
addrs, err := ifi.Addrs()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
for _, addr := range addrs {
|
||||
ip, _, err := net.ParseCIDR(addr.String())
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if ip4 := ip.To4(); ip4 != nil {
|
||||
if v4 == nil {
|
||||
v4 = ip4
|
||||
}
|
||||
} else {
|
||||
if v6 == nil && !c.conf.Other.NoIPv6 {
|
||||
v6 = ip
|
||||
}
|
||||
}
|
||||
}
|
||||
if v4 == nil && v6 == nil {
|
||||
return nil, nil, fmt.Errorf("no valid IP addresses found on interface %s", c.conf.Other.Interface)
|
||||
}
|
||||
return v4, v6, nil
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ type others struct {
|
||||
Bootstrap []string `toml:"bootstrap"`
|
||||
Passthrough []string `toml:"passthrough"`
|
||||
Timeout uint `toml:"timeout"`
|
||||
Interface string `toml:"interface"`
|
||||
NoCookies bool `toml:"no_cookies"`
|
||||
NoECS bool `toml:"no_ecs"`
|
||||
NoIPv6 bool `toml:"no_ipv6"`
|
||||
|
||||
@@ -81,7 +81,9 @@ passthrough = [
|
||||
"captive.apple.com",
|
||||
"connectivitycheck.gstatic.com",
|
||||
"detectportal.firefox.com",
|
||||
"globalreachtech.com",
|
||||
"msftconnecttest.com",
|
||||
"network-auth.com",
|
||||
"nmcheck.gnome.org",
|
||||
|
||||
"pool.ntp.org",
|
||||
@@ -95,6 +97,11 @@ passthrough = [
|
||||
# Timeout for upstream request in seconds
|
||||
timeout = 30
|
||||
|
||||
# Interface to bind to for outgoing connections.
|
||||
# If empty, the system default route is used (usually eth0 or wlan0).
|
||||
# Example: "eth1", "wlan0"
|
||||
interface = ""
|
||||
|
||||
# Disable HTTP Cookies
|
||||
#
|
||||
# Cookies may be useful if your upstream resolver is protected by some
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
VERSION = "2.3.4"
|
||||
VERSION = "2.3.10"
|
||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||
)
|
||||
|
||||
@@ -62,7 +62,7 @@ func (s *Server) parseRequestIETF(ctx context.Context, w http.ResponseWriter, r
|
||||
if len(requestBinary) == 0 {
|
||||
return &DNSRequest{
|
||||
errcode: 400,
|
||||
errtext: fmt.Sprintf("Invalid argument value: \"dns\""),
|
||||
errtext: "Invalid argument value: \"dns\"",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
VERSION = "2.3.4"
|
||||
VERSION = "2.3.10"
|
||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||
)
|
||||
|
||||
17
go.mod
17
go.mod
@@ -1,19 +1,20 @@
|
||||
module github.com/m13253/dns-over-https/v2
|
||||
|
||||
go 1.20
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.3.2
|
||||
github.com/BurntSushi/toml v1.6.0
|
||||
github.com/gorilla/handlers v1.5.2
|
||||
github.com/infobloxopen/go-trees v0.0.0-20221216143356-66ceba885ebc
|
||||
github.com/miekg/dns v1.1.58
|
||||
golang.org/x/net v0.21.0
|
||||
github.com/miekg/dns v1.1.70
|
||||
golang.org/x/net v0.49.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
golang.org/x/mod v0.15.0 // indirect
|
||||
golang.org/x/sys v0.17.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/tools v0.17.0 // indirect
|
||||
golang.org/x/mod v0.32.0 // indirect
|
||||
golang.org/x/sync v0.19.0 // indirect
|
||||
golang.org/x/sys v0.40.0 // indirect
|
||||
golang.org/x/text v0.33.0 // indirect
|
||||
golang.org/x/tools v0.41.0 // indirect
|
||||
)
|
||||
|
||||
35
go.sum
35
go.sum
@@ -1,25 +1,30 @@
|
||||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
||||
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
|
||||
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
|
||||
github.com/infobloxopen/go-trees v0.0.0-20221216143356-66ceba885ebc h1:RhT2pjLo3EVRmldbEcBdeRA7CGPWsNEJC+Y/N1aXQbg=
|
||||
github.com/infobloxopen/go-trees v0.0.0-20221216143356-66ceba885ebc/go.mod h1:BaIJzjD2ZnHmx2acPF6XfGLPzNCMiBbMRqJr+8/8uRI=
|
||||
github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4=
|
||||
github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY=
|
||||
github.com/miekg/dns v1.1.70 h1:DZ4u2AV35VJxdD9Fo9fIWm119BsQL5cZU1cQ9s0LkqA=
|
||||
github.com/miekg/dns v1.1.70/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||
golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=
|
||||
golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU=
|
||||
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
|
||||
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
|
||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
||||
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
|
||||
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
|
||||
golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=
|
||||
golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
||||
@@ -4,13 +4,16 @@ Documentation=https://github.com/m13253/dns-over-https
|
||||
After=network.target
|
||||
Before=nss-lookup.target
|
||||
Wants=nss-lookup.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/local/bin/doh-client -conf /etc/dns-over-https/doh-client.conf
|
||||
LimitNOFILE=1048576
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
RestartSec=1s
|
||||
RestartMaxDelaySec=76s
|
||||
RestartSteps=9
|
||||
Type=simple
|
||||
DynamicUser=yes
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
Description=DNS-over-HTTPS Server
|
||||
Documentation=https://github.com/m13253/dns-over-https
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/local/bin/doh-server -conf /etc/dns-over-https/doh-server.conf
|
||||
LimitNOFILE=1048576
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
RestartSec=1s
|
||||
RestartMaxDelaySec=76s
|
||||
RestartSteps=9
|
||||
Type=simple
|
||||
DynamicUser=yes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user