apple’s private relay (MASQUE) seems better than a vpn for web requests: 1. you encrypt the request for the second hop’s exit node (cloudflare?), 2. Apple can’t see what you are requesting. 3. The exit node can’t see who made the original request since it is proxied by apple. Clever! Going to try to use this in damus ios for relay connections.

Replies (61)

Yeah MASQUE uses OHTTP, but it is compatible with all servers. OHTTP request special support on the target server to decrypt requests. In MASQUE the exit node handles the decryption of the outer layer, while still providing e2e encryption for the request via QUIC. Not exactly sure how it works but sounds amazing.
tank's avatar
tank 1 year ago
I think Carl also wants to offer an SDK
apple provides relays for iCloud subscriptions in safari, but they also provide the ability to make any of your network requests use your own MASQUE servers. Not even sure you can use theirs for our purposes. But yes, damus ios is fully integrated into the apple platform and its dependencies. It’s an ios app. Damus notedeck and android are free from this, but will be able to use the same technique because masque is just a protocol.
Default avatar
nobody 1 year ago
Do you have any launch date (even if it’s not exact). Want to use in my linux machine.
DZC's avatar
DZC 1 year ago
Using masque protocol sounds really interesting. Using Apple servers to proxy your traffic, not at all. We'll see how this evolves. 🫂
If we can I would use apples infra. In the meantime I have been talking to people to potentially figure out a way to run nodes ourselves but separately to gain privacy benefits.
> No need to reinvent wheel You’re talking to a man that wrote a custom database in C. Damus is all about new wheels.
if nostr used postgres and not lmdb then it wouldn’t work. The damus relay was pegged at 100% cpu with postgres. lmdb is actually the perfect match for nostr.
If you mean postgres without custom configuration, absolutely. But postgres can run entirely in memory via mmap just like LMDB does. Nonetheless I find it too heavyweight to configure and manage whereas LMDB is just compiled in, doesn't need the multiple-client stuff, the SQL parsing, the query planner, etc... if you code that stuff into your client, which can be done when the queries are not too numerous or complex. So yeah I like LMDB better for this use case, but my brother the postgres core dev insists postgres can do key-value, nosql, all-in-memory, etc, just as good as the other databses. I say "there there little brother, I'm sure it's real good."
i have run almost every piece of relay software on the busiest nostr relay, from sqlite to postgres to lmdb, have you? Or do you just like talking out of your ass to sound like you know what you’re talking about.
Not only that, notedeck +nostrdb can do 1000s of queries per second in less than a millisecond, so all of my ui can be realtime and no async. Yeah so slow 🙄
It makes a lot of sense if you think about it, once the data is paged in, it’s just a btree data structure in memory. Especially if your data is stored as flatbuffers like strfry and nostrdb. In fact, i doubt you can make something faster than lmdb. It’s pretty much optimal cache wise.
haha xmonad is a bit cluncky but I have customized it too heavily and its hard to move off it :( I would love to switch to wayland one day but im stuck 🥲
I remember when it came out in 2011 or so, people were agahst and in awe of how fast it was.. like this was impossible. And some smart developers went digging to try to find the "problem" because it must be doing something wrong to get that speed. And what they discovered was that it was simply using several really smart techniques in ways people hadn't put together before, like copy-on-write, b+ trees, mmap returning direct pointers to the data instead of copying it, etc. I also think it is probably at or very near the maximum theoretical performance. Of course unlike you, I don't utilize that performance on my relay. wss://chorus.mikedilger.com:444/ is currently only serving 15 connections.
Postgres is an academic experiment and every time I've seen someone attempt to scale it, it ends in tears. Salty, salty tears, and massive amounts of un-necessary hardware deployed in an attempt to stop the mysterious bleeding out of its performance under a high rate of queries. Maybe postgres Jesus will join the org and save it somehow, but he never does. Anyway, MySQL is better, and lmdb seems best for what nostr is doing (serving notes directly from a memory mapped cache).
flatbuffers is great, as are binary blobs that are directly accessible without deserialization (such as my pocket-db) or rust `speedy` (barely any deserialization really, but it does still copy). It is funny how copying something actually makes a performance difference for us. That is how fast we are now. For most people a memory copy (with its concomitant malloc) is trivial and lost in the noise of their real performance bottlenecks.
MySQL is better? lol no. Not true at all. NoSQL like Scylla or Cassandra would be the better choice. Sure, LMBD serves a lot from memory mapped cache but for some reason, IO is still way higher than competing technologies. Postgres is much lighter for IO for NOstr's use case.
basically dwm but on wayland. Same suckless phylosophy, suckless hackability, tons of cuatomizations by codebase patches, same config.h files to customize. Its a bit more bloat and difficult to hack-with because it implements wayland protocol and that means it needs to handle more things windows-compositor-side and sometimes breaks things from a version to another cause protocols changes. But works, its great.
a tiling window manager; a nerdy, minimalistic and hackable way to put things on screen on a linux pc doing keyboard key-combos. Often the time required to get into these things would be better spent doing real things with friends and family, but everyone has his passions I think..😅 For graphical reference, here is dwm or something very similar:
Carl Dong. bitcoin-core guix/reproducible build implementor. I would tag him but I haven't implemented tagging in notedeck yet.
They have a footer on the bottom of their page to input your npub to receive messages to keep up with their development. Next to their email sign up. Very cool!