aboutsummaryrefslogtreecommitdiff
path: root/plugin/proxy/response.go
blob: 2ad553c410b2781e91d8821227f2ec0b198a7b3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package proxy

import (
	"net"

	"github.com/miekg/dns"
)

type fakeBootWriter struct {
	dns.ResponseWriter
}

func (w *fakeBootWriter) LocalAddr() net.Addr {
	local := net.ParseIP("127.0.0.1")
	return &net.UDPAddr{IP: local, Port: 53} // Port is not used here
}

func (w *fakeBootWriter) RemoteAddr() net.Addr {
	remote := net.ParseIP("8.8.8.8")
	return &net.UDPAddr{IP: remote, Port: 53} // Port is not used here
}