Android Question Connecting App with jrdc2 without real ip through Internet, like TeamViewer or Anydesk

A Z M JANNAT UL KARIM

Member
Licensed User
I don't know whether it is the right place or I need to post it on Chit Chat.
Hi, anyone think about the Subject? Just curious if it is possible. With some connectivity knowledge can it be done?

Thank You :)
 

A Z M JANNAT UL KARIM

Member
Licensed User
Yes, you are right. I am not referring to screen sharing here. I want to share service like jrdc2. Just let me explain more briefly. My client have different server on their end with same application. I want to build a general app to connect with their server. They don't have any real ip. In this scenario TV or AnyDesk they are connecting with each other through some tunneling concept with a static middle server controlled by them. What is the concept behind the scene is actually my thought. Whether it can be implemented here ...
 

DonManfred

Expert
Licensed User
So port need to be forwarded through some way...
it happens in the Router in this Network respectively it must be configured in the Router.

This is something which must be setup correctly to access the jrdc2.
Configure the router to forward the access to the correct machine running the jrdc2 and use the router wan ip then.
 

DonManfred

Expert
Licensed User
Do we need to setup router for it?
TEAMVIEWER is NOT related! It has his own system.
For this the teamviewer and the server must speak together. It is some code in teamviewer AND the server which must communicate.
There is no such think in jrdc2.

Teamviewer starts a server on PC1 and PC2 is connecting to a tunnel which both, teamviewer and server is using.
Again; there is no such thing in jrdc2 so nothing to communicate with.
 

A Z M JANNAT UL KARIM

Member
Licensed User
Okay, so what TeamViewer doing is connecting with Server and forwarding some network port to create tunnel with PC2. So I need separate application to forward jrdc2 port to server. Thank you Don for pointing it. Now the thing is how? What is the general concept here for this tunneling?
 

DonManfred

Expert
Licensed User

A Z M JANNAT UL KARIM

Member
Licensed User
See this tutorial: https://www.b4x.com/android/forum/t...r-b4j-server-over-the-internet.37201/#content

I don't know if DuckDNS is still active but the concepts are still valid.
Thank you Erel for the post. I created a free DDNS there and tried the sample project, it worked :) Just a little more help please ...
How to implement it with jrdc2. If I change the following code of jrdc2, should it worked ? Do I need to copy HttpUtils2Service module to jrdc2 project as I am not using the upload service. Do I need to do anything extra ?

B4X:
Sub Process_Globals
    Private domain As String = "http://test.duckdns.org"
    Private token As String = "xxx"
    Private updateIp As Timer

    Public srvr As Server
    Public rdcConnector1 As RDCConnector
    Public const VERSION As Float = 2.22
    Type DBCommand (Name As String, Parameters() As Object)
    Type DBResult (Tag As Object, Columns As Map, Rows As List)
End Sub

Sub AppStart (Args() As String)
    updateIp.Initialize("updateIp", 10 * 60 * 1000) '10 minutes
    updateIp.Enabled = True
    UpdateIp_Tick

    srvr.Initialize("")
    rdcConnector1.Initialize
    srvr.Port = rdcConnector1.serverPort
    srvr.AddHandler("/test", "TestHandler", False)
    srvr.AddHandler("/rdc", "RDCHandler", False)
    srvr.Start
    Log($"jRDC is running (version = $1.2{VERSION})"$)
    StartMessageLoop
End Sub

Sub UpdateIp_Tick
    Dim j As HttpJob
    j.Initialize("j", Me)
    j.Download2("http://www.duckdns.org/update", Array As String("domains", domain, "token", token, _
        "ip", ""))
End Sub

Sub JobDone (j As HttpJob)
    If j.Success = True Then
        Log("Update DuckDNS: " & j.GetString)
    Else
        Log("Error updating Duck DNS: " & j.ErrorMessage)
    End If
    j.Release
End Sub
 
Top