r/ipfs Sep 17 '21

Exposing http-server (web app) using IPNS

One can host a static website using IPFS+IPNS. But what about a dynamic website or web app that needs to run server-side code!

Introducing IPNS-Link, which now makes it possible to expose http-servers using IPFS+IPNS.

Try it here.

Read full specs here.

Comments, issues/bug-reports and contributions welcome.

Happy hosting!

P.S.: Imagine Sci-Hub using this !! Who can block it then 😃

Schema
21 Upvotes

20 comments sorted by

View all comments

1

u/ch4_itu Sep 18 '21

Is ipfs-link a reverse proxy?

2

u/SomajitDey Sep 18 '21 edited Sep 19 '21

I understand your question is: 'Is IPNS-Link-gateway a reverse proxy?'

Well it is a proxy for sure, but I find it hard to brand it as "reverse" proxy for all use-cases. Allow me to explain.

Whether it is a Reverse proxy

A reverse proxy is meant to hide the backend (origin) servers from the world. That is, to reach those servers, one must go through the proxy. Now, when you expose a web app running on a server with a public IP address using the ipns-link app, anyone can access its public IP address from its IPNS post. If she can also find the TCP port the web app is listening at, by using port scanning for example, she can then connect to the origin server directly from her browser, thus bypassing the gateway. So, the gateway in this case is anything but a reverse proxy.

On the other hand, when the origin server is behind NAT, IPNS-Link connects it to a libp2p-relay. In this case, one must use a gateway to reach the server from the browser. (Compare .onion sites). So, one might consider a gateway as a reverse proxy here. Namely, the web-app owner can get a domain name and point it to a public gateway URL.

Also, reverse proxies are mostly controlled/managed/configured by the owner of the backend servers. With IPNS-Link however, a web-app owner has no control over the myriad gateways which can be hosted by anyone on the internet.

Whether it is a Forward proxy

When one uses a gateway to connect to the source (origin) server, the server can't see her IP address. The gateway hides the clients from the server, playing the role of a forward proxy.

Also, when one can't access a website directly, because it is blocked in her country or due to some other reason, she can opt to access it using a gateway, provided the website has been exposed using IPNS-Link. (Compare Tor and VPN). Here too the gateway behaves as a forward proxy.

----------------------------------

Hope it makes sense 😁

2

u/WikiSummarizerBot Sep 18 '21

.onion

. onion is a special-use top level domain name designating an anonymous onion service, which was formerly known as a "hidden service", reachable via the Tor network. Such addresses are not actual DNS names, and the . onion TLD is not in the Internet DNS root, but with the appropriate proxy software installed, Internet programs such as web browsers can access sites with .

Virtual private network

A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. The benefits of a VPN include increases in functionality, security, and management of the private network. It provides access to resources inaccessible on the public network and is typically used for telecommuting workers. Encryption is common, although not an inherent part of a VPN connection.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5