Here is another demo of my NIP implementation.
Now using ephemeral events, NIP-44 encryption and NIP-59 gift wraps:
https://github.com/nostr-protocol/nips/pull/1276

I suggest we’ll call it NIP-80 after the default http port.

Imagine future browsers ( #browstr ) allowing you to enter http://<some-nprofile>.nostr/… and it would simply send the http request and receive the response via nostr events! Just like .onion sites but without the slowness of TOR.

It can also be useful for #iot devices that can serve a simple configuration-website and allow “browsing” them from anywhere in the world. I think TOR is too complicated to run on such devices.

nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z WDYT? https://v.nostr.build/VAREX7f6XB8sTPQr.mp4


nostr:npub1h5t3asu90f2x48rxtcqkjvwhza7m6kngs7vjyanx8xqyswc6es2s4645z5 How would you compare this to #holesail ? I think the solutions can complete each other - a simple website access could be done via ephemeral nostr events, but heavier communication (i.e. video) should be done over Holesail.


This is fantastic. Thanks for sharing. Keep up the good work 💪🧡


We're gonna win...

nostr:nevent1qqsd4x5vzdjvsssxyjw4xs3zfuqcfwfdej73uqwptyg58spvf4zw4qgpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsygpnzm3d3rlercggn36lamwd3w4zyk9523268v2k4ash6lk8ndzlu5psgqqqqqqsn8ah0k


> Imagine future browsers ( #browstr ) allowing you to enter http://<some-nprofile>.nostr/… and it would simply send the http request and receive the response via nostr events! Just like .onion sites but without the slowness of TOR.

Brave does that with IPFS. You just go ipfs://<hash> ...


nostr:npub1dergggklka99wwrs92yz8wdjs952h2ux2ha2ed598ngwu9w7a6fsh9xzpc zapped ⚡6,001 sats

nostr:note1m2dgcymyeppqvfya2dpzyncpsjujmn9arcquzkg3g0qzcn2ya2qsmpzkft


Thanks, this is exactly what we need! Super useful :)


Interesting. What does the hash represent? How does it bypass the home NAT?
I also think https://holesail.io/ is an interesting project for large traffic.
But for #IoT devices, http-over-nostr would be the best. All kind of Arduino/ESP32 projects can easily connect to websockets, so they could serve simple “websites” for configuration and operation.


Very coool!


Very interested in how these two compare as well!
What makes holesail less ideal for less heavy stuff?


Nostr


For one, holesail is p2p and can handle more than just http traffic.


It bypasses NAT by using a message bus instead of direct p2p communication. A Nostr relay is that middleman and you probably want to run your own relay, so that needs to be accessible past the NAT (could be hosted on a VPS, or you could spam someone else's relay).


Seems quite interesting, I am not well versed with Nostr protocols, can you explain how does it work behind the tech please?


Holesail is ideal for both super light and super heavy stuff.


Yes, everything TCP at the moment, UDP support is planned soon.


HTTP over Nostr

Another example of Nostr replacing IP/DNS/CA.

🫂

nostr:nevent1qqsd4x5vzdjvsssxyjw4xs3zfuqcfwfdej73uqwptyg58spvf4zw4qgpz4mhxue69uhhyetvv9ujumn0wd68ytnzvuhsygpnzm3d3rlercggn36lamwd3w4zyk9523268v2k4ash6lk8ndzlu5psgqqqqqqsvqmyqu


Thanks! Was wondering if there was a some kind of cost/trade-off that would not make it worth it to set up that connection for light stuff.
But if there isn't really, and if it's P2P, than you would technically be better of with holesail because of increased privacy. Or am i getting that wrong?


Nostr is not P2P so technically the relays could track the amount of traffic, and if they collect the ip-addresses I guess they could track who is communicating with who.

From what I understand Holesail needs the servers/relays only in the initial setup of the communication channel. That’s kind of overhead if all you want to do is one or two http api calls and disconnect (like when you pay a static lnurlp).

nostr:npub1h5t3asu90f2x48rxtcqkjvwhza7m6kngs7vjyanx8xqyswc6es2s4645z5 Do I understand correctly?


Can you install a Holesail server on Arduino or ESP32?


No, there is no trade off 😁, that's the best thing about this P2P tech and your data does not travel through third party relays either.

Btw, thanks for the Zap


Not really, holesail does not need relays or servers. The P2P network running behind Holesail is a closed network that people can not enter unless they know an existing peer.

By default there are three public nodes, Node is a known peer, and anyone can become a node.


I think this is an alternative to VPNs instead of Tor. If you want your IP address to be private no matter what, you have to also connect to nostr relays with something like Tor. And if you have a VPN that you trust, you don't need to tunnel traffic over Nostr in addition to that. Or did I miss something perhaps?


Using VPN doesn’t mean you have a static public IP address. It doesn’t mean you can easily configure your computer to become a server in a way that allows others to initiate a connection with it.
I think Tor can give you an onion address, based on your public-key, so it remains yours even if the network changes.


Node = Relay = Server?
If your destination doesn’t have a domain or a public static IP address, some of the communication has to go through a middleman. Which is fine…


The hash is the hash of the data you're requesting. You have to be running a local IPFS node or Brave will run one for you.


Node is a known peer that know a lot of other peers who's IP address we know and who will accept all connections. It is not a Relay and anyone can become a Node.

Check out Kademliya algorithm.


Here is another demo of my NIP implementation.
Now using ephemeral events, NIP-44 encryption and NIP-59 gift wraps:
https://github.com/nostr-protocol/nips/pull/1276

I suggest we’ll call it NIP-80 after the default http port.

Imagine future browsers ( #browstr ) allowing you to enter http://<some-nprofile>.nostr/… and it would simply send the http request and receive the response via nostr events! Just like .onion sites but without the slowness of TOR.

It can also be useful for #iot devices that can serve a simple configuration-website and allow “browsing” them from anywhere in the world. I think TOR is too complicated to run on such devices.

nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z WDYT? https://v.nostr.build/VAREX7f6XB8sTPQr.mp4


Aha, I see now. It wasn't clear that it's all about hosting. Thanks for clarifying.

Personally, I use ZeroTier or Wireguard for these things, but it could be interesting in some cases still. I think it still doesn't quite replace the privacy of Tor, but could be useful for convenience and/or speed of deployment for certain things.


💪🧡 Chiefmonkey


Great!

Can we get web sockets over nostr?

I want to do web sockets over nostr over web sockets and see if it rips a hole in the space-time continuum.


😂 Actually you don’t need websockets over nostr because with http-over-nostr the client side can behave as a server and wait for requests initiated by others.
When you think about it, WebSockets themselves are kind of a hack. In the old days every computer had a public IP address and could open a port to wait for information from others. Today most computers are behind NAT and firewalls so to wait for information from some server you need to actively initiate a communication channel and keep it alive.