google / google/go-containerregistry

crane: hope Crane can add HTTP3 support

Open
#2,061 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
4.1k
Forks
689
Avg merge
2d 12h
Merged PRs (30d)
26

Description

### Description of the bug

When using Crane to connect to some Docker repositories, the connection is reset
hope Crane can add HTTP3 support to avoid this (even if it is not for firewall circumvention, using http3 can improve performance)

### Reproduction

Firewall audit causes connection reset:
crane pull -v --insecure proxy.1panel.live/library/nginx 0.tar

### Expected behavior

Can download the image file

### Additional context

The following effects are seen when running

$ crane pull -v --insecure proxy.1panel.live/library/nginx 0.tar
2025/02/13 10:35:50 --> GET https://proxy.1panel.live/v2/
2025/02/13 10:35:50 GET /v2/ HTTP/1.1
Host: proxy.1panel.live
User-Agent: crane.exe/v0.20.3 go-containerregistry/v0.20.3 Accept-Encoding: gzip 2025/02/13 10:35:50 <-- read tcp 192.168.31.214:63632->172.67.69.152:443: wsarecv: An existing connection was forcibly closed by the remote host. GET https://proxy.1panel.live/v2/ (244.1797ms) 2025/02/13 10:35:50 --> GET http://proxy.1panel.live/v2/ 2025/02/13 10:35:50 GET /v2/ HTTP/1.1 Host: proxy.1panel.live User-Agent: crane.exe/v0.20.3 go-containerregistry/v0.20.3 Accept-Encoding: gzip 2025/02/13 10:35:50 <-- read tcp 192.168.31.214:63633->172.67.69.152:80: wsarecv: An existing connection was forcibly closed by the remote host. GET http://proxy.1panel.live/v2/ (229.2047ms) Error: Get "https://proxy.1panel.live/v2/": read tcp 192.168.31.214:63632->172.67.69.152:443: wsarecv: An existing connection was forcibly closed by the remote host.; Get "http://proxy.1panel.live/v2/": read tcp 192.168.31.214:63633->172.67.69.152:80: wsarecv: An existing connection was forcibly closed by the remote host.

But the mirror site is accessible. Later, I found that when using curl, the following error occurred:

$ curl https://proxy.1panel.live/
curl: (35) Recv failure: Connection reset by peer

$ curl ./curl --http3 https://proxy.1panel.live/

.....

Contributor guide

Open the contributing guide

Research direction

Start with the `crane pull` command and the connection behavior shown in the reproduction, then trace how it contacts the registry. Determine the scope of HTTP/3 support and how the reported repository should download successfully; the issue names no files or tests, so the relevant entry points and validation work must first be identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.