Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1e424c5
chore(deps): pin go-libp2p to libp2p/go-libp2p#3509
lidel May 15, 2026
fd7c935
refactor(httpprovider): rename WSSFallback, add config, deprecate old…
lidel May 16, 2026
8b71576
feat(httpprovider): expose trustless gateway over AutoTLS HTTPS
lidel May 16, 2026
dc07518
feat(httpprovider): announce /http multiaddrs and auto-append clearte…
lidel May 16, 2026
220d327
chore(deps): bump p2p-forge to v0.8.1
lidel May 16, 2026
99eac13
feat(autotls): add test/debug config affordances
lidel May 16, 2026
05cf8a9
feat(autotls): add ?dial=/?dns= URL overrides
lidel May 16, 2026
51350d1
test(autotls): add E2E canary sub-module
lidel May 16, 2026
c05a053
test(httpprovider): CLI tests + migrate flag
lidel May 16, 2026
552aea9
fix(httpprovider): always install AutoWSS handler
lidel May 16, 2026
04b7c9f
docs(httpprovider): clarify role and changelog
lidel May 16, 2026
23f5253
fix(ci): unbreak autotls-tests + drop noise from conformance jobs
lidel May 16, 2026
53c71ca
ci(gateway-conformance): pin unique ports per job
lidel May 16, 2026
19107ed
fix(ci): commit zone file, gofmt nits, and stylecheck nit
lidel May 16, 2026
35acb9b
chore(deps): bump p2p-forge to v0.9.0
lidel May 27, 2026
23e144b
fix(httpprovider): default /http announcement to off
lidel May 27, 2026
0263193
Merge branch 'master' into poc/wss-fallback-trustless-gateway
lidel May 27, 2026
b790231
feat: configure fallback gateway HTTP server
lidel Jun 2, 2026
c7175e1
Merge remote-tracking branch 'origin/master' into poc/wss-fallback-tr…
lidel Jun 2, 2026
f3b011d
chore(deps): bump go-libp2p to merged WithHTTPHandler
lidel Jun 3, 2026
3eebd7a
refactor(libp2p): name HTTPProvider http server tuning
lidel Jun 3, 2026
d4102d3
Merge remote-tracking branch 'origin/master' into poc/wss-fallback-tr…
lidel Jun 5, 2026
86be9dc
test: e2e http retrieval content verification
lidel Jun 21, 2026
2bfdab3
Merge branch 'master' into poc/wss-fallback-trustless-gateway
lidel Jun 21, 2026
a7f4306
docs: move HTTPProvider highlight to v0.44
lidel Jun 21, 2026
310af06
Merge remote-tracking branch 'origin/master' into poc/wss-fallback-tr…
lidel Jul 25, 2026
bbc0e69
docs: move HTTPProvider highlight to vTBD
lidel Jul 25, 2026
6753cf8
feat(autotls): certs for your node's own IP
lidel Jul 26, 2026
57f42bb
test(autotls): cover the IP certificate path
lidel Jul 26, 2026
c4b5920
Merge remote-tracking branch 'origin/master' into poc/wss-fallback-tr…
lidel Jul 28, 2026
1a94a42
feat(autotls): the port decides between IP certs and the broker
lidel Jul 28, 2026
38397cd
chore(deps): bump p2p-forge to the CI-verified commit
lidel Jul 28, 2026
fed8d39
chore(deps): bump p2p-forge to the reviewed IP cert client
lidel Jul 28, 2026
abf3474
fix: h2 conn guards off when RetrievalTimeout=0
lidel Jul 29, 2026
0c2f1b7
fix: gate HTTPProvider surfaces on ws transport
lidel Jul 29, 2026
8c35499
refactor: testable HTTPProvider.Cleartext append
lidel Jul 29, 2026
161371b
feat: warn loudly when SelfSignedForTests is on
lidel Jul 29, 2026
62a74e9
docs: AutoTLS trust roots and private forge addrs
lidel Jul 29, 2026
e95c9da
docs: state HTTPProvider's real exposure surface
lidel Jul 29, 2026
fd9c678
test: use t.Setenv in AutoTLS canaries
lidel Jul 29, 2026
8dbfaec
Merge remote-tracking branch 'origin/master' into poc/wss-fallback-tr…
lidel Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 117 additions & 14 deletions .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ jobs:
run: make build
working-directory: kubo-gateway

# 3. Init the kubo-gateway
# 3. Init the kubo-gateway. Every Addresses.* port is set explicitly
# and chosen unique across all three conformance jobs (leading 1xxxx
# for this one, 2xxxx and 3xxxx for the libp2p and cleartext jobs)
# so each job's footprint is unambiguous.
- name: Init kubo-gateway
run: |
./ipfs init -e
./ipfs config --json Gateway.PublicGateways "$GATEWAY_PUBLIC_GATEWAYS"
./ipfs config --json Addresses.Swarm '["/ip4/127.0.0.1/tcp/14001"]'
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/18080"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/15001"
working-directory: kubo-gateway/cmd/ipfs

# 4. Populate the Kubo gateway with the gateway-conformance fixtures
Expand Down Expand Up @@ -95,8 +101,8 @@ jobs:
- name: Run gateway-conformance tests
uses: ipfs/gateway-conformance/.github/actions/test@v0.13
with:
gateway-url: http://127.0.0.1:8080
subdomain-url: http://localhost:8080
gateway-url: http://127.0.0.1:18080
subdomain-url: http://localhost:18080
args: -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
json: output.json
xml: output.xml
Expand Down Expand Up @@ -146,14 +152,19 @@ jobs:
run: make build
working-directory: kubo-gateway

# 3. Init the kubo-gateway
# 3. Init the kubo-gateway. The trustless subset this job runs does
# not exercise subdomain routing, so Gateway.PublicGateways is
# unnecessary here. Ports are in the 2xxxx range so each conformance
# job's footprint is unambiguous (1xxxx for the full job, 3xxxx for
# the cleartext job).
- name: Init kubo-gateway
run: |
./ipfs init --profile=test
./ipfs config --json Gateway.PublicGateways "$GATEWAY_PUBLIC_GATEWAYS"
./ipfs config --json Experimental.GatewayOverLibp2p true
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8080"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/5001"
./ipfs config --json HTTPProvider.Enabled true
./ipfs config --json HTTPProvider.Libp2p true
./ipfs config --json Addresses.Swarm '["/ip4/127.0.0.1/tcp/24001"]'
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/28080"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/25001"
working-directory: kubo-gateway/cmd/ipfs

# 4. Populate the Kubo gateway with the gateway-conformance fixtures
Expand All @@ -176,8 +187,9 @@ jobs:
run: |
./ipfs init --profile=test -e
./ipfs config --json Experimental.Libp2pStreamMounting true
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8081"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/5002"
./ipfs config --json Addresses.Swarm '["/ip4/127.0.0.1/tcp/24002"]'
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/28081"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/25002"
working-directory: kubo-gateway/cmd/ipfs

# 7. Start the kubo http-p2p-proxy
Expand All @@ -192,16 +204,16 @@ jobs:
# 8. Start forwarding data from the http-p2p-proxy to the node serving the Gateway API over libp2p
- name: Start http-over-libp2p forwarding proxy
run: |
gatewayNodeId=$(./ipfs --api=/ip4/127.0.0.1/tcp/5001 id -f="<id>")
./ipfs --api=/ip4/127.0.0.1/tcp/5002 swarm connect $(./ipfs --api=/ip4/127.0.0.1/tcp/5001 swarm addrs local --id | head -n 1)
./ipfs --api=/ip4/127.0.0.1/tcp/5002 p2p forward --allow-custom-protocol /http/1.1 /ip4/127.0.0.1/tcp/8092 /p2p/$gatewayNodeId
gatewayNodeId=$(./ipfs --api=/ip4/127.0.0.1/tcp/25001 id -f="<id>")
./ipfs --api=/ip4/127.0.0.1/tcp/25002 swarm connect $(./ipfs --api=/ip4/127.0.0.1/tcp/25001 swarm addrs local --id | head -n 1)
./ipfs --api=/ip4/127.0.0.1/tcp/25002 p2p forward --allow-custom-protocol /http/1.1 /ip4/127.0.0.1/tcp/28092 /p2p/$gatewayNodeId
working-directory: kubo-gateway/cmd/ipfs

# 9. Run the gateway-conformance tests over libp2p
- name: Run gateway-conformance tests over libp2p
uses: ipfs/gateway-conformance/.github/actions/test@v0.13
with:
gateway-url: http://127.0.0.1:8092
gateway-url: http://127.0.0.1:28092
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
json: output.json
xml: output.xml
Expand All @@ -224,3 +236,94 @@ jobs:
with:
name: gateway-conformance-libp2p.json
path: output.json

# Testing the trustless gateway subset exposed by HTTPProvider over plain
# HTTP/2 (h2c) on the swarm port. HTTPProvider.Cleartext auto-appends a /ws
# listener to each /tcp listener in Addresses.Swarm; HTTPProvider then
# shares the same TCP port via the shared-TCP demuxer and serves /http
# there. No libp2p proxy is needed: the conformance client connects to the
# swarm port directly. Complements the libp2p job above so both
# HTTPProvider transports are exercised end-to-end.
gateway-conformance-http-provider-cleartext:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# 1. Download the gateway-conformance fixtures
- name: Download gateway-conformance fixtures
uses: ipfs/gateway-conformance/.github/actions/extract-fixtures@v0.13
with:
output: fixtures

# 2. Build the kubo-gateway
- name: Checkout kubo-gateway
uses: actions/checkout@v6
with:
path: kubo-gateway
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'kubo-gateway/go.mod'
cache: true
cache-dependency-path: kubo-gateway/go.sum
- name: Build kubo-gateway
run: make build
working-directory: kubo-gateway

# 3. Init the kubo-gateway with HTTPProvider.Cleartext on the swarm
# port. Libp2p is off; Cleartext is the only HTTPProvider transport
# exercised by this job. The trustless subset run below does not
# exercise subdomain routing, so Gateway.PublicGateways is
# unnecessary here. Ports are in the 3xxxx range so each
# conformance job's footprint is unambiguous (1xxxx for the full
# job, 2xxxx for the libp2p job).
- name: Init kubo-gateway
run: |
./ipfs init --profile=test
./ipfs config --json HTTPProvider.Enabled true
./ipfs config --json HTTPProvider.Libp2p false
./ipfs config --json HTTPProvider.Cleartext true
./ipfs config --json Addresses.Swarm '["/ip4/127.0.0.1/tcp/34001"]'
./ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/38080"
./ipfs config Addresses.API "/ip4/127.0.0.1/tcp/35001"
working-directory: kubo-gateway/cmd/ipfs

# 4. Populate the Kubo gateway with the gateway-conformance fixtures
- name: Import fixtures
run: |
# Import car files
find ./fixtures -name '*.car' -exec kubo-gateway/cmd/ipfs/ipfs dag import --pin-roots=false {} \;

# 5. Start the kubo-gateway
- name: Start kubo-gateway
run: |
( ./ipfs daemon & ) | sed '/Daemon is ready/q'
while [[ "$(./ipfs id | jq '.Addresses | length')" == '0' ]]; do sleep 1; done
working-directory: kubo-gateway/cmd/ipfs

# 6. Run the gateway-conformance tests over plain HTTP/2 (h2c) on the swarm port
- name: Run gateway-conformance tests over h2c
uses: ipfs/gateway-conformance/.github/actions/test@v0.13
with:
gateway-url: http://127.0.0.1:34001
args: --specs "trustless-gateway,-trustless-ipns-gateway" -skip 'TestGatewayCar/GET_response_for_application/vnd.ipld.car/Header_Content-Length'
json: output.json
xml: output.xml
html: output.html
markdown: output.md

# 7. Upload the results
- name: Upload MD summary
if: failure() || success()
run: cat output.md >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: failure() || success()
uses: actions/upload-artifact@v7
with:
name: gateway-conformance-http-provider-cleartext.html
path: output.html
- name: Upload JSON report
if: failure() || success()
uses: actions/upload-artifact@v7
with:
name: gateway-conformance-http-provider-cleartext.json
path: output.json
22 changes: 22 additions & 0 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,28 @@ jobs:
fusermount3 -uz "$mp" 2>/dev/null || fusermount -uz "$mp" 2>/dev/null || true
done

# AutoTLS end-to-end canary (in-process Pebble + p2p-forge).
# Isolated sub-module (test/autotls); heavy CoreDNS + Pebble deps stay
# out of the main go.mod.
autotls-tests:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
runs-on: ${{ fromJSON(github.repository == 'ipfs/kubo' && '["self-hosted", "linux", "x64", "2xlarge"]' || '"ubuntu-latest"') }}
timeout-minutes: 8
env:
GOTRACEBACK: all
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Build kubo binary
run: make build
- name: Run AutoTLS end-to-end canary
run: make test_autotls

# Example tests (kubo-as-a-library)
example-tests:
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ docs/examples/go-ipfs-as-a-library/example-folder/Qm*
/test/cli/cli-tests.json
/test/fuse/fuse-unit-tests.json
/test/fuse/fuse-cli-tests.json
/test/autotls/autotls-tests.json

# ignore build output from snapcraft
/ipfs_*.snap
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ make -O test_go_lint # run linter (use this instead of golangci-lint directly)

If you change dependencies in any `go.mod`, you must run `make mod_tidy`, and you must run it before committing, pushing, or opening a PR. The repo has three `go.mod` files (root, `docs/examples/kubo-as-a-library`, and `test/dependencies`) that have to stay on the same dependency versions. `make mod_tidy` runs `go mod tidy` in every one of them; a bare `go mod tidy` only touches the module you run it in, which lets the pins drift out of sync between modules (for example the root pointing at one boxo commit while `test/dependencies` points at another). Run it before building or testing too, since it also updates `go.sum`.

If you modify any `.go` files outside of `test/`, you must run `make build` before running integration tests.
If you modify any `.go` files outside of `test/`, you must run `make build` before running integration tests. Integration tests spawn a real `ipfs daemon` from `cmd/ipfs/ipfs` and `go test ./test/cli/...` does not rebuild that binary, so daemon-side changes (config schema, FX providers, transport options, default values) appear to be silently ignored when the binary is stale. Common symptoms: a new config flag has no effect, an expected listener never binds, an FX-injected handler is nil. If a CLI test behaves differently from a manual `cmd/ipfs/ipfs daemon` run, suspect a stale binary first.

## Testing

Expand Down
1 change: 1 addition & 0 deletions Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ help:
@echo ' test_unit - Run unit tests with coverage (excludes test/cli)'
@echo ' test_cli - Run CLI integration tests (requires built binary)'
@echo ' test_fuse - Run FUSE tests (requires /dev/fuse and fusermount)'
@echo ' test_autotls - Run AutoTLS end-to-end canary (in-process Pebble + p2p-forge)'
@echo ' test_go_fmt - Check Go source formatting'
@echo ' test_go_build - Build kubo for all platforms from .github/build-platforms.yml'
@echo ' test_go_lint - Run golangci-lint'
Expand Down
Loading
Loading