From @Asgraf on Mon May 02 2016 08:04:40 GMT+0000 (UTC)
Would it be possible to host simple static website both via HTTP and IPFS via single open port 80 so as to allow connection both from ipfs clients & from classic http non-ipfs browsers?
Copied from original issue: https://github.com/ipfs/faq/issues/114
From @Kubuxu on Mon May 02 2016 09:38:54 GMT+0000 (UTC)
No with just ipfs software.
It would probably possible to do active filtering using deep packet inspection to split HTTP traffic and ipfs traffic. You would still need a two locally bound ports and it would be quite challenging.
I don’t know what is your use case but I am pretty sure cons outweigh benefits.
From @lidel on Mon May 02 2016 12:49:33 GMT+0000 (UTC)
It may be a digression on my end, but if we twist @Asgraf’s question a bit and ask instead:
How can I opportunistically upgrade HTTP users of my site to IPFS?
…then a short answer may be:
- Server owner
- Publishes static site to IPNS
- Sets up
dnslink
in site’sTXT
DNS record (convention: https://github.com/ipfs/go-ipfs/issues/760#issuecomment-92146567)
- IPFS user
- Enables DNS support in her browser addon (right now only Firefox addon supports this)
PS. If one really want to use a single port for all incoming connections, HAProxy can be used for hosting HTTPS and SSH on the same port:
- https://dgl.cx/2010/01/haproxy-ssh-and-ssl-on-same-port (simple split)
- http://blog.chmd.fr/ssh-over-ssl-episode-4-a-haproxy-based-configuration.html (SSL inside of TLS tunnel)
In theory, it should be possible to replace SSH detection with IPFS-secific one.