From 203cfafe358529059f77e51deb258b18b41152da Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 17 Jan 2018 12:34:05 +0100 Subject: [PATCH] Add a forwarding rules example --- .travis.yml | 34 ++++++++++++++--------------- dnscrypt-proxy/dnscrypt-proxy.toml | 8 +++---- dnscrypt-proxy/forwarding-rules.txt | 13 +++++++++++ 3 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 dnscrypt-proxy/forwarding-rules.txt diff --git a/.travis.yml b/.travis.yml index 82f7ebcc..dda2f4d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,119 +22,119 @@ script: - env GOOS=windows GOARCH=386 go build - mkdir win32 - ln dnscrypt-proxy.exe win32/ - - ln dnscrypt-proxy.toml win32/ + - ln dnscrypt-proxy.toml forwarding-rules.txt win32/ - zip -9 -r dnscrypt-proxy-win32-${TRAVIS_TAG:-dev}.zip win32 - go clean - env GOOS=windows GOARCH=amd64 go build - mkdir win64 - ln dnscrypt-proxy.exe win64/ - - ln dnscrypt-proxy.toml win64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt win64/ - zip -9 -r dnscrypt-proxy-win64-${TRAVIS_TAG:-dev}.zip win64 - go clean - env GOOS=openbsd GOARCH=386 go build - mkdir openbsd-i386 - ln dnscrypt-proxy openbsd-i386/ - - ln dnscrypt-proxy.toml openbsd-i386/ + - ln dnscrypt-proxy.toml forwarding-rules.txt openbsd-i386/ - tar czpvf dnscrypt-proxy-openbsd_i386-${TRAVIS_TAG:-dev}.tar.gz openbsd-i386 - go clean - env GOOS=openbsd GOARCH=amd64 go build - mkdir openbsd-amd64 - ln dnscrypt-proxy openbsd-amd64/ - - ln dnscrypt-proxy.toml openbsd-amd64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt openbsd-amd64/ - tar czpvf dnscrypt-proxy-openbsd_amd64-${TRAVIS_TAG:-dev}.tar.gz openbsd-amd64 - go clean - env GOOS=freebsd GOARCH=386 go build - mkdir freebsd-i386 - ln dnscrypt-proxy freebsd-i386/ - - ln dnscrypt-proxy.toml freebsd-i386/ + - ln dnscrypt-proxy.toml forwarding-rules.txt freebsd-i386/ - tar czpvf dnscrypt-proxy-freebsd_i386-${TRAVIS_TAG:-dev}.tar.gz freebsd-i386 - go clean - env GOOS=freebsd GOARCH=amd64 go build - mkdir freebsd-amd64 - ln dnscrypt-proxy freebsd-amd64/ - - ln dnscrypt-proxy.toml freebsd-amd64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt freebsd-amd64/ - tar czpvf dnscrypt-proxy-freebsd_amd64-${TRAVIS_TAG:-dev}.tar.gz freebsd-amd64 - go clean - env GOOS=dragonfly GOARCH=amd64 go build - mkdir dragonflybsd-amd64 - ln dnscrypt-proxy dragonflybsd-amd64/ - - ln dnscrypt-proxy.toml dragonflybsd-amd64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt dragonflybsd-amd64/ - tar czpvf dnscrypt-proxy-dragonflybsd_amd64-${TRAVIS_TAG:-dev}.tar.gz dragonflybsd-amd64 - go clean - env GOOS=netbsd GOARCH=386 go build - mkdir netbsd-i386 - ln dnscrypt-proxy netbsd-i386/ - - ln dnscrypt-proxy.toml netbsd-i386/ + - ln dnscrypt-proxy.toml forwarding-rules.txt netbsd-i386/ - tar czpvf dnscrypt-proxy-netbsd_i386-${TRAVIS_TAG:-dev}.tar.gz netbsd-i386 - go clean - env GOOS=netbsd GOARCH=amd64 go build - mkdir netbsd-amd64 - ln dnscrypt-proxy netbsd-amd64/ - - ln dnscrypt-proxy.toml netbsd-amd64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt netbsd-amd64/ - tar czpvf dnscrypt-proxy-netbsd_amd64-${TRAVIS_TAG:-dev}.tar.gz netbsd-amd64 - go clean - env GOOS=linux GOARCH=386 go build - mkdir linux-i386 - ln dnscrypt-proxy linux-i386/ - - ln dnscrypt-proxy.toml linux-i386/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-i386/ - tar czpvf dnscrypt-proxy-linux_i386-${TRAVIS_TAG:-dev}.tar.gz linux-i386 - go clean - env GOOS=linux GOARCH=amd64 go build - mkdir linux-x86_64 - ln dnscrypt-proxy linux-x86_64/ - - ln dnscrypt-proxy.toml linux-x86_64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-x86_64/ - tar czpvf dnscrypt-proxy-linux_x86_64-${TRAVIS_TAG:-dev}.tar.gz linux-x86_64 - go clean - env GOOS=linux GOARCH=arm go build - mkdir linux-arm - ln dnscrypt-proxy linux-arm/ - - ln dnscrypt-proxy.toml linux-arm/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-arm/ - tar czpvf dnscrypt-proxy-linux_arm-${TRAVIS_TAG:-dev}.tar.gz linux-arm - go clean - env GOOS=linux GOARCH=arm64 go build - mkdir linux-arm64 - ln dnscrypt-proxy linux-arm64/ - - ln dnscrypt-proxy.toml linux-arm64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-arm64/ - tar czpvf dnscrypt-proxy-linux_arm64-${TRAVIS_TAG:-dev}.tar.gz linux-arm64 - go clean - env GOOS=linux GOARCH=mips go build - mkdir linux-mips - ln dnscrypt-proxy linux-mips/ - - ln dnscrypt-proxy.toml linux-mips/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips/ - tar czpvf dnscrypt-proxy-linux_mips-${TRAVIS_TAG:-dev}.tar.gz linux-mips - go clean - env GOOS=linux GOARCH=mips64 go build - mkdir linux-mips64 - ln dnscrypt-proxy linux-mips64/ - - ln dnscrypt-proxy.toml linux-mips64/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips64/ - tar czpvf dnscrypt-proxy-linux_mips64-${TRAVIS_TAG:-dev}.tar.gz linux-mips64 - go clean - env GOOS=linux GOARCH=mips64le go build - mkdir linux-mips64le - ln dnscrypt-proxy linux-mips64le/ - - ln dnscrypt-proxy.toml linux-mips64le/ + - ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips64le/ - tar czpvf dnscrypt-proxy-linux_mips64le-${TRAVIS_TAG:-dev}.tar.gz linux-mips64le - go clean - env GOOS=darwin GOARCH=amd64 go build - mkdir macos - ln dnscrypt-proxy macos/ - - ln dnscrypt-proxy.toml macos/ + - ln dnscrypt-proxy.toml forwarding-rules.txt macos/ - tar czpvf dnscrypt-proxy-macos-${TRAVIS_TAG:-dev}.tar.gz macos - ls -l dnscrypt-proxy-*.tar.gz dnscrypt-proxy-*.zip diff --git a/dnscrypt-proxy/dnscrypt-proxy.toml b/dnscrypt-proxy/dnscrypt-proxy.toml index 5bc1ea16..117d168d 100644 --- a/dnscrypt-proxy/dnscrypt-proxy.toml +++ b/dnscrypt-proxy/dnscrypt-proxy.toml @@ -59,11 +59,11 @@ block_ipv6 = false # Route queries for specific domains to a dedicated set of servers # ################################################################################## -# Example map entries (one entry per line): -# example.com: 9.9.9.9 -# example.net: 9.9.9.9,8.8.8.8 +## Example map entries (one entry per line): +## example.com: 9.9.9.9 +## example.net: 9.9.9.9,8.8.8.8 -forwarding_rules = "forwarding-rules.txt" +# forwarding_rules = "forwarding-rules.txt" diff --git a/dnscrypt-proxy/forwarding-rules.txt b/dnscrypt-proxy/forwarding-rules.txt new file mode 100644 index 00000000..3c04e9aa --- /dev/null +++ b/dnscrypt-proxy/forwarding-rules.txt @@ -0,0 +1,13 @@ +################################## +# Forwarding rules # +################################## + +## This is used to route specific domain names to specific servers. +## The general format is: : [, ...] +## Adresses can be IPv4 and IPv6, and include a non-standard port number. + +## In order to enable this feature, the "forwarding_rules" property needs to +## be set to that file name in the main configuration file. + +example.com: 9.9.9.9,8.8.8.8 +