aboutsummaryrefslogtreecommitdiff
path: root/lib/dns/dns_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/dns_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/dns_test.go')
-rw-r--r--lib/dns/dns_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/dns/dns_test.go b/lib/dns/dns_test.go
index 48212766..7f52af80 100644
--- a/lib/dns/dns_test.go
+++ b/lib/dns/dns_test.go
@@ -14,7 +14,6 @@ import (
const (
testServerAddress = "127.0.0.1:5300"
testDoTServerAddress = "127.0.0.1:18053"
- testTLSPort = 18053
// Equal to 2023-08-05 07:53:20 +0000 UTC.
testNowEpoch = 1691222000
@@ -47,8 +46,8 @@ func runServer() {
var (
serverOptions = &ServerOptions{
ListenAddress: "127.0.0.1:5300",
- HTTPPort: 8443,
- TLSPort: testTLSPort,
+ DoHListen: `127.0.0.1:8443`,
+ DoTListen: testDoTServerAddress,
TLSCertFile: "testdata/domain.crt",
TLSPrivateKey: "testdata/domain.key",
TLSAllowInsecure: true,