Backtestshugorun-20261024-162305#15301

Issue #15301 Merged fix PR #15305 Run 24 Oct 2026 · run-20261024-162305 gohugoio/hugo

Improve/document security.http.urls override behavior

Better

Our patch was judged better than the merged fix.

In this judgment, Patch A = our agent, Patch B = the merged fix.

The issue asks to improve or better document the behavior where the dial-time private-address check is skipped when security.http.urls is customized. Patch A addresses exactly that: it factors the decision into HTTP.IsPrivateAddressAllowed, adds an explicit tri-state security.http.allowPrivateAddresses so users with a broad custom allowlist can keep the check (the reported security concern) and users with the default allowlist can opt out, and documents the whole mechanism in a dedicated 'Resolved address check' section with a warning and concrete examples. Its tests cover all four combinations at both the config level and the real transport, and would fail before the change. Patch B documents the existing behavior adequately (the independent docs test passes for both), but its code change is a different feature: it disables HTTP(S)_PROXY support by default and adds a proxyFromEnvironment knob. That is a breaking default-behavior change for users behind corporate proxies, is not what the issue asked for, and does nothing to let a user with a custom urls allowlist keep the private-address check. The proxy plumbing (context-carried proxy URL, canonicalAddr mirror, custom RoundTripper) adds nontrivial risk and surface area that obscures rather than improves the override behavior in question. Patch A is more correct for the stated issue, better tested for it, and tightly scoped.

Four judges ruled on this ticket in parallel, and the verdict comes from counting their votes. Each saw the issue and the two patches, labelled A and B in random order (two of them saw ours as A), with issue links and version numbers removed. Where tests could check the fix, they also saw the results of tests a separate agent wrote for the issue, run on both patches. None was told which patch was ours. The reasoning above is one judge's, shown verbatim.

Solve

23m 30s

Wall-clock time in the container

Full test suite

No new failures

907 passed · 2 skipped · 941 total

Contamination audit

Clean

No sign the agent saw the real fix

Patch size

159vs 167 merged

Changed lines, ours vs merged

In d6e6f9e500eebdeae8e28de830fff2e3bfc7d534 (unreleased) we added a dial-time URL validation to catch URLs that's valid according to the whitelist but that resolves to a loopback, private or link-local IP addresses. That check is skipped it if the user has a custom security.http.urls setup, as it would not make sense to block local development servers.

See CheckAllowedHTTPAddress.

This has been reported by @Reload3d as a potential security issue, and while I think the current behaviour is the pragmatic correct approach, I'm creating this issue for visibility and to see if this can be improved further (e.g. better documentation).

The two patches

Our patch+152 −7
config/security/securityConfig.goindex f7cc157b8..b2b84191c 100644@@ -133,6 +133,26 @@ type HTTP struct {  	// Media types where the Content-Type in the response is used instead of resolving from the file content. 	MediaTypes Whitelist `json:"mediaTypes"`++	// AllowPrivateAddresses controls whether remote fetches may connect to a+	// loopback, private, link-local or otherwise non-public IP address after+	// DNS resolution. When not set, private addresses are denied under the+	// default URLs allowlist and allowed when URLs has been customized.+	// Set it to false to keep denying private addresses with a custom URLs+	// allowlist, or to true to allow them with the default allowlist.+	AllowPrivateAddresses *bool `json:"allowPrivateAddresses,omitempty"`+}++// IsPrivateAddressAllowed reports whether a remote fetch may connect to a+// non-public IP address. See AllowPrivateAddresses.+func (h HTTP) IsPrivateAddressAllowed() bool {+	if h.AllowPrivateAddresses != nil {+		return *h.AllowPrivateAddresses+	}+	// If the user has customized the URLs allowlist they have opted into+	// whatever hosts they listed, including internal ones (e.g. a local dev+	// server), so we do not second-guess the resolved address.+	return !slices.Equal(h.URLs.patternsStrings, DefaultConfig.HTTP.URLs.patternsStrings) }  // Node holds Node.js security settings.@@ -223,13 +243,11 @@ func (c Config) CheckAllowedHTTPURL(u string) error { // the resolved address, so a hostname that resolves to a loopback, private or // link-local (including the cloud metadata endpoint) address would otherwise // satisfy the policy and let resources.GetRemote reach an internal endpoint.-// We deny any non–global-unicast or private address here to close that gap.+// We deny any non–global-unicast or private address here to close that gap,+// unless security.http.allowPrivateAddresses says otherwise (see+// HTTP.IsPrivateAddressAllowed). func (c Config) CheckAllowedHTTPAddress(network, address string) error {-	// Only enforced under the default hardened allowlist. If the user has-	// customized security.http.urls they have opted into whatever hosts they-	// listed, including internal ones (e.g. a local dev server), so we do not-	// second-guess the resolved address.-	if !slices.Equal(c.HTTP.URLs.patternsStrings, DefaultConfig.HTTP.URLs.patternsStrings) {+	if c.HTTP.IsPrivateAddressAllowed() { 		return nil 	} 	deny := func(name string) error {config/security/securityConfig_test.goindex 4ac059a67..66f149bdb 100644@@ -296,6 +296,77 @@ func TestCheckAllowedHTTPAddress(t *testing.T) { 	} } +// security.http.allowPrivateAddresses makes the resolved address check+// explicitly configurable, independent of whether security.http.urls has been+// customized.+func TestCheckAllowedHTTPAddressAllowPrivateAddresses(t *testing.T) {+	t.Parallel()++	decode := func(c *qt.C, tomlConfig string) Config {+		cfg, err := config.FromConfigString(tomlConfig, "toml")+		c.Assert(err, qt.IsNil)+		pc, err := DecodeConfig(cfg)+		c.Assert(err, qt.IsNil)+		return pc+	}++	const private = "127.0.0.1:1313"+	const public = "93.184.216.34:443"++	c := qt.New(t)++	c.Run("Default urls, not set", func(c *qt.C) {+		pc := decode(c, ``)+		c.Assert(pc.HTTP.IsPrivateAddressAllowed(), qt.IsFalse)+		c.Assert(pc.CheckAllowedHTTPAddress("tcp", private), qt.IsNotNil)+		c.Assert(pc.CheckAllowedHTTPAddress("tcp", public), qt.IsNil)+	})++	c.Run("Custom urls, not set", func(c *qt.C) {+		pc := decode(c, `+[security.http]+urls = ['.*']+`)+		c.Assert(pc.HTTP.IsPrivateAddressAllowed(), qt.IsTrue)+		c.Assert(pc.CheckAllowedHTTPAddress("tcp", private), qt.IsNil)+	})++	c.Run("Custom urls, false", func(c *qt.C) {+		pc := decode(c, `+[security.http]+urls = ['.*', '! ^https?://evil\.example\.com']+allowPrivateAddresses = false+`)+		c.Assert(pc.HTTP.IsPrivateAddressAllowed(), qt.IsFalse)+		for _, addr := range []string{private, "169.254.169.254:80", "10.0.0.1:80", "[::1]:80"} {+			err := pc.CheckAllowedHTTPAddress("tcp", addr)+			c.Assert(err, qt.IsNotNil, qt.Commentf(addr))+			c.Assert(IsAccessDenied(err), qt.IsTrue, qt.Commentf(addr))+		}+		c.Assert(pc.CheckAllowedHTTPAddress("tcp", public), qt.IsNil)+	})++	c.Run("Default urls, true", func(c *qt.C) {+		pc := decode(c, `+[security.http]+allowPrivateAddresses = true+`)+		c.Assert(pc.HTTP.IsPrivateAddressAllowed(), qt.IsTrue)+		c.Assert(pc.CheckAllowedHTTPAddress("tcp", private), qt.IsNil)+		// The URL text check is unaffected.+		c.Assert(pc.CheckAllowedHTTPURL("http://localhost:1313/"), qt.IsNotNil)+	})++	c.Run("Shown in ToTOML when set", func(c *qt.C) {+		pc := decode(c, `+[security.http]+allowPrivateAddresses = false+`)+		c.Assert(pc.ToTOML(), qt.Contains, "allowPrivateAddresses = false")+		c.Assert(DefaultConfig.ToTOML(), qt.Not(qt.Contains), "allowPrivateAddresses")+	})+}+ func TestCheckAllowedHTTPURLAtInPathIssue14825(t *testing.T) { 	t.Parallel() 	c := qt.New(t)docs/content/en/configuration/security.mdindex 9efbc0148..861438e9d 100644@@ -35,7 +35,11 @@ This is the default security configuration: : (`[]string`) Applicable to the `resources.GetRemote` function, a slice of [regular expressions](g) matching the `Content-Type` in HTTP responses that Hugo trusts, bypassing file content analysis for media type detection.  `http.urls`-: (`[]string`) A slice of [regular expressions](g) matching the URLs that the `resources.GetRemote` function is allowed to access.+: (`[]string`) A slice of [regular expressions](g) matching the URLs that the `resources.GetRemote` function is allowed to access. These patterns are matched against the URL text only. See [resolved address check](#resolved-address-check) for how Hugo treats host names that resolve to internal IP addresses.++`http.allowPrivateAddresses`+: {{< new-in 0.166.0 />}}+: (`bool`) Whether the `resources.GetRemote` function may connect to a loopback, private, link-local, or other non-public IP address after DNS resolution. If you do not set this, Hugo denies these addresses when `http.urls` has its default value and allows them when you have customized `http.urls`. See [resolved address check](#resolved-address-check).  `node.permissions.disable` : {{< new-in 0.161.0 />}}@@ -76,6 +80,35 @@ urls = ['.*', '! ^https?://evil\.example\.com']  Setting an allowlist to the string `none` will completely disable the associated feature. +## Resolved address check++{{< new-in 0.166.0 />}}++The `http.urls` allowlist only inspects the URL text. A host name that passes the allowlist can still resolve to an internal address, such as `127.0.0.1`, `10.0.0.1`, or the cloud metadata endpoint `169.254.169.254`. To guard against this, Hugo checks the resolved IP address when `resources.GetRemote` opens a connection, and it refuses to connect to a loopback, private, link-local, or other non-public address.++By default, Hugo applies this check only when `http.urls` has its default value. If you customize `http.urls`, Hugo assumes that you have chosen which hosts to allow, which may include a local development server or a host on your private network, and it skips the check.++> [!WARNING]+> If you customize `http.urls` with a broad pattern such as `.*`, and your templates fetch URLs that come from untrusted sources, such as front matter or data files, a host name that resolves to an internal address can make Hugo read from your private network. In that case, set `http.allowPrivateAddresses` to `false` to keep the check.++> [!NOTE]+> If you route requests through a proxy with the `HTTP_PROXY` or `HTTPS_PROXY` environment variables, Hugo checks the address of the proxy, not the address of the target host.++To customize `http.urls` and keep the resolved address check:++```toml+[security.http]+urls = ['.*', '! ^https?://evil\.example\.com']+allowPrivateAddresses = false+```++To keep the default `http.urls` allowlist and allow host names that resolve to internal addresses:++```toml+[security.http]+allowPrivateAddresses = true+```+ ## Environment variables  You can also override your project configuration with environment variables. For example, to block `resources.GetRemote` from accessing any URL:resources/resource_factories/create/remote_test.goindex f9830c842..8d6e6abfc 100644@@ -172,4 +172,27 @@ urls = ['.*'] 	resp, err := newSecureBaseTransport(sec).RoundTrip(req) 	c.Assert(err, qt.IsNil) 	resp.Body.Close()++	// Customized policy with allowPrivateAddresses = false: the dial check is+	// kept even though the URLs allowlist accepts everything.+	sec, err = security.DecodeConfig(config.FromTOMLConfigString(`+[security.http]+urls = ['.*']+allowPrivateAddresses = false+`))+	c.Assert(err, qt.IsNil)+	_, err = newSecureBaseTransport(sec).RoundTrip(req)+	c.Assert(err, qt.IsNotNil)+	c.Assert(security.IsAccessDenied(err), qt.IsTrue)++	// Default URLs allowlist with allowPrivateAddresses = true: the dial check+	// stands down.+	sec, err = security.DecodeConfig(config.FromTOMLConfigString(`+[security.http]+allowPrivateAddresses = true+`))+	c.Assert(err, qt.IsNil)+	resp, err = newSecureBaseTransport(sec).RoundTrip(req)+	c.Assert(err, qt.IsNil)+	resp.Body.Close() } 
Merged fix · PR #15305+163 −4
config/security/securityConfig.goindex f7cc157b8..a2708288a 100644@@ -128,6 +128,12 @@ type HTTP struct { 	// URLs to allow in remote HTTP (resources.Get, getJSON, getCSV). 	URLs Whitelist `json:"urls"` +	// Whether to honor the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment+	// variables for remote HTTP. Off by default, as a proxy hides the+	// resolved destination address from the security policy.+	// <docsmeta>{ "newIn": "0.166.0" }</docsmeta>+	ProxyFromEnvironment bool `json:"proxyFromEnvironment"`+ 	// HTTP methods to allow. 	Methods Whitelist `json:"methods"` config/security/securityConfig_test.goindex 4ac059a67..e6f8c68e3 100644@@ -135,7 +135,7 @@ func TestToTOML(t *testing.T) { 	got := DefaultConfig.ToTOML()  	c.Assert(got, qt.Equals,-		"[security]\n  allowContent = ['! ^text/html$', '! ^text/org$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass$', '^go$', '^git$', '^node$', '^postcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    urls = ['(?i)^https?://[a-z0-9]', '! (?i)^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false",+		"[security]\n  allowContent = ['! ^text/html$', '! ^text/org$']\n  enableInlineShortcodes = false\n\n  [security.exec]\n    allow = ['^(dart-)?sass$', '^go$', '^git$', '^node$', '^postcss$']\n    osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE|PROGRAMDATA)$']\n\n  [security.funcs]\n    getenv = ['^HUGO_', '^CI$']\n\n  [security.http]\n    methods = ['(?i)GET|POST']\n    proxyFromEnvironment = false\n    urls = ['(?i)^https?://[a-z0-9]', '! (?i)^https?://\\d+\\.', '! (?i)localhost', '! (?i)^https?://[^/?#]*@']\n\n  [security.node]\n    [security.node.permissions]\n      allowAddons = ['tailwindcss']\n      allowChildProcess = ['tailwindcss']\n      allowRead = ['.']\n      allowWorker = ['tailwindcss']\n      allowWrite = []\n      disable = false", 	) } @@ -156,6 +156,7 @@ func TestDecodeConfigDefault(t *testing.T) { 	c.Assert(pc.HTTP.Methods.Accept("get"), qt.IsTrue) 	c.Assert(pc.HTTP.Methods.Accept("DELETE"), qt.IsFalse) 	c.Assert(pc.HTTP.MediaTypes.Accept("application/msword"), qt.IsFalse)+	c.Assert(pc.HTTP.ProxyFromEnvironment, qt.IsFalse)  	c.Assert(pc.Exec.OsEnv.Accept("PATH"), qt.IsTrue) 	c.Assert(pc.Exec.OsEnv.Accept("GOROOT"), qt.IsTrue)docs/content/en/configuration/security.mdindex 9efbc0148..54ebb4521 100644@@ -34,9 +34,15 @@ This is the default security configuration: `http.mediaTypes` : (`[]string`) Applicable to the `resources.GetRemote` function, a slice of [regular expressions](g) matching the `Content-Type` in HTTP responses that Hugo trusts, bypassing file content analysis for media type detection. +`http.proxyFromEnvironment`+: {{< new-in 0.166.0 />}}+: (`bool`) Whether the `resources.GetRemote` function honors the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables. Default is `false`. When a proxy is used, Hugo connects to the proxy rather than the destination, so the resolved address validation described under `http.urls` does not apply.+ `http.urls` : (`[]string`) A slice of [regular expressions](g) matching the URLs that the `resources.GetRemote` function is allowed to access. +  The default allowlist denies URLs with an IP address or `localhost` as the host name. In addition, with the default allowlist, Hugo validates the resolved address when connecting and rejects connections to loopback, private, link-local, and other non-public addresses, e.g. a host name that resolves to a cloud metadata endpoint. This validation is disabled if you override `http.urls`, as the override may intentionally allow access to hosts on your local network, such as a development server.+ `node.permissions.disable` : {{< new-in 0.161.0 />}} : (`bool`) Whether to disable the Node.js [permission model][]. When `false`, Hugo runs Node.js tools with the `--permission` flag, restricting their file system and resource access to what is explicitly allowed below. Default is `false`.docs/data/docs.yamlindex e51915c49..6d2578339 100644@@ -2253,6 +2253,7 @@ config:       mediaTypes: null       methods:       - (?i)GET|POST+      proxyFromEnvironment: false       urls:       - (?i)^https?://[a-z0-9]       - '! (?i)^https?://\d+\.'resources/resource_factories/create/create.goindex a34f9fc7b..1570c2648 100644@@ -16,9 +16,11 @@ package create  import (+	"context" 	"errors" 	"net" 	"net/http"+	"net/url" 	"os" 	"path" 	"path/filepath"@@ -26,6 +28,8 @@ import ( 	"syscall" 	"time" +	"golang.org/x/net/http/httpproxy"+ 	"github.com/bep/helpers/contexthelpers"  	"github.com/bep/logg"@@ -65,6 +69,7 @@ type contextKey uint8  const ( 	contextKeyResourceID contextKey = iota+	contextKeyProxyURL )  // New creates a new Client with the given specification.@@ -154,17 +159,80 @@ func New(rs *resources.Spec) *Client { // hook that validates the resolved destination address against the security // policy, so a hostname resolving to an internal address cannot be used to // reach internal endpoints. See CheckAllowedHTTPAddress.+//+// Proxies are only used when security.http.proxyFromEnvironment is enabled.+// A proxied connection is dialed to the proxy, not the destination, so the+// address check is skipped for that dial; the user has opted into trusting+// the proxy with the destination. The proxy decision is carried per request+// in its context, so a direct dial is always validated, even to the proxy's+// own address. func newSecureBaseTransport(sec security.Config) http.RoundTripper { 	base := http.DefaultTransport.(*http.Transport).Clone()-	d := &net.Dialer{+	secureDialer := &net.Dialer{ 		Timeout:   30 * time.Second, 		KeepAlive: 30 * time.Second, 		Control: func(network, address string, _ syscall.RawConn) error { 			return sec.CheckAllowedHTTPAddress(network, address) 		}, 	}-	base.DialContext = d.DialContext-	return base+	base.Proxy = nil+	base.DialContext = secureDialer.DialContext++	if !sec.HTTP.ProxyFromEnvironment {+		return base+	}++	proxyFromCtx := func(ctx context.Context) *url.URL {+		u, _ := ctx.Value(contextKeyProxyURL).(*url.URL)+		return u+	}+	base.Proxy = func(req *http.Request) (*url.URL, error) {+		return proxyFromCtx(req.Context()), nil+	}+	proxyDialer := &net.Dialer{Timeout: secureDialer.Timeout, KeepAlive: secureDialer.KeepAlive}+	base.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {+		if u := proxyFromCtx(ctx); u != nil && canonicalAddr(u) == addr {+			return proxyDialer.DialContext(ctx, network, addr)+		}+		return secureDialer.DialContext(ctx, network, addr)+	}+	return &proxyTransport{base: base, proxyFunc: httpproxy.FromEnvironment().ProxyFunc()}+}++// proxyTransport resolves the proxy for each request up front and stores it+// in the request context, where both the Proxy and DialContext hooks of base+// can see it.+type proxyTransport struct {+	base      *http.Transport+	proxyFunc func(*url.URL) (*url.URL, error)+}++func (t *proxyTransport) RoundTrip(req *http.Request) (*http.Response, error) {+	u, err := t.proxyFunc(req.URL)+	if err != nil {+		return nil, err+	}+	if u != nil {+		req = req.WithContext(context.WithValue(req.Context(), contextKeyProxyURL, u))+	}+	return t.base.RoundTrip(req)+}++// canonicalAddr mirrors net/http's canonicalAddr: the host:port the transport+// dials for u, with the port defaulted from the scheme.+func canonicalAddr(u *url.URL) string {+	port := u.Port()+	if port == "" {+		switch u.Scheme {+		case "http":+			port = "80"+		case "https":+			port = "443"+		case "socks5", "socks5h":+			port = "1080"+		}+	}+	return net.JoinHostPort(u.Hostname(), port) }  // Copy copies r to the new targetPath.resources/resource_factories/create/remote_test.goindex f9830c842..d7bb98361 100644@@ -14,8 +14,10 @@ package create  import (+	"io" 	"net/http" 	"net/http/httptest"+	"sync/atomic" 	"testing"  	qt "github.com/frankban/quicktest"@@ -173,3 +175,78 @@ urls = ['.*'] 	c.Assert(err, qt.IsNil) 	resp.Body.Close() }++// Proxies from the environment are ignored unless+// security.http.proxyFromEnvironment is enabled. When enabled, the dial-time+// address check does not apply to the proxy itself. See issue 15302.+func TestSecureBaseTransportProxyFromEnvironment(t *testing.T) {+	c := qt.New(t)++	var proxyHits, targetHits atomic.Int32+	proxy := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+		proxyHits.Add(1)+		w.Write([]byte("via proxy"))+	}))+	t.Cleanup(proxy.Close)+	target := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+		targetHits.Add(1)+		w.Write([]byte("direct"))+	}))+	t.Cleanup(target.Close)++	t.Setenv("HTTP_PROXY", proxy.URL)+	t.Setenv("NO_PROXY", "")+	t.Setenv("no_proxy", "")++	decode := func(toml string) security.Config {+		sec, err := security.DecodeConfig(config.FromTOMLConfigString(toml))+		c.Assert(err, qt.IsNil)+		return sec+	}+	fetch := func(sec security.Config, u string) (string, error) {+		req, err := http.NewRequest("GET", u, nil)+		c.Assert(err, qt.IsNil)+		resp, err := newSecureBaseTransport(sec).RoundTrip(req)+		if err != nil {+			return "", err+		}+		defer resp.Body.Close()+		b, err := io.ReadAll(resp.Body)+		c.Assert(err, qt.IsNil)+		return string(b), nil+	}++	// Default: proxy ignored, fetched directly.+	body, err := fetch(decode(`+[security.http]+urls = ['.*']+`), target.URL)+	c.Assert(err, qt.IsNil)+	c.Assert(body, qt.Equals, "direct")+	c.Assert(proxyHits.Load(), qt.Equals, int32(0))+	c.Assert(targetHits.Load(), qt.Equals, int32(1))++	// Enabled: the loopback proxy is dialed even under the default hardened+	// policy, and the destination is never dialed directly.+	body, err = fetch(decode(`+[security.http]+proxyFromEnvironment = true+`), "http://example.com/")+	c.Assert(err, qt.IsNil)+	c.Assert(body, qt.Equals, "via proxy")+	c.Assert(proxyHits.Load(), qt.Equals, int32(1))+	c.Assert(targetHits.Load(), qt.Equals, int32(1))++	// Enabled, but loopback destinations are never proxied: the address+	// check still applies to the direct dial, also when the destination is+	// the proxy's own address.+	for _, u := range []string{target.URL, proxy.URL} {+		_, err = fetch(decode(`+[security.http]+proxyFromEnvironment = true+`), u)+		c.Assert(security.IsAccessDenied(err), qt.IsTrue, qt.Commentf(u))+	}+	c.Assert(proxyHits.Load(), qt.Equals, int32(1))+	c.Assert(targetHits.Load(), qt.Equals, int32(1))+}