Skip to content

richardschneider/net-ipfs-http-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS HTTP Gateway

build status Coverage Status Version docs

Allows HTTP access to IPFS files and directories. An IPFS Gateway acts as a bridge between traditional web browsers and IPFS. Through the gateway, users can browse files and websites stored in IPFS as if they were stored in a traditional web server.

Getting started

Published releases are available on NuGet. To install, run the following command in the Package Manager Console

PM> Install-Package Ipfs.HttpGateway

or using .NET CLI run the following command in the project folder

> dotnet add package Ipfs.HttpGateway

Running

using Ipfs.Engine;
using Ipfs.HttpGateway;

var ipfs = new IpfsEngine();
ipfs.Start();
var gateway = new GatewayHost(ipfs);

Usage

Browse to a IPFS file or directory

localhost:8080/ipfs/Qmhash

where Qmhash is the hash or path to the IPFS content.

If Qmhash is a directory and it contains an index.html file, then the file is served. Otherwise a listing of the directory is served. To force a directory listing, end the Qmhash with a forward slash.

directory browsing

Related Projects

License

Copyright © 2019 Richard Schneider ([email protected])

This library is licensed under the MIT license. Refer to the LICENSE file for more information.

Buy Me A Coffee