Commit Graph

7 Commits

Author SHA1 Message Date
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Phil Estes
b395f2f9a9
Merge pull request #5160 from MadhavJivrajani/master
Use net.IP.IsLoopback() to match loopback addresses
2021-03-17 09:37:17 -04:00
Madhav Jivrajani
8f863afd3a Use net.IP.IsLoopback() to match loopback addresses
- changed the `MatchLocalhost` function in remotes/docker/registry.go
	- Make use of SplitHostPort to split host and port number
- Added additional tests for modified code in remotes/docker/registry_test.go
- Note: this does not handle mathcing of IP addresses in octal, decimal or hex format or a mix of these.

Fixes: #5129

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-03-15 09:57:01 +05:30
Derek McGowan
35eeb24a17
Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Derek McGowan
adeba792f1
Add namespace query parameter for registry proxying
Proxy registries are designed to serve content from upstreams.
However, the proxy hostname will usually not match the hostname
of the upstream, requiring the proxy to only use a single
upstream or use its own pattern matching to determine the upstream.
To solve this issue, the client will pass along the namespace which
is being used for the request, allowing mirrors to easily map
to multiple upstreams. This query parameter can safely be ignored
if multiple upstreams are not supported.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-03 09:32:44 -07:00
Derek McGowan
3dd8242a67
Add host specific headers
Allows configuring headers per registry host

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-06-01 18:27:41 -07:00
Derek McGowan
0b29c9c371
Update resolver to handle endpoint configuration
Adds support for registry mirrors
Adds support for multiple pull endpoints
Adds capabilities to limit trust in public mirrors
Fixes user agent header missing


Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-07-16 11:28:23 -07:00