P2p explanation - serverless, totally offline chat

I wanted a software that would only identify IP’s using DHT. But if I could place the IP myself (or whatever other process unlike IP - DOESN’T MATTER), the software would never even connect to anything else outisde the two. Is this possible?

In the docs it says that messages pass through the DHT.
But let’s say I add a contact. I don’t want EVER AGAIN to touch any other DHT, bootstrap, etc. after identifying him by an userid on the internet after the software already knowing we established trust.
I want to contact someone I TRUST directly p2p without using anything else except two devices. If it’s by knowing his IP or previously identifying him online, etc. doesn’t matter.

After the id’s conditions (for most online contacts necessities) there’s some strange connections to the internet which seems to be quite the contrary of the purpose of p2p.
All unnecessary even by global messangers that could be relieved of data waste if both of them agree to chat only between the two without a third.

1 Like

Can you show the reference to the documentation?

My understanding is that the DHT is used to find what is the IP of the correspondant, as this IP can change when your correspondant goes offline. So your contact list has the hash identifying your contact. When you want to establish a communication, Jami asks the DHT with the contact’s hash to get the IP, and then it creates a session between your IP and your correspondant’s IP.

May be I’m wrong but that’s the way I imagine it works.

1 Like

Classic config

  • Send a message

The Jami application is running a DHT (opendhtnet) node on your device. So every operations on the DHT will use your ips. This is why Jami has the option to use a dhtproxy (eg dhtproxyjaminet), this will avoid to use your node, but will use another node on the network (which will see your ip). Note that your message is not sent directly to the other device. In fact your message is sent on some nodes of the DHT and your contact will retrieve the message on this node. So, your contact don’t see your IP at this step, but the node who get the message will (or they will see the IP of the proxy).

By the docs is straightforward the message isn’t p2p. If what the doc wanted to say is that it actually just identify the ip, what I’m asking is if there’s a chance that I skip this if I can reach dynamic IPs through other means which are not through DHT, bootstrap, etc.
IP-to-IP if I know it. So there’s not a single other connection.

1 Like

Setting the IP address of the contact person yourself may be a very useful feature,This helps to achieve more stable and secure communication with contacts, provided that the two people are familiar with each other and trust each other

Note that your message is not sent directly to the other device. In fact your message is sent on some nodes of the DHT and your contact will retrieve the message on this node.

It helps anonymizing text message without revealing the IPs. I didn’t know Jami worked that way. But I suppose it can’t use the DHT when sending attachments or for audio or video calls. Imagine sending a few TB file as attachment and crashing users with Jami on their phones…

It might explain why I receive multiple notifications on my phone when I receive an attachment :rage:

An option for a direct IP for true P2P exchange with trusted contact is a good idea.

:person_facepalming:No. Actually it sends encrypted messages on DHT to exchange ICE candidates.

The docs is outdated.

That means messages are still unnecessarily being sent to global internet?
I understand getting ID through the internet resolves a lot, but after it being done there’s no necessity if I allow trust.

Jami’s conversation message should be sent directly from the sender’s IP address to the other party’s IP address without going through DHT. However, I think manually entering the corresponding IP address to initiate the conversation is a good choice. This means that when necessary, we can skip DHT when we don’t want to appear on the DHT network.