using nostr relays and ephemeral events as a generic tcp proxy mechanism would be an incredibly slow, as it would have to sign and verify every packet as a nostr note, not to mention it would likely be rate limited and blocked on most public relays so it would be very unreliable. Please don’t do that, there is no good reason, and it just wastes the bandwidth of already bandwidth-constrained relays. Just use a regular proxy server.

There are some really cool QUIC based proxy mechanisms that are crazy fast and are e2e encrypted (MASQUE, etc). nostr doesn’t have to do everything, use the right protocol for the job.

gm nostr

Reply to this note

Please Login to reply.

Discussion

👍🧡

Shhh you can't criticize builders, that goes against nostr's code of conduct. 1 month ban

Constructive feedback 🤗

The constructive part is: don't do it 😂

Straight to jail

"criticize", sure buddy

💯

Does it have to be every packet? If a note can be an entire static webpage, seems like the content can be signed and the apps can determine how to display the content.

A more interesting thing would be a proxy that serves html notes, no ephemeral events needed. That would be useful for creating an http-to-nostrweb proxies, and allow you to create webpages without hosting. You just lose signature verification but maybe you could serve the signature and other fields in response headers so that the client could verify.

I think nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z made an html spec at one point if I remember correctly?

Would the same approach work for Activitypub protocol?

Tricky, but maybe. AP is an inbox and an outbox. You can use the mostr bridge and ditto for that.

Yep. Was just thinking today what if you could use it direclty in the browser (for AP profiles). The full nostr-AP mode is more complex

Working on it!

https://microfed.org/

Wow!

Yeah, I still believe on that idea. It's basically what npub.pro is doing but keeping their templates also inside of relays. All it needs is a a simple server that offers the event content through HTTP instead of websockets.

NIP draft is here. https://github.com/nostr-protocol/nips/pull/811/files

Interesting 🤔

👀

💯

Can we do something about it?

Web proxies with Nostr identity based AUTH that allow you to connect to Nostr-first services just using the service's npub?

Seems like there’s a need for this kind of thing.

Cc nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z nostr:npub12rv5lskctqxxs2c8rf2zlzc7xx3qpvzs3w4etgemauy9thegr43sf485vg

I don't know much about any of that, nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s is probably right. Nostr events are definitely not the best fit. It would be cool to reuse Nostr keys in a separate system better suited for this task, but that would require forking QUIC or whatever, which would be too hard and I can't really think of a concrete benefit for that right now anyway.

GM 👑 Williams 🫂💜

every single packet? i didn't know that. that sounds horribly inefficient. maybe i am not excited about that then?

the only way to send data over nostr is via nostr notes, which are a very inefficient format for binary data. It incurs a json encoding/decoding hit which is pretty slow, not to mention bandwidth inefficient. Lots of overhead for dubious gain.

That line from Jurassic Park comes to mind

Why rate-limit ephemeral events?

They should be limited only if it starts taking serious amount of bandwidth.

I think ephemeral events are great if you have something like a cloud-function that runs once in a while and needs to send requests to some computer behind NAT.

Every event will be ip-rate limited on public relays, by all means use whatever policy you want in your own relays

I understand, but can we agree that ephemeral events could have much higher limit than normal events, since there is no need to store ephemeral events?

A successful website with some backend in a home computer behind NAT might even start paying to the relays when the number of visitors increases.

Not to mention TCP guarnatees packet order and rate acceleration. I noticed they were using damus relay, too.

How do you explain me being able to download data with 2 MB/s via my own relay?

Maybe you have a fast connection?

Yeah and because it works great.

Not sure I'd say that. 2MB/s sounds like an attack on nostr.

Sorry but your antagonism is getting a bit ridiculous. You're jumping from one issue to the next. Have you ever opened primal and measured your traffic? Why are you attacking nostr?

Let's all attack nostr to make it heal back stronger 🤝

Primal talks to a single read relay, it is not a good example of actual bandwidth use. We are also talking about bandwidth capacity if relays not user connections. My relay bandwidth is sitting at a consistent 50MBps out, I will have to think of other solutions if we have any more users.

You always get defensive with feedback? Nostr barely worked with lower levels of traffic until strfry came along. I have spent days of my life trying to keep my relay alive. A while ago threads barely loaded.

The concerns are valid. We would rather use our bandwidth for notes, not for proxying traffic.

I will have to block this, because from my perspective it is an attack and abuse of relays, but of course feel free to run it on your own relays, but it would likely break after any large scale usage.

I highly doubt anyone could do that much on public relays with rate limiting. If you are not rate limiting you are begging to be dos’d

If you’re fine with blowing your note budget on ephemeral event spam then great! you are limited to 6 notes per minute on the damus relay, would be very slow.

if you want to build on top of this then fine, but I can’t see it being a reliable protocol for arbitrary relays. I would build a special purpose proxy for this use case.

Exactly. As you say, use the right tool for the right job.

On the contrary, I'm greatful for the constructive feedback.

It's just simply not true that "it's not gonna work" or "it's too inefficient". I know it works, I've actually used it, in contrast to everyone else.

For our use case, it's perfect. 6 notes per minute will be more than enough.

I'm cognisant about relay traffic burden. But I disagree that there is "no good reason".

NWS works great for low-bandwith apps. It's very useful for Cashu mints and in contrast to most other options out there, nostr can be used from a web browser. It's the ultimate "other stuff" adaptor.

About efficiency: yes, nostr is very inefficient but that's irrelevant with the payload size we're concerned with.

What are cashu mints using this for ?

To do cashu stuff

i.e. wallet to mint communication

Exactly. It's likely great for low-bandwidth / focused use-cases.

i would be totally interested in that. what solution do you recommend?