- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.1k
 
Open
Labels
P1High: Likely tackled by core team if no one steps upHigh: Likely tackled by core team if no one steps upeffort/hoursEstimated to take one or several hoursEstimated to take one or several hoursexp/expertHaving worked on the specific codebase is importantHaving worked on the specific codebase is importantkind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)
Description
- 
Repro steps
- Clone https://github.com/Rinse12/reproduce_kubo_windows_redirect_DNS_bug
 - Run 
npm install - Run 
npm run repro:windowsfrom an Administrator-enabled shell on Windows; the script boots a temporary repo, then probes gateway redirects for/ipfs/<cid>(CIDv0 + CIDv1) and/ipns/<key>. 
 - 
What happens
- The script initializes a fresh repository, pins sample content, and publishes an IPNS record using the HTTP RPC API.
 - It then fetches three gateway URLs:
http://localhost:48180/ipfs/<cid-v0>http://localhost:48180/ipfs/<cid-v1>http://localhost:48180/ipns/<key>
 - Each fetch receives an HTTP redirect to the corresponding subdomain (
<cid>.ipfs.localhost,<key>.ipns.localhost). Windows tries to resolve these hostnames through DNS, fails, and causesfetchto reject withTypeError: fetch failed. The script reports that the redirect-induced DNS failure occurred for all three cases. 
 - 
Expected
- The redirected hostname should resolve locally (as it does on Linux/macOS) so that the gateway response is delivered without DNS errors.
 
 - 
Observed output excerpt
Using temporary IPFS_PATH: C:\Users\Administrator\AppData\Local\Temp\kubo-windows-redirect-repro-XXXXXX ... Generated IPNS key via RPC: k51qzi5uqu5dlmspjqtzeq0ejze6jbheg8ewrbr7bh6sd9a4u71qucvelqrp67 Published IPNS record (allowOffline). Issuing fetch (CIDv0 gateway redirect): http://localhost:48180/ipfs/QmW8zGQpaiM2fcLGAZs4s33C9ooDtzHCLhYoLJC65YzHuQ ✅ CIDv0 gateway redirect: Successfully reproduced the redirect-induced DNS failure. fetch() followed the gateway redirect to http://bafybeidt4cryxmpqcyuqqxed6dsru2wqbtdse6c5nmtgzykiftm6glu6g4.ipfs.localhost:48180/ and Windows DNS could not resolve the ipfs.localhost subdomain of localhost. Issuing fetch (CIDv1 gateway redirect): http://localhost:48180/ipfs/bafybeidt4cryxmpqcyuqqxed6dsru2wqbtdse6c5nmtgzykiftm6glu6g4 ✅ CIDv1 gateway redirect: Successfully reproduced the redirect-induced DNS failure. fetch() followed the gateway redirect to http://bafybeidt4cryxmpqcyuqqxed6dsru2wqbtdse6c5nmtgzykiftm6glu6g4.ipfs.localhost:48180/ and Windows DNS could not resolve the ipfs.localhost subdomain of localhost. Issuing fetch (IPNS gateway redirect): http://localhost:48180/ipns/k51qzi5uqu5dlmspjqtzeq0ejze6jbheg8ewrbr7bh6sd9a4u71qucvelqrp67 ✅ IPNS gateway redirect: Successfully reproduced the redirect-induced DNS failure. fetch() followed the gateway redirect to http://k51qzi5uqu5dlmspjqtzeq0ejze6jbheg8ewrbr7bh6sd9a4u71qucvelqrp67.ipns.localhost:48180/ and Windows DNS could not resolve the ipns.localhost subdomain of localhost. - 
Additional notes
- Running the identical script on Linux succeeds with HTTP 200, so the behavior is OS-specific.
 - The issue prevents programmatic use of the Windows gateway for IPNS names because the automatic redirect resolves to a hostname Windows cannot reach.
 
 
Metadata
Metadata
Assignees
Labels
P1High: Likely tackled by core team if no one steps upHigh: Likely tackled by core team if no one steps upeffort/hoursEstimated to take one or several hoursEstimated to take one or several hoursexp/expertHaving worked on the specific codebase is importantHaving worked on the specific codebase is importantkind/bugA bug in existing code (including security flaws)A bug in existing code (including security flaws)