aboutsummaryrefslogtreecommitdiff
path: root/lib/dns/server_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-03-26 05:34:30 +0700
committerShulhan <ms@kilabit.info>2026-03-26 05:34:30 +0700
commit5a765dc7f90c2ebc9a11cd79dcfbd8a8b8d99fcd (patch)
treedd98807227b3cbe3f85435c3b5cf743a1a9494f6 /lib/dns/server_example_test.go
parentb6ba871a86797ad2f028eab2e3820509c3a36109 (diff)
downloadpakakeh.go-5a765dc7f90c2ebc9a11cd79dcfbd8a8b8d99fcd.tar.xz
lib/dns: refactoring DoT and DoH to use address instead of port
Using port makes the IP address of DoT and DoH listen on the same address with UDP. If we set ListenAddress to 0.0.0.0 and TLS termination is handled by proxy, this cause DoT and DoH will also listen on all addresses.
Diffstat (limited to 'lib/dns/server_example_test.go')
-rw-r--r--lib/dns/server_example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns/server_example_test.go b/lib/dns/server_example_test.go
index c9222885..c14f2888 100644
--- a/lib/dns/server_example_test.go
+++ b/lib/dns/server_example_test.go
@@ -51,7 +51,7 @@ func ExampleServer() {
serverAddress = "127.0.0.1:5300"
serverOptions = &ServerOptions{
ListenAddress: "127.0.0.1:5300",
- HTTPPort: 8443,
+ DoHListen: "127.0.0.1:8443",
TLSCertFile: "testdata/domain.crt",
TLSPrivateKey: "testdata/domain.key",
TLSAllowInsecure: true,