diff --git a/.gitignore b/.gitignore
index 78d61cdf..77c43738 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,9 @@ coverage.txt
# Test output
dnsfilter/tests/top-1m.csv
dnsfilter/tests/dnsfilter.TestLotsOfRules*.pprof
+
+# Snapcraft build temporary files
+*.snap
+launchpad_credentials
+snapcraft_login
+snapcraft.yaml.bak
\ No newline at end of file
diff --git a/.golangci.yml b/.golangci.yml
index 341a62d4..60b7ee1c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -13,6 +13,7 @@ run:
skip-files:
- ".*generated.*"
- dnsfilter/rule_to_regexp.go
+ - util/pprof.go
- ".*_test.go"
@@ -65,5 +66,7 @@ issues:
- Error return value of ..*.Shutdown.
# goconst
- string .forcesafesearch.google.com. has 3 occurrences
+ # gosec: Profiling endpoint is automatically exposed on /debug/pprof
+ - G108
# gosec: Subprocess launched with function call as argument or cmd arguments
- - G204
\ No newline at end of file
+ - G204
diff --git a/.travis.yml b/.travis.yml
index fd369c2e..b2e5a2dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -86,7 +86,7 @@ matrix:
- node -v
- npm -v
# Prepare releases
- - ./release.sh
+ - ./build_release.sh
- ls -l dist
deploy:
@@ -118,4 +118,4 @@ matrix:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
- ./build_docker.sh
after_script:
- - docker images
+ - docker images
diff --git a/AGHTechDoc.md b/AGHTechDoc.md
index 4c8e0fda..5a3b001c 100644
--- a/AGHTechDoc.md
+++ b/AGHTechDoc.md
@@ -882,6 +882,9 @@ Response:
200 OK
{
+ "upstream_dns": ["tls://...", ...],
+ "bootstrap_dns": ["1.2.3.4", ...],
+
"protection_enabled": true | false,
"ratelimit": 1234,
"blocking_mode": "default" | "nxdomain" | "null_ip" | "custom_ip",
@@ -890,6 +893,8 @@ Response:
"edns_cs_enabled": true | false,
"dnssec_enabled": true | false
"disable_ipv6": true | false,
+ "fastest_addr": true | false, // use Fastest Address algorithm
+ "parallel_requests": true | false, // send DNS requests to all upstream servers at once
}
@@ -900,6 +905,9 @@ Request:
POST /control/dns_config
{
+ "upstream_dns": ["tls://...", ...],
+ "bootstrap_dns": ["1.2.3.4", ...],
+
"protection_enabled": true | false,
"ratelimit": 1234,
"blocking_mode": "default" | "nxdomain" | "null_ip" | "custom_ip",
@@ -908,6 +916,8 @@ Request:
"edns_cs_enabled": true | false,
"dnssec_enabled": true | false
"disable_ipv6": true | false,
+ "fastest_addr": true | false, // use Fastest Address algorithm
+ "parallel_requests": true | false, // send DNS requests to all upstream servers at once
}
Response:
diff --git a/Makefile b/Makefile
index 74934562..ff32c957 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@ GOPATH := $(shell go env GOPATH)
JSFILES = $(shell find client -path client/node_modules -prune -o -type f -name '*.js')
STATIC = build/static/index.html
CHANNEL ?= release
+DOCKER_IMAGE_DEV_NAME=adguardhome-dev
+DOCKERFILE=packaging/docker/Dockerfile
+DOCKERFILE_HUB=packaging/docker/Dockerfile.travis
TARGET=AdGuardHome
@@ -26,6 +29,11 @@ $(TARGET): $(STATIC) *.go home/*.go dhcpd/*.go dnsfilter/*.go dnsforward/*.go
CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=$(GIT_VERSION) -X main.channel=$(CHANNEL) -X main.goarm=$(GOARM)" -asmflags="-trimpath=$(PWD)" -gcflags="-trimpath=$(PWD)"
PATH=$(GOPATH)/bin:$(PATH) packr clean
+docker:
+ docker build -t "$(DOCKER_IMAGE_DEV_NAME)" -f "$(DOCKERFILE)" .
+ @echo Now you can run the docker image:
+ @echo docker run --name "$(DOCKER_IMAGE_DEV_NAME)" -p 53:53/tcp -p 53:53/udp -p 3000:3000/tcp $(DOCKER_IMAGE_DEV_NAME)
+
clean:
$(MAKE) cleanfast
rm -rf build
diff --git a/README.md b/README.md
index 99575e34..9cf5953e 100644
--- a/README.md
+++ b/README.md
@@ -26,9 +26,19 @@
+
+
+
+
+
+
+
+
+
+