How can do P2P connections on Android

Hi,
I want create P2P connections from mobile phone (Android) to raspberrypi.
It is very good working on PC (Win10 with desktop application remote.it) where I can define fix port and through localhost (127.0.0.1) I connect to raspberrypi. But in Android application remote.it I did not find possibility to setup fix port number. By each connection the application generate different port number. Of course when I use this port number the connections is working.
Also I do not understand when I use wifi (on the mobile phone) the connection is with localhost:port (e.g. 127.0.0.1:30000) and when I use data (on the mobile phone) the connection is with url:port (e.g. proxy55.rt3.io:31003).

Is it possible to use P2P on the Android?
Thank for your help.

Hi riki,

a) You can make a P2P connection from the Android client however at the moment you can’t set the port manually,
b) if the connection is on localhost it’s a P2P connection, if it’s on proxy…etc then it’s a proxy connection.

There are some situations where P2P connections will not work - and when that happens it starts a proxy connection instead.

Does this answer your questions?

Thank you gary for your answer.

Now is more clear for me.

Do you think to update the android app to set fix port in the future?

Riki

Dňa pi 8. 5. 2020, 19:05 Gary via remote.it Community Forum remote@discoursemail.com napísal(a):

Hi Gary and riki, I would like to know how to make the P2P connection from Android remote.it app to the Rpi? The remote.it app on android seems only support the proxy connection only. Thanks.

Hi devices,
I also only beginner with using remote.it but gary answered also on your question.
If you make the connection on the Android and in the connection address you see localhost (127.0.0.1)
then it is P2P connection. If in connection address is url (e.g. proxy55.rt3) then it is proxy connection.
You have not influence on the type of connection. You also can not set the port even if the remote.it create P2P connection.
riki

Hi riki, Thank you very much for your reply. In my case, when using the remote.it app on Android, I always have the proxy connection( proxy55.rt3.io:31003) instead of the P2P connection (127.0.0.1:30000) on both Wifi and 4G (data) connection. It means there is no chance to have the P2P connection from Android to my target device.

I also use the connectd option (https://github.com/remoteit/connectd) on my Android phone (no root) with termux to see whether I can get the P2P connection but it does not work as well. Cannot reach the P2P connection to the target device. But it works fine on Windows. That’s why I assume there is a way to make the P2P connection on Android by using the remote.it app. We can see this feature here from app release notes:
This release includes a number of enhancements and features:
New: Added an in-app browser with P2P connection functionality
• New: p2p connections failover to proxy
• New: Allow creating public proxy connections on Android
• Fixed: Show devices with no hardware id
• Fixed: Reverse-proxy connections are public only, peer to peer are private only
• Fixed: Secure web not working on p2p
• Fixed: No longer defaulting to P2P for Secure Web
• Updated: IP Restriction limit for shared devices

Thanks.
devices.

In some cases, a peer to peer connection won’t work properly. If you connection works from the web portal (e.g. something like proxy14.rt3.io:34156) , you might be in such a situation. It depends on both the client and target network connection NAT type and also whether one or both ends are on a cellular data connection.

If you’re testing this with both client and target in the same location, there’s a possibility that it would work once the target device is in its actual location, but no way to actually predict it without trying.

Run the following command on both your target and client devices and post the results here.

connectd -n