nostr-protocol / nostr

a truly censorship-resistant alternative to Twitter that has a chance of working
10.04k stars 322 forks source link

Censorship resistance model and media negotiation #53

Open harmoniqpunk opened 2 years ago

harmoniqpunk commented 2 years ago

Hi,

I'm trying to understand censorship resistance model. I have read the specs and I didn't found nothing about transport. I guess it's up to the client and relay to negociate the transport. But still I didn't found any information about negotiation of the protocol between client and relay, then negotiating media like the SDP in SIP or WebRTC.

To really make it censorship resistant the traffic should be indistinguishable by any useful protocol like https or mqtts in deep packet inspection. They can censor services and protocols that are not needed for country infrastructure, but they can not censor protocol used in country infrastructure like https or mqtts.

Another concern is how normies can easily discover relays without the ability to build blacklists?

I didn't found too much information about these topics.

fiatjaf commented 2 years ago

The specified transport is websocket between a client and a server (relay). Of course other transports can be done too but we're trying to keep it simple for now.

I don't know enough about deep packet inspection and what can be done on these matters, the kind of censorship I had in mind wasn't that. I hope websockets meet the target there though. If not, then Tor would work, or a different transport would have to be done for people under that kind of censorship.

To discover relays there is the message kind 3 (recommend_server) which can be received from anyone and each client can decide what to do with it, and there is also kind 2 which has a list of contacts along with recommended relays for each. Also each kind 1 message can also contain recommended relays for events or pubkeys mentioned in it. Other kinds of sharing can be accomplished, but ultimately it will depend on clients to send these recommendations and to interpret them.

Ultimately I think word-of-mouth and domain name reputation will play the most significant role in relay discovery, but we must be extra sure nonetheless.

Azuriye commented 1 year ago

Just a small hint, there are protocols like V2ray/X-ray/Trojan and etc. where people from Mainland China use these to unblock most of their internet as the internet rules are pretty tight down there. Same case for Iran and other Islamic based countries where Shari'a law has a huge influence on how the internet is designed.

You can have a look at this thread https://github.com/net4people/bbs/issues It should give you some useful insight as to how governments are blocking off internet and whether there is a way to circumvent such issues. I am sorry in advance that English is not my first language so I apologize for my incompetence.

Pantyhose-X commented 1 year ago

Geneva is an artificial intelligence tool designed by researchers at the University of Maryland that defeats censorship by exploiting bugs in censors, such as those in China, India, and Kazakhstan.

ghost commented 1 year ago

Hi fiatjaf, harmoniqpunk, Pantyhose-X, Azuriye.

QUIC or "Quick UDP Internet Connection" is a new encrypted transport layer network protocol. QUIC was designed to make HTTP traffic more secure, efficient, and faster. Theoretically, QUIC has taken all the best qualities of TCP connections and TLS encryption and implemented it on UDP. can we use the QUIC protocol in nostr? Have you all thought about adding QUIC+nostr?

what do you all think of the idea of ​​adding a QUIC(Quick UDP Internet Connection) transport layer to nostr? it makes sense?