
Hostyoself: Server in a browser – host from your computer, your phone, etc. - ollerac
https://github.com/schollz/hostyoself
======
superboum
A better solution would be to integrate propositions like dweb[1] in browsers
then simply use socket listening. Without socket listening, using WebRTC to
create direct connections is also a solution. UPnP and ICE can help to
configure routers and/or bypass their restrictions.

Using these technologies instead of OP centralized proposition would improve
reliability, scalability, security and sustainability : currently
hostyoself.com returns a 502 bad gateway.

[1]: [https://github.com/mozilla/libdweb](https://github.com/mozilla/libdweb)

~~~
pbhjpbhj
I find myself saying this a lot recently: Opera Unite, integrated a p2p web
server for social messaging and file sharing. Wish it had taken hold, that
looked like the stepping stone to federated social web to me.

~~~
myfonj
For those wondering what "Opera Unite" means, some archived resources from
2009:

[https://web.archive.org/web/20090618010520/http://unite.oper...](https://web.archive.org/web/20090618010520/http://unite.opera.com/)

Introduction:
[https://web.archive.org/web/20090618160336/http://dev.opera....](https://web.archive.org/web/20090618160336/http://dev.opera.com/articles/view/an-
introduction-to-opera-unite/)

Developer's primer:
[https://web.archive.org/web/20090618170044/http://dev.opera....](https://web.archive.org/web/20090618170044/http://dev.opera.com/articles/view/opera-
unite-developer-primer/)

(Links taken from Czech wiki article,
[https://cs.wikipedia.org/wiki/Opera_Unite](https://cs.wikipedia.org/wiki/Opera_Unite)
) (I've never been fan of Opera but this project seemed great and so ahead of
it's time. In retrospect I regret my antipathy prevented me to even try it.)

~~~
pbhjpbhj
I used it and was all-in, sure that this was going to change the interwebs
overnight, kinda like I went all-in on XHTML & semantics (eg microformats).

One of the facets was like Facebook's wall, they called it the "fridge door"
IIRC, your friends could leave messages p2p and you could open directories
really easily to share with anyone who had the right credentials (your
"friends"). It really did pop out the middlemen -- share files direct from
your computer by giving someone a link (like you would with Dropbox, but peer
to peer); message people like on Facebook, but p2p ... some of that might be
anticipation of developments rather than the actual product as set. It makes a
lot of sense to me.

~~~
kingludite
I ran into some folk who shared their torrent folder. These curated lists were
something wonderful. You could even ask if something could be seeded. It
elevated BitTorrent to new levels: You could make a torrent from anything, it
made it available automatically and if someone showed an interest in it it was
easy to switch on seeding. We had lots of fun watching old black and white
movies.

------
snek
To clarify: there is no server in your browser. You just shoot data across a
websocket through [https://hostyoself.com/ws](https://hostyoself.com/ws)

~~~
anderspitman
Does the fact that it runs through a proxy make it less of a server?

~~~
boomlinde
The fact that it's not a server in your browser, but a client to a server on
the backend makes it less of a server in your browser

~~~
mrbungie
No true Scotsman detected.

By extension of that argument you could argue that no server is a true server:

The fact that it's not a server in the _X_, but a client to a [_Y_ in
[Database, DNS, Router, Caching Server, Search Server, REST API, etc]]_ on the
_Z_ makes it less of a server in the _X_.

Maybe we should stop using the word "server" and use "client graph", or just
continue accepting that there are different layers in a system.

~~~
boomlinde
_> By extension of that argument you could argue that no server is a true
server_

No, it couldn’t. For example, I could say that nginx is a server on my
computer, and it would be true because it’s running on my computer and is
accepting connections from clients, regardless of whether it’s a client to
some other service. My browser isn’t.

Why stop using the word ”server”? Just stop watering it down and the meaning
will be perfectly clear.

~~~
vidarh
Your confusion is because you assume the requests have to come in via
individual sockets, but several distributed designs have servers connect to a
frontend and wait for requests instead of having the frontend connect. Many
servers are also clients of another service.

E.g. Mongrel2 works that way.

It has the advantage that your reverse proxy does not need configuration
changes to know how many processes are available - it only knows which backend
servers have connected and not time out. Some such designs will also
explicitly have the server do an RPC in to the frontend proxy requesting a
request; doing that then also has the advantage that the backends effectively
rate-limit themselves by placing themselves in the ready queue when they have
capacity, and all you need to know to see if you need more backend capacity is
to monitor how deep the ready queue is.

------
negamax
From the README

> Does this use AI or blockchain? Sure, why not.

They won the Internet!

~~~
Msurrow
Both AI and Blockchain?! This should be included in our corporate strategic
planning of our digital lean agile transformation.

Also - trains!

~~~
Intermernet
And it's serverless, and cloud!

------
shtack
We've been working on a very similar idea to this for the past few months:
[https://pocketweb.io](https://pocketweb.io) There is a very early beta
available on both iOS and Android. We've thought a lot about battery and data
and have gotten really good results by leveraging existing radio wakeups,
batching requests, and doing all sorts of optimizations to the sites
themselves.

Right now we're focused entirely on personal websites, because we believe the
majority of those can actually easily be hosted on a phone (eg. How many
people actually view your LinkedIn page every day? A single Facebook page
doesn't require a datacenter. Etc).

We're limited to single static pages with images right now but better support
for multiple pages and server code with SQLite is coming. More template types,
for example stores, are coming as well.

Let us know what you think!

------
swalsh
This reminds me of the time Opera made some big annoucement in 2009 that they
were going to "reinvent the web", and when they finally revealed what it was,
it was basically host some files from your browser.

[https://www.zdnet.com/article/opera-reinvents-the-web-
will-a...](https://www.zdnet.com/article/opera-reinvents-the-web-will-anyone-
notice/)

~~~
Quai
And that's where Opera failed. Marketing. It was much more than just "host
some files from your browser"; if was a full ecosystem with a "app-store" and
technology that made it work behind NATs etc.

IMHO, the thing that killed Unite (or Alien, as the project was called
internally at Opera) was the lack of a killer feature/app that could show off
the technology to end users. Too much focus on technology, and way to little
focus on apps. It kinda reminds me of Google Wave in many ways.

(At an internal hackaton in Opera, me and some colleagues built a rc-car
controlled trough Opera Unite with a webcam and custom javascript plugin to
control a servos directly from the browser. We also ended up building a
picture frame powered by Opera Unite, and got to present it at a stand at MWC
Barcelona. Fun times!)

~~~
pfraze
I also seem to remember performance and reliability being a bit weak.

------
anderspitman
Personal plug: if you want something similar that supports Range requests (ie
streaming), check out fibridge[0][1][2]. However, I haven't tried adding
support for setting web mime types so you can actually run a website off of it
like hostyoself. That's any interesting use case that I'll have to look in to.

[0] [https://fbrg.xyz/](https://fbrg.xyz/)

[1] [http://iobio.io/2019/06/12/introducing-
fibridge/](http://iobio.io/2019/06/12/introducing-fibridge/)

[2] [https://github.com/anderspitman/fibridge-proxy-
rs](https://github.com/anderspitman/fibridge-proxy-rs)

------
filmgirlcw
I would never use this but I love that it exists and I love the
humor/personality behind the project.

------
Santosh83
Very related to this project is the Beaker Browser, which however uses P2P
topology instead of a conventional proxy server.

~~~
lucaspottersky
> What inspired this? beaker browser, ngrok, localhost.run, inlets.dev, Parks
> and Recreation.

------
erikig
This is pretty awesome and their list of inspirations is a veritable goldmine
of tools I hadn't seen or used before

\- [https://beakerbrowser.com](https://beakerbrowser.com) \- P2P Web in the
browser (Opera Unite Redux)

\- [http://localhost.run](http://localhost.run) & inlets - ngrok with feathers
and a monocle

------
ivanb
IANAL but from the position of law any illegal content shared this way is
hosted by the owner of hostyoself.com

~~~
syn0byte
Not a professional liar either but I'm not sure about that. I imagine torrent
trackers are a decent analog thats been through the courts already. They don't
host the content, they just host URIs and metadata to people that host the
content.

The drag and drop interface isn't to upload the content to be hosted like a
traditional server (what's the point then?) It looks like (without digging
through code) it's so they can parse the file-structure and generate the URIs
to forward requests.

~~~
wrayjustin
> It looks like (without digging through code) it's so they can parse the
> file-structure and generate the URIs to forward requests.

I haven't looked at the code either. But the hosting seems to be handled in
JavaScript. There are no required clients (though there does seem to be an
optional one); this is all completed in the browser.

So you're not "uploading" content, you're providing the content to the client-
side application so it can be shared through that same client-side solution.

------
bluesmoon
Anyone remember browserver posted to HN 7 years ago:
[https://news.ycombinator.com/item?id=4366555](https://news.ycombinator.com/item?id=4366555)

------
tmikaeld
So, a proxy?

~~~
dusted
That's what I've understood, they'll have to provide bandwidth, and they'll
have to use as much upload as download (though that's rarely a problem).. But
still, scaling it would be interesting, but as a proof of concept it's still
interesting, as they're not providing storage or processing.

~~~
tmikaeld
I'm more curious as to the legal implications of what people might share when
using the service, even if (s)he's not the one hosting, (s)he's providing
bandwidth and enabling access.

~~~
wrayjustin
Just as any other intermediate device, service, or system is doing.

The host ISP, the hostyoself.com ISP, the various routers, firewalls, networks
between the two, and all the same for the end-user, any proxy servers on the
path, etc. A lot of entities are hosting/enabling access to the content.

~~~
tmikaeld
That's why it's interesting, in Sweden a person is = IP. Which in this case is
considered the owner. There's also been a case recently where a private person
has been hold personally responsible for other peoples facebook comments.

------
cadecairos
This seems a lot like
[https://github.com/humphd/nohost](https://github.com/humphd/nohost)

~~~
anderspitman
Does nohost let you host sites that others can access, or is it just available
in the local browser?

------
sorz
> Won't I have to reload my browser if I change a file?

> Yep! Welcome to the joys of Javascript.

Although it (re-)sends file for every request, the file content must be
identical. So the relay server may just cache the file.

Once you do that, it becomes more like a traditional static file hosting w/
on-demand file uploading via browser.

------
codesushi42
Underwhelming, this just proxies the request through an external web server
that handles it.

It would be interesting to see something using WASM to run a web server in the
browser. And some kind of decentralized replacement of DNS gateways for host
resolution.

~~~
chhickman
> It would be interesting to see something using WASM to run a web server in
> the browser.

You could possibly get one going on top of something like this:
[https://browsix.org/](https://browsix.org/)

------
o_nate
I could see a use case for something like this to temporarily share a picture
or other file on a web message board, for instance.

------
tbirrell
What prevents hostyoself.com (or more likely, a malicious actor that hacked
HYS) from executing a MITM attack on everything?

------
johnchristopher
Opera had something like that built-in years ago. I don't remember if it made
it out of the preview feature.

------
lhoff
Oh well, HN hug of death killed it.

Hopefully no one uses this for anything critical.

------
DarkWiiPlayer
> Does this use AI or blockchain? Sure, why not.

uh... okay?

~~~
chaseha
He's being cheeky..

------
6cd6beb
> That parcs and rec meme is awesome!

>They won the Internet!

I thought this place was supposed to be better than that.

~~~
shakyshakyshaky
I don't want to sound like a conspiracy theorist, but it reeks of manufactured
support.

~~~
istjohn
This is Hacker News. This project is perfectly targeted for the audience here.

------
seddin
That parcs and rec meme is awesome!

