Skip to content

Commit 203cfaf

Browse files
committed
Add a forwarding rules example
1 parent adcdb94 commit 203cfaf

3 files changed

Lines changed: 34 additions & 21 deletions

File tree

.travis.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,119 +22,119 @@ script:
2222
- env GOOS=windows GOARCH=386 go build
2323
- mkdir win32
2424
- ln dnscrypt-proxy.exe win32/
25-
- ln dnscrypt-proxy.toml win32/
25+
- ln dnscrypt-proxy.toml forwarding-rules.txt win32/
2626
- zip -9 -r dnscrypt-proxy-win32-${TRAVIS_TAG:-dev}.zip win32
2727

2828
- go clean
2929
- env GOOS=windows GOARCH=amd64 go build
3030
- mkdir win64
3131
- ln dnscrypt-proxy.exe win64/
32-
- ln dnscrypt-proxy.toml win64/
32+
- ln dnscrypt-proxy.toml forwarding-rules.txt win64/
3333
- zip -9 -r dnscrypt-proxy-win64-${TRAVIS_TAG:-dev}.zip win64
3434

3535
- go clean
3636
- env GOOS=openbsd GOARCH=386 go build
3737
- mkdir openbsd-i386
3838
- ln dnscrypt-proxy openbsd-i386/
39-
- ln dnscrypt-proxy.toml openbsd-i386/
39+
- ln dnscrypt-proxy.toml forwarding-rules.txt openbsd-i386/
4040
- tar czpvf dnscrypt-proxy-openbsd_i386-${TRAVIS_TAG:-dev}.tar.gz openbsd-i386
4141

4242
- go clean
4343
- env GOOS=openbsd GOARCH=amd64 go build
4444
- mkdir openbsd-amd64
4545
- ln dnscrypt-proxy openbsd-amd64/
46-
- ln dnscrypt-proxy.toml openbsd-amd64/
46+
- ln dnscrypt-proxy.toml forwarding-rules.txt openbsd-amd64/
4747
- tar czpvf dnscrypt-proxy-openbsd_amd64-${TRAVIS_TAG:-dev}.tar.gz openbsd-amd64
4848

4949
- go clean
5050
- env GOOS=freebsd GOARCH=386 go build
5151
- mkdir freebsd-i386
5252
- ln dnscrypt-proxy freebsd-i386/
53-
- ln dnscrypt-proxy.toml freebsd-i386/
53+
- ln dnscrypt-proxy.toml forwarding-rules.txt freebsd-i386/
5454
- tar czpvf dnscrypt-proxy-freebsd_i386-${TRAVIS_TAG:-dev}.tar.gz freebsd-i386
5555

5656
- go clean
5757
- env GOOS=freebsd GOARCH=amd64 go build
5858
- mkdir freebsd-amd64
5959
- ln dnscrypt-proxy freebsd-amd64/
60-
- ln dnscrypt-proxy.toml freebsd-amd64/
60+
- ln dnscrypt-proxy.toml forwarding-rules.txt freebsd-amd64/
6161
- tar czpvf dnscrypt-proxy-freebsd_amd64-${TRAVIS_TAG:-dev}.tar.gz freebsd-amd64
6262

6363
- go clean
6464
- env GOOS=dragonfly GOARCH=amd64 go build
6565
- mkdir dragonflybsd-amd64
6666
- ln dnscrypt-proxy dragonflybsd-amd64/
67-
- ln dnscrypt-proxy.toml dragonflybsd-amd64/
67+
- ln dnscrypt-proxy.toml forwarding-rules.txt dragonflybsd-amd64/
6868
- tar czpvf dnscrypt-proxy-dragonflybsd_amd64-${TRAVIS_TAG:-dev}.tar.gz dragonflybsd-amd64
6969

7070
- go clean
7171
- env GOOS=netbsd GOARCH=386 go build
7272
- mkdir netbsd-i386
7373
- ln dnscrypt-proxy netbsd-i386/
74-
- ln dnscrypt-proxy.toml netbsd-i386/
74+
- ln dnscrypt-proxy.toml forwarding-rules.txt netbsd-i386/
7575
- tar czpvf dnscrypt-proxy-netbsd_i386-${TRAVIS_TAG:-dev}.tar.gz netbsd-i386
7676

7777
- go clean
7878
- env GOOS=netbsd GOARCH=amd64 go build
7979
- mkdir netbsd-amd64
8080
- ln dnscrypt-proxy netbsd-amd64/
81-
- ln dnscrypt-proxy.toml netbsd-amd64/
81+
- ln dnscrypt-proxy.toml forwarding-rules.txt netbsd-amd64/
8282
- tar czpvf dnscrypt-proxy-netbsd_amd64-${TRAVIS_TAG:-dev}.tar.gz netbsd-amd64
8383

8484
- go clean
8585
- env GOOS=linux GOARCH=386 go build
8686
- mkdir linux-i386
8787
- ln dnscrypt-proxy linux-i386/
88-
- ln dnscrypt-proxy.toml linux-i386/
88+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-i386/
8989
- tar czpvf dnscrypt-proxy-linux_i386-${TRAVIS_TAG:-dev}.tar.gz linux-i386
9090

9191
- go clean
9292
- env GOOS=linux GOARCH=amd64 go build
9393
- mkdir linux-x86_64
9494
- ln dnscrypt-proxy linux-x86_64/
95-
- ln dnscrypt-proxy.toml linux-x86_64/
95+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-x86_64/
9696
- tar czpvf dnscrypt-proxy-linux_x86_64-${TRAVIS_TAG:-dev}.tar.gz linux-x86_64
9797

9898
- go clean
9999
- env GOOS=linux GOARCH=arm go build
100100
- mkdir linux-arm
101101
- ln dnscrypt-proxy linux-arm/
102-
- ln dnscrypt-proxy.toml linux-arm/
102+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-arm/
103103
- tar czpvf dnscrypt-proxy-linux_arm-${TRAVIS_TAG:-dev}.tar.gz linux-arm
104104

105105
- go clean
106106
- env GOOS=linux GOARCH=arm64 go build
107107
- mkdir linux-arm64
108108
- ln dnscrypt-proxy linux-arm64/
109-
- ln dnscrypt-proxy.toml linux-arm64/
109+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-arm64/
110110
- tar czpvf dnscrypt-proxy-linux_arm64-${TRAVIS_TAG:-dev}.tar.gz linux-arm64
111111

112112
- go clean
113113
- env GOOS=linux GOARCH=mips go build
114114
- mkdir linux-mips
115115
- ln dnscrypt-proxy linux-mips/
116-
- ln dnscrypt-proxy.toml linux-mips/
116+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips/
117117
- tar czpvf dnscrypt-proxy-linux_mips-${TRAVIS_TAG:-dev}.tar.gz linux-mips
118118

119119
- go clean
120120
- env GOOS=linux GOARCH=mips64 go build
121121
- mkdir linux-mips64
122122
- ln dnscrypt-proxy linux-mips64/
123-
- ln dnscrypt-proxy.toml linux-mips64/
123+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips64/
124124
- tar czpvf dnscrypt-proxy-linux_mips64-${TRAVIS_TAG:-dev}.tar.gz linux-mips64
125125

126126
- go clean
127127
- env GOOS=linux GOARCH=mips64le go build
128128
- mkdir linux-mips64le
129129
- ln dnscrypt-proxy linux-mips64le/
130-
- ln dnscrypt-proxy.toml linux-mips64le/
130+
- ln dnscrypt-proxy.toml forwarding-rules.txt linux-mips64le/
131131
- tar czpvf dnscrypt-proxy-linux_mips64le-${TRAVIS_TAG:-dev}.tar.gz linux-mips64le
132132

133133
- go clean
134134
- env GOOS=darwin GOARCH=amd64 go build
135135
- mkdir macos
136136
- ln dnscrypt-proxy macos/
137-
- ln dnscrypt-proxy.toml macos/
137+
- ln dnscrypt-proxy.toml forwarding-rules.txt macos/
138138
- tar czpvf dnscrypt-proxy-macos-${TRAVIS_TAG:-dev}.tar.gz macos
139139

140140
- ls -l dnscrypt-proxy-*.tar.gz dnscrypt-proxy-*.zip

dnscrypt-proxy/dnscrypt-proxy.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ block_ipv6 = false
5959
# Route queries for specific domains to a dedicated set of servers #
6060
##################################################################################
6161

62-
# Example map entries (one entry per line):
63-
# example.com: 9.9.9.9
64-
# example.net: 9.9.9.9,8.8.8.8
62+
## Example map entries (one entry per line):
63+
## example.com: 9.9.9.9
64+
## example.net: 9.9.9.9,8.8.8.8
6565

66-
forwarding_rules = "forwarding-rules.txt"
66+
# forwarding_rules = "forwarding-rules.txt"
6767

6868

6969

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
##################################
2+
# Forwarding rules #
3+
##################################
4+
5+
## This is used to route specific domain names to specific servers.
6+
## The general format is: <domain>: <server address> [, <server address>...]
7+
## Adresses can be IPv4 and IPv6, and include a non-standard port number.
8+
9+
## In order to enable this feature, the "forwarding_rules" property needs to
10+
## be set to that file name in the main configuration file.
11+
12+
example.com: 9.9.9.9,8.8.8.8
13+

0 commit comments

Comments
 (0)