Skip to content

Commit 827469d

Browse files
committed
proxy: imp code;
1 parent 3ed2ad5 commit 827469d

5 files changed

Lines changed: 132 additions & 132 deletions

File tree

proxy/bogusnxdomain_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestProxy_IsBogusNXDomain(t *testing.T) {
7878
}}
7979

8080
u := testUpstream{}
81-
prx.UpstreamConf.Upstreams = []upstream.Upstream{&u}
81+
prx.upstreamConf.Upstreams = []upstream.Upstream{&u}
8282

8383
servicetest.RequireRun(t, prx, testTimeout)
8484

proxy/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ type HTTPConfig struct {
278278
//
279279
// TODO(s.chzhen): Use [validate.Interface] from golibs.
280280
func (p *Proxy) validateConfig() (err error) {
281-
err = p.UpstreamConf.validate()
281+
err = p.upstreamConf.validate()
282282
if err != nil {
283283
return fmt.Errorf("general upstreams: %w", err)
284284
}
@@ -291,7 +291,7 @@ func (p *Proxy) validateConfig() (err error) {
291291
}
292292

293293
err = p.Fallbacks.validate()
294-
// Allow [Proxy.fallbacks] to be nil, but not empty. nil means not to use
294+
// Allow [Proxy.Fallbacks] to be nil, but not empty. nil means not to use
295295
// fallbacks at all.
296296
if errors.Is(err, upstream.ErrNoUpstreams) {
297297
return fmt.Errorf("fallbacks: %w", err)
@@ -389,7 +389,7 @@ func (p *Proxy) validateTLSConfig() (err error) {
389389
// hasListenAddrs - is there any addresses to listen to?
390390
func (p *Proxy) hasListenAddrs() (ok bool) {
391391
return p.UDPListenAddr != nil ||
392-
p.tcpListenAddr != nil ||
392+
p.TCPListenAddr != nil ||
393393
p.TLSListenAddr != nil ||
394394
(p.httpConf != nil && p.httpConf.ListenAddresses != nil) ||
395395
p.QUICListenAddr != nil ||

proxy/dns64.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (p *Proxy) setupDNS64(dns64Prefs netutil.SliceSubnetSet) (err error) {
5353

5454
for i, pref := range dns64Prefs {
5555
if !pref.Addr().Is6() {
56-
return fmt.Errorf("prefix at index %d: %q is not an IPv6 prefix", i, pref)
56+
return fmt.Errorf("prefix at index %d: %q is not an ipv6 prefix", i, pref)
5757
}
5858

5959
if pref.Bits() > maxNAT64PrefixBitLen {

0 commit comments

Comments
 (0)