Direct connection via VPN

mirillis

Administrator
Staff member
Hmm. Maybe this problem is related with these Virtual adapters. Is it possible to disable them for test an leave only one physical?
 

mirillis

Administrator
Staff member
It would make the investigation easier if you could insert a screen form wireshark when the connection works via VPN. We could see what IPs are used and ports.
 

mirillis

Administrator
Staff member
Hi vamp, can you set the inbound port (serwer port is inbound and outbound is for PC client) to RDP port 3389
 

vamp

Member
Hmm. Maybe this problem is related with these Virtual adapters. Is it possible to disable them for test an leave only one physical?

Try to disable it, but not help at all.

It would make the investigation easier if you could insert a screen form wireshark when the connection works via VPN. We could see what IPs are used and ports.

I install wireshark. I only see that the connection are establish (via gateway) it generate a lot of http connection.

Hi vamp, can you set the inbound port (serwer port is inbound and outbound is for PC client) to RDP port 3389

same result it use the relay server.
 

vamp

Member
@mirillis

Found something!!!

So i found how to filter in wireshark what protocol use remotly (RDPUDP)

So i establish VPN and try to connect it. When i start connection, seems android client see my PC directly, because i get RDPUDP packets.


But after, my android client are say that communication not possible and switch it to cloud.

edit:

ok, so if i use default ports (42015) and filter wireshark to udp.port == 42015 i see that if i use VPN, try to connect android client to PC directly first (i get a lot of packages in this port) but after that it not working and switch it to cloud.
 
Last edited:

vamp

Member
it is REALLY strange.... If i try to connect it without VPN (so only way the cloud connection) i also get exact same packages via wireshark.... So i think it is a test with windows client to access the phone directly or not.

It seems the clients it dont now at all how to use VPN tunnel.
 

mirillis

Administrator
Staff member
Hmmm maybe it connects so long using VPN that is switches to connect anywhere but not always?

There is a 10sec timeout before the switch happens. Maybe this timeout is too short?
 

vamp

Member
So the PC and Android clients behave different?

i can not test it via PC client - PC client communication, because only one PC at my home. Tomorow if i go to work i able to test it.

I'm confused. Do you see UDP packets in wireshark after connecting using VPN?

Yes i see this, but not only if i use VPN, i also see that i try to connect without VPN (no port forward)

Hmmm maybe it connects so long using VPN that is switches to connect anywhere but not always?

There is a 10sec timeout before the switch happens. Maybe this timeout is too short?

It never connect directly via VPN. Yes, about 10 sec, that try to establish direct connection.
 

mirillis

Administrator
Staff member
Can you please confirm that the wireshart screen was done in the same scenario whene Direct Connection is switching to cloud?

BTW. We will speed up direct connection from PC and increase the timeout. If the wireshark screen shows truth then it worked but does not work always.
 

vamp

Member
Can you please confirm that the wireshart screen was done in the same scenario whene Direct Connection is switching to cloud?

BTW. We will speed up direct connection from PC and increase the timeout. If the wireshark screen shows truth then it worked but does not work always.
yes, i confirm it.
 

mirillis

Administrator
Staff member
Ok, so we now know that it worked at that time and it was a direct connection. We will increase the timeout and speed up the PC client connection time to be as fast as the Android version. Soon we will also add simultaneous connection to many PCs at the same time from one PC (sessions) and a special mosaic mode for monitoring up to 16 PCs without connecting to them (refreshed every 15sec).
 

vamp

Member
Ok, so we now know that it worked at that time and it was a direct connection. We will increase the timeout and speed up the PC client connection time to be as fast as the Android version. Soon we will also add simultaneous connection to many PCs at the same time from one PC (sessions) and a special mosaic mode for monitoring up to 16 PCs without connecting to them (refreshed every 15sec).

i only not understand one thing... i get exact same result in wireshark, when i try to connect with and without VPN....

Hmm also interesting... The VPN are active, but the PC client seems try to send the data to my mobile phone IP directly... (outside VPN tunnel)

1688306046782.png
 
Last edited:

vamp

Member
I try access use my mobile phone with Sunshine. The mobile client is Moonlight. Monitor 47998 UDP port, that Sunshine use it. If you see, my PC (192.168.31.102) send the data to VPN tunnel (192.168.31.105, it is the Server that run Tailscale)

1688306518261.png
 

mirillis

Administrator
Staff member
Thank you for the in-depth analysis! This helps a lot. It is strange that there is this global IP visible in wireshark when using UDP. I think even when you see this in wireshark the traffic will not go outside this local network on the router. It should stay local I think. But indeed we need to fix this so that the local IP is used if the devices are in the same network.

Below is my output of Wireshark for a local connection. I don't see the global IP (the 61130 port is assigned by the system on PC ad 42015 is forced on Android device).

loacl.png
 
Top