mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-31 18:25:38 +00:00
Compare commits
36 Commits
v2.2.3
...
docs/READM
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80e95cd028 | ||
|
|
1d59772fad | ||
|
|
a375bea95d | ||
|
|
b98b01cc4e | ||
|
|
6276bed46f | ||
|
|
19737361ad | ||
|
|
791d2d43dd | ||
|
|
90753c3910 | ||
|
|
221240a840 | ||
|
|
b338c7ae52 | ||
|
|
9fd69439c4 | ||
|
|
10eb8f5c87 | ||
|
|
8cd4c4205d | ||
|
|
63c6c1de91 | ||
|
|
f25e9a706d | ||
|
|
a2e3b0cd4b | ||
|
|
f172a7b7fb | ||
|
|
56a01679ad | ||
|
|
05c3b1676d | ||
|
|
5af0d538ca | ||
|
|
0bbd26c1b5 | ||
|
|
8a13f085a6 | ||
|
|
849bc584cc | ||
|
|
5f8371817b | ||
|
|
2e36b4ebcd | ||
|
|
02dbd9d954 | ||
|
|
0a76416f8e | ||
|
|
82c50163c1 | ||
|
|
d5c1c592f6 | ||
|
|
1cf98e87c9 | ||
|
|
e7461f2d85 | ||
|
|
608394e2d2 | ||
|
|
eb166ececa | ||
|
|
f557e4aa29 | ||
|
|
967faec56c | ||
|
|
2aa7370aaf |
37
.github/workflows/go.yml
vendored
Normal file
37
.github/workflows/go.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: Go build for Linux
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Linux build
|
||||||
|
run: |
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Upload Linux build
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: linux-amd64
|
||||||
|
path: |
|
||||||
|
doh-client/doh-client
|
||||||
|
doh-server/doh-server
|
||||||
|
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
# A directory to store and save the cache
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
# An explicit key for restoring and saving the cache
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}
|
||||||
19
Changelog.md
19
Changelog.md
@@ -4,6 +4,25 @@ This Changelog records major changes between versions.
|
|||||||
|
|
||||||
Not all changes are recorded. Please check git log for details.
|
Not all changes are recorded. Please check git log for details.
|
||||||
|
|
||||||
|
## Version 2.3.1
|
||||||
|
|
||||||
|
- No new features in this release
|
||||||
|
- Bumped versions of Go toolchain and third-party dependencies, requested by #128
|
||||||
|
|
||||||
|
## Version 2.3.0
|
||||||
|
|
||||||
|
- The repository now conforms to the Go semvar standard (Fixed #115, thanks to @leiless)
|
||||||
|
|
||||||
|
## Version 2.2.5
|
||||||
|
|
||||||
|
- Add client certificate authentication
|
||||||
|
- Fixing documentation related to Docker
|
||||||
|
|
||||||
|
## Version 2.2.4
|
||||||
|
|
||||||
|
- Add options to configure ECS netmask length
|
||||||
|
- Add an option to disable TLS verification (Note: dangerous)
|
||||||
|
|
||||||
## Version 2.2.3
|
## Version 2.2.3
|
||||||
|
|
||||||
- Use the library ipTree to determine whether an IP is global routable, improving the performance
|
- Use the library ipTree to determine whether an IP is global routable, improving the performance
|
||||||
|
|||||||
16
Makefile
16
Makefile
@@ -1,15 +1,11 @@
|
|||||||
.PHONY: all clean install uninstall deps
|
.PHONY: all clean install uninstall
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
||||||
ifeq ($(GOROOT),)
|
ifeq ($(GOROOT),)
|
||||||
GOBUILD = go build
|
GOBUILD = go build
|
||||||
GOGET = go get -d -v
|
|
||||||
GOGET_UPDATE = go get -d -u -v
|
|
||||||
else
|
else
|
||||||
GOBUILD = $(GOROOT)/bin/go build
|
GOBUILD = $(GOROOT)/bin/go build
|
||||||
GOGET = $(GOROOT)/bin/go get -d -v
|
|
||||||
GOGET_UPDATE = $(GOROOT)/bin/go get -d -u -v
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(shell uname),Darwin)
|
||||||
@@ -57,14 +53,8 @@ uninstall:
|
|||||||
$(MAKE) -C launchd uninstall "DESTDIR=$(DESTDIR)"; \
|
$(MAKE) -C launchd uninstall "DESTDIR=$(DESTDIR)"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
deps:
|
doh-client/doh-client: doh-client/client.go doh-client/config/config.go doh-client/google.go doh-client/ietf.go doh-client/main.go doh-client/version.go json-dns/error.go json-dns/globalip.go json-dns/marshal.go json-dns/response.go json-dns/unmarshal.go
|
||||||
@# I am not sure if it is the correct way to keep the common library updated
|
|
||||||
$(GOGET_UPDATE) github.com/m13253/dns-over-https/doh-client/config
|
|
||||||
$(GOGET_UPDATE) github.com/m13253/dns-over-https/json-dns
|
|
||||||
$(GOGET) ./doh-client ./doh-server
|
|
||||||
|
|
||||||
doh-client/doh-client: deps doh-client/client.go doh-client/config/config.go doh-client/google.go doh-client/ietf.go doh-client/main.go doh-client/version.go json-dns/error.go json-dns/globalip.go json-dns/marshal.go json-dns/response.go json-dns/unmarshal.go
|
|
||||||
cd doh-client && $(GOBUILD)
|
cd doh-client && $(GOBUILD)
|
||||||
|
|
||||||
doh-server/doh-server: deps doh-server/config.go doh-server/google.go doh-server/ietf.go doh-server/main.go doh-server/server.go doh-server/version.go json-dns/error.go json-dns/globalip.go json-dns/marshal.go json-dns/response.go json-dns/unmarshal.go
|
doh-server/doh-server: doh-server/config.go doh-server/google.go doh-server/ietf.go doh-server/main.go doh-server/server.go doh-server/version.go json-dns/error.go json-dns/globalip.go json-dns/marshal.go json-dns/response.go json-dns/unmarshal.go
|
||||||
cd doh-server && $(GOBUILD)
|
cd doh-server && $(GOBUILD)
|
||||||
|
|||||||
29
Readme.md
29
Readme.md
@@ -11,7 +11,7 @@ and [IETF DNS-over-HTTPS (RFC 8484)](https://www.rfc-editor.org/rfc/rfc8484.txt)
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
### From Source
|
### From Source
|
||||||
- Install [Go](https://golang.org), at least version 1.10.
|
- Install [Go](https://golang.org), at least version 1.13. The newer the better.
|
||||||
> Note for Debian/Ubuntu users: You need to set `$GOROOT` if you could not get your new version of Go selected by the Makefile.)
|
> Note for Debian/Ubuntu users: You need to set `$GOROOT` if you could not get your new version of Go selected by the Makefile.)
|
||||||
|
|
||||||
- First create an empty directory, used for `$GOPATH`:
|
- First create an empty directory, used for `$GOPATH`:
|
||||||
@@ -56,17 +56,21 @@ sudo make uninstall
|
|||||||
|
|
||||||
### Using docker image
|
### Using docker image
|
||||||
```bash
|
```bash
|
||||||
docker run -itd --name doh-server \
|
docker run -d --name doh-server \
|
||||||
-p 8053:8053 \
|
-p 8053:8053 \
|
||||||
-e UPSTREAM_DNS_SERVER="udp:8.8.8.8:53" \
|
-e UPSTREAM_DNS_SERVER="udp:8.8.8.8:53" \
|
||||||
-e DOH_HTTP_PREFIX="/dns-query"
|
-e DOH_HTTP_PREFIX="/dns-query" \
|
||||||
-e DOH_SERVER_LISTEN=":8053"
|
-e DOH_SERVER_LISTEN=":8053" \
|
||||||
-e DOH_SERVER_TIMEOUT="10"
|
-e DOH_SERVER_TIMEOUT="10" \
|
||||||
-e DOH_SERVER_TRIES="3"
|
-e DOH_SERVER_TRIES="3" \
|
||||||
-e DOH_SERVER_VERBOSE="false"
|
-e DOH_SERVER_VERBOSE="false" \
|
||||||
satishweb/doh-server
|
satishweb/doh-server
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Logging
|
||||||
|
|
||||||
|
All log lines (by either doh-client or doh-server) are written into `stderr`; you can view them using your OS tool of choice (`journalctl` when using systemd).
|
||||||
|
|
||||||
## Server Configuration
|
## Server Configuration
|
||||||
|
|
||||||
The following is a typical DNS-over-HTTPS architecture:
|
The following is a typical DNS-over-HTTPS architecture:
|
||||||
@@ -170,10 +174,11 @@ my.server.name {
|
|||||||
version: '2.2'
|
version: '2.2'
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
# The official v2 Traefik docker image
|
# The official v2 Traefik docker image
|
||||||
image: traefik:v2.2
|
image: traefik:v2.3
|
||||||
hostname: proxy
|
hostname: proxy
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
@@ -266,8 +271,6 @@ services:
|
|||||||
|
|
||||||
> Complete Guide available at: https://github.com/satishweb/docker-doh
|
> Complete Guide available at: https://github.com/satishweb/docker-doh
|
||||||
|
|
||||||
> No IPV6 Support: Docker Swarm does not support IPV6 as of yet. Issue is logged [here](https://github.com/moby/moby/issues/24379)
|
|
||||||
|
|
||||||
> IPV6 Support for Docker Compose based configuration TBA
|
> IPV6 Support for Docker Compose based configuration TBA
|
||||||
|
|
||||||
## DNSSEC
|
## DNSSEC
|
||||||
@@ -316,6 +319,10 @@ Currently supported features are:
|
|||||||
- [X] EDNS0 large UDP packet (4 KiB by default)
|
- [X] EDNS0 large UDP packet (4 KiB by default)
|
||||||
- [X] EDNS0-Client-Subnet (/24 for IPv4, /56 for IPv6 by default)
|
- [X] EDNS0-Client-Subnet (/24 for IPv4, /56 for IPv6 by default)
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
* it does not work well with [dnscrypt-proxy](https://github.com/DNSCrypt/dnscrypt-proxy), you might want to use either (or fix the compatibility bugs by submitting PRs)
|
||||||
|
|
||||||
## The name of the project
|
## The name of the project
|
||||||
|
|
||||||
This project is named "DNS-over-HTTPS" because it was written before the IETF DoH project. Although this project is compatible with IETF DoH, the project is not affiliated with IETF.
|
This project is named "DNS-over-HTTPS" because it was written before the IETF DoH project. Although this project is compatible with IETF DoH, the project is not affiliated with IETF.
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
@@ -37,9 +38,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/m13253/dns-over-https/doh-client/config"
|
"github.com/m13253/dns-over-https/v2/doh-client/config"
|
||||||
"github.com/m13253/dns-over-https/doh-client/selector"
|
"github.com/m13253/dns-over-https/v2/doh-client/selector"
|
||||||
jsondns "github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"golang.org/x/net/http2"
|
"golang.org/x/net/http2"
|
||||||
"golang.org/x/net/idna"
|
"golang.org/x/net/idna"
|
||||||
@@ -247,6 +248,7 @@ func (c *Client) newHTTPClient() error {
|
|||||||
MaxIdleConnsPerHost: 10,
|
MaxIdleConnsPerHost: 10,
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
TLSHandshakeTimeout: time.Duration(c.conf.Other.Timeout) * time.Second,
|
TLSHandshakeTimeout: time.Duration(c.conf.Other.Timeout) * time.Second,
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: c.conf.Other.TLSInsecureSkipVerify},
|
||||||
}
|
}
|
||||||
if c.conf.Other.NoIPv6 {
|
if c.conf.Other.NoIPv6 {
|
||||||
c.httpTransport.DialContext = func(ctx context.Context, network, address string) (net.Conn, error) {
|
c.httpTransport.DialContext = func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||||
|
|||||||
@@ -47,15 +47,16 @@ type upstream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type others struct {
|
type others struct {
|
||||||
Bootstrap []string `toml:"bootstrap"`
|
Bootstrap []string `toml:"bootstrap"`
|
||||||
Passthrough []string `toml:"passthrough"`
|
Passthrough []string `toml:"passthrough"`
|
||||||
Timeout uint `toml:"timeout"`
|
Timeout uint `toml:"timeout"`
|
||||||
NoCookies bool `toml:"no_cookies"`
|
NoCookies bool `toml:"no_cookies"`
|
||||||
NoECS bool `toml:"no_ecs"`
|
NoECS bool `toml:"no_ecs"`
|
||||||
NoIPv6 bool `toml:"no_ipv6"`
|
NoIPv6 bool `toml:"no_ipv6"`
|
||||||
NoUserAgent bool `toml:"no_user_agent"`
|
NoUserAgent bool `toml:"no_user_agent"`
|
||||||
Verbose bool `toml:"verbose"`
|
Verbose bool `toml:"verbose"`
|
||||||
DebugHTTPHeaders []string `toml:"debug_http_headers"`
|
DebugHTTPHeaders []string `toml:"debug_http_headers"`
|
||||||
|
TLSInsecureSkipVerify bool `toml:"insecure_tls_skip_verify"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|||||||
@@ -132,3 +132,9 @@ no_user_agent = false
|
|||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
verbose = false
|
verbose = false
|
||||||
|
|
||||||
|
# insecure_tls_skip_verification will disable necessary TLS security verification.
|
||||||
|
# This option is designed for testing or development purposes,
|
||||||
|
# turning on this option on public Internet may cause your connection
|
||||||
|
# vulnerable to MITM attack.
|
||||||
|
insecure_tls_skip_verify = false
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/m13253/dns-over-https/doh-client/selector"
|
"github.com/m13253/dns-over-https/v2/doh-client/selector"
|
||||||
"github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/m13253/dns-over-https/doh-client/selector"
|
"github.com/m13253/dns-over-https/v2/doh-client/selector"
|
||||||
jsondns "github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/m13253/dns-over-https/doh-client/config"
|
"github.com/m13253/dns-over-https/v2/doh-client/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkPIDFile(pidFile string) (bool, error) {
|
func checkPIDFile(pidFile string) (bool, error) {
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VERSION = "2.2.3"
|
VERSION = "2.3.2"
|
||||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -31,17 +31,21 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
Listen []string `toml:"listen"`
|
Listen []string `toml:"listen"`
|
||||||
LocalAddr string `toml:"local_addr"`
|
LocalAddr string `toml:"local_addr"`
|
||||||
Cert string `toml:"cert"`
|
Cert string `toml:"cert"`
|
||||||
Key string `toml:"key"`
|
Key string `toml:"key"`
|
||||||
Path string `toml:"path"`
|
Path string `toml:"path"`
|
||||||
Upstream []string `toml:"upstream"`
|
Upstream []string `toml:"upstream"`
|
||||||
Timeout uint `toml:"timeout"`
|
Timeout uint `toml:"timeout"`
|
||||||
Tries uint `toml:"tries"`
|
Tries uint `toml:"tries"`
|
||||||
Verbose bool `toml:"verbose"`
|
Verbose bool `toml:"verbose"`
|
||||||
DebugHTTPHeaders []string `toml:"debug_http_headers"`
|
DebugHTTPHeaders []string `toml:"debug_http_headers"`
|
||||||
LogGuessedIP bool `toml:"log_guessed_client_ip"`
|
LogGuessedIP bool `toml:"log_guessed_client_ip"`
|
||||||
|
ECSAllowNonGlobalIP bool `toml:"ecs_allow_non_global_ip"`
|
||||||
|
ECSUsePreciseIP bool `toml:"ecs_use_precise_ip"`
|
||||||
|
TLSClientAuth bool `toml:"tls_client_auth"`
|
||||||
|
TLSClientAuthCA string `toml:"tls_client_auth_ca"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadConfig(path string) (*config, error) {
|
func loadConfig(path string) (*config, error) {
|
||||||
|
|||||||
@@ -51,3 +51,28 @@ verbose = false
|
|||||||
# Enable log IP from HTTPS-reverse proxy header: X-Forwarded-For or X-Real-IP
|
# Enable log IP from HTTPS-reverse proxy header: X-Forwarded-For or X-Real-IP
|
||||||
# Note: http uri/useragent log cannot be controlled by this config
|
# Note: http uri/useragent log cannot be controlled by this config
|
||||||
log_guessed_client_ip = false
|
log_guessed_client_ip = false
|
||||||
|
|
||||||
|
# By default, non global IP addresses are never forwarded to upstream servers.
|
||||||
|
# This is to prevent two things from happening:
|
||||||
|
# 1. the upstream server knowing your private LAN addresses;
|
||||||
|
# 2. the upstream server unable to provide geographically near results,
|
||||||
|
# or even fail to provide any result.
|
||||||
|
# However, if you are deploying a split tunnel corporation network
|
||||||
|
# environment, or for any other reason you want to inhibit this
|
||||||
|
# behavior and allow local (eg RFC1918) address to be forwarded,
|
||||||
|
# change the following option to "true".
|
||||||
|
ecs_allow_non_global_ip = false
|
||||||
|
|
||||||
|
# If ECS is added to the request, let the full IP address or
|
||||||
|
# cap it to 24 or 128 mask. This option is to be used only on private
|
||||||
|
# networks where knwoledge of the terminal endpoint may be required for
|
||||||
|
# security purposes (eg. DNS Firewalling). Not a good option on the
|
||||||
|
# internet where IP address may be used to identify the user and
|
||||||
|
# not only the approximate location.
|
||||||
|
ecs_use_precise_ip = false
|
||||||
|
|
||||||
|
# If DOH is used for a controlled network, it is possible to enable
|
||||||
|
# the client TLS certificate validation with a specific certificate
|
||||||
|
# authority used to sign any client one. Disabled by default.
|
||||||
|
# tls_client_auth = true
|
||||||
|
# tls_client_auth_ca = "root-ca-public.crt"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"golang.org/x/net/idna"
|
"golang.org/x/net/idna"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
jsondns "github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -125,6 +125,7 @@ func (s *Server) parseRequestIETF(ctx context.Context, w http.ResponseWriter, r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
isTailored := edns0Subnet == nil
|
isTailored := edns0Subnet == nil
|
||||||
|
|
||||||
if edns0Subnet == nil {
|
if edns0Subnet == nil {
|
||||||
ednsClientFamily := uint16(0)
|
ednsClientFamily := uint16(0)
|
||||||
ednsClientAddress := s.findClientIP(r)
|
ednsClientAddress := s.findClientIP(r)
|
||||||
@@ -133,10 +134,20 @@ func (s *Server) parseRequestIETF(ctx context.Context, w http.ResponseWriter, r
|
|||||||
if ipv4 := ednsClientAddress.To4(); ipv4 != nil {
|
if ipv4 := ednsClientAddress.To4(); ipv4 != nil {
|
||||||
ednsClientFamily = 1
|
ednsClientFamily = 1
|
||||||
ednsClientAddress = ipv4
|
ednsClientAddress = ipv4
|
||||||
ednsClientNetmask = 24
|
if s.conf.ECSUsePreciseIP {
|
||||||
|
ednsClientNetmask = 32
|
||||||
|
} else {
|
||||||
|
ednsClientNetmask = 24
|
||||||
|
ednsClientAddress = ednsClientAddress.Mask(net.CIDRMask(24, 32))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ednsClientFamily = 2
|
ednsClientFamily = 2
|
||||||
ednsClientNetmask = 56
|
if s.conf.ECSUsePreciseIP {
|
||||||
|
ednsClientNetmask = 128
|
||||||
|
} else {
|
||||||
|
ednsClientNetmask = 56
|
||||||
|
ednsClientAddress = ednsClientAddress.Mask(net.CIDRMask(56, 128))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
edns0Subnet = new(dns.EDNS0_SUBNET)
|
edns0Subnet = new(dns.EDNS0_SUBNET)
|
||||||
edns0Subnet.Code = dns.EDNS0SUBNET
|
edns0Subnet.Code = dns.EDNS0SUBNET
|
||||||
@@ -195,7 +206,9 @@ func (s *Server) generateResponseIETF(ctx context.Context, w http.ResponseWriter
|
|||||||
// Workaround a bug causing DNSCrypt-Proxy to expect a response with TransactionID = 0xcafe
|
// Workaround a bug causing DNSCrypt-Proxy to expect a response with TransactionID = 0xcafe
|
||||||
func (s *Server) patchDNSCryptProxyReqID(w http.ResponseWriter, r *http.Request, requestBinary []byte) bool {
|
func (s *Server) patchDNSCryptProxyReqID(w http.ResponseWriter, r *http.Request, requestBinary []byte) bool {
|
||||||
if strings.Contains(r.UserAgent(), "dnscrypt-proxy") && bytes.Equal(requestBinary, []byte("\xca\xfe\x01\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x02\x00\x01\x00\x00\x29\x10\x00\x00\x00\x80\x00\x00\x00")) {
|
if strings.Contains(r.UserAgent(), "dnscrypt-proxy") && bytes.Equal(requestBinary, []byte("\xca\xfe\x01\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00\x00\x02\x00\x01\x00\x00\x29\x10\x00\x00\x00\x80\x00\x00\x00")) {
|
||||||
log.Println("DNSCrypt-Proxy detected. Patching response.")
|
if s.conf.Verbose {
|
||||||
|
log.Println("DNSCrypt-Proxy detected. Patching response.")
|
||||||
|
}
|
||||||
w.Header().Set("Content-Type", "application/dns-message")
|
w.Header().Set("Content-Type", "application/dns-message")
|
||||||
w.Header().Set("Vary", "Accept, User-Agent")
|
w.Header().Set("Vary", "Accept, User-Agent")
|
||||||
now := time.Now().UTC().Format(http.TimeFormat)
|
now := time.Now().UTC().Format(http.TimeFormat)
|
||||||
@@ -209,7 +222,9 @@ func (s *Server) patchDNSCryptProxyReqID(w http.ResponseWriter, r *http.Request,
|
|||||||
// Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message
|
// Workaround a bug causing Firefox 61-62 to reject responses with Content-Type = application/dns-message
|
||||||
func (s *Server) patchFirefoxContentType(w http.ResponseWriter, r *http.Request, req *DNSRequest) bool {
|
func (s *Server) patchFirefoxContentType(w http.ResponseWriter, r *http.Request, req *DNSRequest) bool {
|
||||||
if strings.Contains(r.UserAgent(), "Firefox") && strings.Contains(r.Header.Get("Accept"), "application/dns-udpwireformat") && !strings.Contains(r.Header.Get("Accept"), "application/dns-message") {
|
if strings.Contains(r.UserAgent(), "Firefox") && strings.Contains(r.Header.Get("Accept"), "application/dns-udpwireformat") && !strings.Contains(r.Header.Get("Accept"), "application/dns-message") {
|
||||||
log.Println("Firefox 61-62 detected. Patching response.")
|
if s.conf.Verbose {
|
||||||
|
log.Println("Firefox 61-62 detected. Patching response.")
|
||||||
|
}
|
||||||
w.Header().Set("Content-Type", "application/dns-udpwireformat")
|
w.Header().Set("Content-Type", "application/dns-udpwireformat")
|
||||||
w.Header().Set("Vary", "Accept, User-Agent")
|
w.Header().Set("Vary", "Accept, User-Agent")
|
||||||
req.isTailored = true
|
req.isTailored = true
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/tls"
|
||||||
|
"crypto/x509"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
"net"
|
||||||
@@ -35,7 +38,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
jsondns "github.com/m13253/dns-over-https/json-dns"
|
jsondns "github.com/m13253/dns-over-https/v2/json-dns"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -107,12 +110,48 @@ func (s *Server) Start() error {
|
|||||||
if s.conf.Verbose {
|
if s.conf.Verbose {
|
||||||
servemux = handlers.CombinedLoggingHandler(os.Stdout, servemux)
|
servemux = handlers.CombinedLoggingHandler(os.Stdout, servemux)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var clientCAPool *x509.CertPool
|
||||||
|
if s.conf.TLSClientAuth {
|
||||||
|
if s.conf.TLSClientAuthCA != "" {
|
||||||
|
clientCA, err := ioutil.ReadFile(s.conf.TLSClientAuthCA)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Reading certificate for client authentication has failed: %v", err)
|
||||||
|
}
|
||||||
|
clientCAPool = x509.NewCertPool()
|
||||||
|
clientCAPool.AppendCertsFromPEM(clientCA)
|
||||||
|
log.Println("Certificate loaded for client TLS authentication")
|
||||||
|
} else {
|
||||||
|
log.Fatalln("TLS client authentication requires both tls_client_auth and tls_client_auth_ca, exiting.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
results := make(chan error, len(s.conf.Listen))
|
results := make(chan error, len(s.conf.Listen))
|
||||||
for _, addr := range s.conf.Listen {
|
for _, addr := range s.conf.Listen {
|
||||||
go func(addr string) {
|
go func(addr string) {
|
||||||
var err error
|
var err error
|
||||||
if s.conf.Cert != "" || s.conf.Key != "" {
|
if s.conf.Cert != "" || s.conf.Key != "" {
|
||||||
err = http.ListenAndServeTLS(addr, s.conf.Cert, s.conf.Key, servemux)
|
if clientCAPool != nil {
|
||||||
|
srvtls := &http.Server{
|
||||||
|
Handler: servemux,
|
||||||
|
Addr: addr,
|
||||||
|
TLSConfig: &tls.Config{
|
||||||
|
ClientCAs: clientCAPool,
|
||||||
|
ClientAuth: tls.RequireAndVerifyClientCert,
|
||||||
|
GetCertificate: func(info *tls.ClientHelloInfo) (certificate *tls.Certificate, e error) {
|
||||||
|
c, err := tls.LoadX509KeyPair(s.conf.Cert, s.conf.Key)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Error loading server certificate key pair: %v\n", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &c, nil
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
err = srvtls.ListenAndServeTLS("", "")
|
||||||
|
} else {
|
||||||
|
err = http.ListenAndServeTLS(addr, s.conf.Cert, s.conf.Key, servemux)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
err = http.ListenAndServe(addr, servemux)
|
err = http.ListenAndServe(addr, servemux)
|
||||||
}
|
}
|
||||||
@@ -229,8 +268,7 @@ func (s *Server) handlerFunc(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
req = s.patchRootRD(req)
|
req = s.patchRootRD(req)
|
||||||
|
|
||||||
var err error
|
err := s.doDNSQuery(ctx, req)
|
||||||
req, err = s.doDNSQuery(ctx, req)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
jsondns.FormatError(w, fmt.Sprintf("DNS query failure (%s)", err.Error()), 503)
|
jsondns.FormatError(w, fmt.Sprintf("DNS query failure (%s)", err.Error()), 503)
|
||||||
return
|
return
|
||||||
@@ -265,15 +303,17 @@ func (s *Server) findClientIP(r *http.Request) net.IP {
|
|||||||
if XRealIP != "" {
|
if XRealIP != "" {
|
||||||
addr := strings.TrimSpace(XRealIP)
|
addr := strings.TrimSpace(XRealIP)
|
||||||
ip := net.ParseIP(addr)
|
ip := net.ParseIP(addr)
|
||||||
if jsondns.IsGlobalIP(ip) {
|
if s.conf.ECSAllowNonGlobalIP || jsondns.IsGlobalIP(ip) {
|
||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteAddr, err := net.ResolveTCPAddr("tcp", r.RemoteAddr)
|
remoteAddr, err := net.ResolveTCPAddr("tcp", r.RemoteAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if ip := remoteAddr.IP; jsondns.IsGlobalIP(ip) {
|
ip := remoteAddr.IP
|
||||||
|
if s.conf.ECSAllowNonGlobalIP || jsondns.IsGlobalIP(ip) {
|
||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -299,7 +339,7 @@ func (s *Server) indexQuestionType(msg *dns.Msg, qtype uint16) int {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) doDNSQuery(ctx context.Context, req *DNSRequest) (resp *DNSRequest, err error) {
|
func (s *Server) doDNSQuery(ctx context.Context, req *DNSRequest) (err error) {
|
||||||
numServers := len(s.conf.Upstream)
|
numServers := len(s.conf.Upstream)
|
||||||
for i := uint(0); i < s.conf.Tries; i++ {
|
for i := uint(0); i < s.conf.Tries; i++ {
|
||||||
req.currentUpstream = s.conf.Upstream[rand.Intn(numServers)]
|
req.currentUpstream = s.conf.Upstream[rand.Intn(numServers)]
|
||||||
@@ -309,7 +349,7 @@ func (s *Server) doDNSQuery(ctx context.Context, req *DNSRequest) (resp *DNSRequ
|
|||||||
switch t {
|
switch t {
|
||||||
default:
|
default:
|
||||||
log.Printf("invalid DNS type %q in upstream %q", t, upstream)
|
log.Printf("invalid DNS type %q in upstream %q", t, upstream)
|
||||||
return nil, &configError{"invalid DNS type"}
|
return &configError{"invalid DNS type"}
|
||||||
// Use DNS-over-TLS (DoT) if configured to do so
|
// Use DNS-over-TLS (DoT) if configured to do so
|
||||||
case "tcp-tls":
|
case "tcp-tls":
|
||||||
req.response, _, err = s.tcpClientTLS.ExchangeContext(ctx, req.request, upstream)
|
req.response, _, err = s.tcpClientTLS.ExchangeContext(ctx, req.request, upstream)
|
||||||
@@ -334,9 +374,9 @@ func (s *Server) doDNSQuery(ctx context.Context, req *DNSRequest) (resp *DNSRequ
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return req, nil
|
return nil
|
||||||
}
|
}
|
||||||
log.Printf("DNS error from upstream %s: %s\n", req.currentUpstream, err.Error())
|
log.Printf("DNS error from upstream %s: %s\n", req.currentUpstream, err.Error())
|
||||||
}
|
}
|
||||||
return req, err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VERSION = "2.2.3"
|
VERSION = "2.3.2"
|
||||||
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
|
||||||
)
|
)
|
||||||
|
|||||||
24
go.mod
24
go.mod
@@ -1,14 +1,20 @@
|
|||||||
module github.com/m13253/dns-over-https
|
module github.com/m13253/dns-over-https/v2
|
||||||
|
|
||||||
go 1.12
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/BurntSushi/toml v0.3.1
|
github.com/BurntSushi/toml v1.2.0
|
||||||
github.com/gorilla/handlers v1.4.0
|
github.com/gorilla/handlers v1.5.1
|
||||||
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9
|
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9
|
||||||
github.com/miekg/dns v1.1.31
|
github.com/miekg/dns v1.1.50
|
||||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de // indirect
|
golang.org/x/net v0.0.0-20220812174116-3211cb980234
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
)
|
||||||
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 // indirect
|
|
||||||
golang.org/x/text v0.3.2 // indirect
|
require (
|
||||||
|
github.com/felixge/httpsnoop v1.0.1 // indirect
|
||||||
|
golang.org/x/mod v0.4.2 // indirect
|
||||||
|
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
|
||||||
|
golang.org/x/text v0.3.7 // indirect
|
||||||
|
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2 // indirect
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
59
go.sum
59
go.sum
@@ -1,40 +1,51 @@
|
|||||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/gorilla/handlers v1.4.0 h1:XulKRWSQK5uChr4pEgSE4Tc/OcmnU9GJuSwdog/tZsA=
|
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
|
||||||
github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
|
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
|
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||||
|
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
||||||
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 h1:w66aaP3c6SIQ0pi3QH1Tb4AMO3aWoEPxd1CNvLphbkA=
|
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 h1:w66aaP3c6SIQ0pi3QH1Tb4AMO3aWoEPxd1CNvLphbkA=
|
||||||
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9/go.mod h1:BaIJzjD2ZnHmx2acPF6XfGLPzNCMiBbMRqJr+8/8uRI=
|
github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9/go.mod h1:BaIJzjD2ZnHmx2acPF6XfGLPzNCMiBbMRqJr+8/8uRI=
|
||||||
github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo=
|
github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA=
|
||||||
github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
|
github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
|
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
|
||||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
|
golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||||
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
|
||||||
|
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2 h1:BonxutuHCTL0rBDnZlKjpGIQFTjyUVTexFOdWkB6Fg0=
|
||||||
|
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||||
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
|||||||
Reference in New Issue
Block a user