Can wodXMPP and wodVPN act together? - WeOnlyDo Discussion board

Can wodXMPP and wodVPN act together? (wodVPN)

by Fabio, Thursday, August 31, 2017, 18:19 (2641 days ago)

Hello,

I already have a XMPP server (Ejabberd 14) and a chat software created with Delphi (using another XMPP component). My question is if there is some native way to integrate wodXMPP with wodVPN. With "integrate" I mean an easier way to program a chat software where user click (choose) an online contact from his list and can start a P2P VPN between them, to send files, videos, audio, etc.

Btw, I sent an e-mail to you a couple of days ago, but can't connect to that e-mail since yesterday.

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 18:27 (2641 days ago) @ Fabio

Hi Fabio,

Wippien we created long time ago does just that - it uses wodXMPP for chat, and when user wants to establish VPN, then wodXMPP under the hood exchanges exchange data that digests to password, and then initiates wodVPN to establish connection between peers.

So, answer would be yes, you can use wodXMPP for that.

I suggest you create some common prefix (such as VPNINIT) that you prepend to messages that is used for VPN. When one side sends such message, other wodXMPP receives is and doesn't show it to the user (since it starts with VPNINIT), but rather takes new wodVPN instance and sends VPNINIT message back. Then both sides initiate wodVPN and call Start, Connect, etc.. from it.

So, algorithm depends on you how to implement it. I suggest you don't share password through wodXMPP (even server is yours), but rather use some exchange method (such as Diffie-Hellman) to create secret password known only to two wodXMPP sides.

Kind regards,
Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 18:47 (2641 days ago) @ Jasmine

Hi Jasmine,

I have limited knownledge about this subject, so I apologize in advance for any "no sense" questions.

Here is another one: Using XMPP server to "connect" both wodVPN sides, can I eliminate the "mediator" script?

I will download Wippien for making tests! Thanks!

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 18:57 (2641 days ago) @ Fabio

Hi Fabio,

you cannot eliminate mediator, since it's used to mediate between two wodVPN instances to share their location.

You could, in theory, not use mediator if you know IP and Port of both wodVPN sides, and they are not firewall protected in any way. But if you use wodVPN and it's "hole punching" ability to connect to peers even between firewalls and NATs, then mediator is required.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 19:42 (2641 days ago) @ Jasmine

Hello Jasmine,

Ok, no problem about the mediator.

I installed Wippien in 2 virtual machines (XP and 7) for making tests, but option to send file is disabled. See this images imgur.com/a/nUyKN Maybe is some configuration in my XMPP server?

Please, can you help me configuring the application for making tests and understanding how wodVPN works? Thanks!

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 19:48 (2641 days ago) @ Fabio

Hi Fabio,

unfortunately, I can't. I can't provide support for Wippien here. It is Kreso's product, but I'm not sure when was last time it was updated and in which stage it currently is. I just referenced it 'it works as you wish', but I can't talk or help with its features.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 20:00 (2641 days ago) @ Jasmine

Ok, I will try to make tests with your demo application for Delphi. Can you tell me if I can change something in the source for the "WeOnlyDo\Samples\wodVPN\Delphi7\Component\1. Simple" to work?

I already followed the steps from the "Getting Started with Delphi", imported the library inside Delphi and compiled the demo application.

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 20:06 (2641 days ago) @ Fabio

HI Fabio,

I checked your images now. Hmm. Things are a bit more complicated than 'compile and run the sample'. I see you tried to open \\5.x.x.x. Did both sides receive IP address of form 5.x.x.x? Who set it up? How? DHCP or static ones?

Go step by step. Make sure wodVPN connects with each other using our sample so you can send messages through it (not through wodXMPP). Just for a test. If message goes through, then VPN will go through as well, so let's make sure that channel is established between two wodVPN instances. You can use fixed password for tests and then change password creation algorithm later.

If it fails - make sure you tell me exactly what fails, because simple "It does not work" can't help me investigate the problem. If you get the error - tell me which error it is.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 20:24 (2641 days ago) @ Jasmine

Hi Jasmine,

Did both sides receive IP address of form 5.x.x.x? Who set it up? How? DHCP or static ones?

The IP 5.x.x.x was automatically set by Wippien in both installations (VM). I also tried changing with my network (LAN) IP and Internet (WAN) IP, none of them worked.

I am making tests in a "home" network, with an simple ADSL router. I do not think it have a firewall, but I will check.

I will also make tests with the compiled demo and let you know the results.

Thank you! I already like your support! :)

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 20:25 (2641 days ago) @ Fabio

Hi Fabio,

ok, now try to send simple message from wodVPN. I think our sample has already button that does it.

And, make sure wodVPN instances are connected.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 21:13 (2641 days ago) @ Jasmine

Hi Jasmine,

Here is a image from the test demo (Delphi): imgur.com/a/s71W4

Code from search button is:


wodVPN1.Tag := 0;
wodVPN1.RetryWait := 1000;
wodVPN1.RetryCount := 15; // search for 15 seconds (each second one packet)
wodVPN1.Search(SrchUDPSingle, Edit3.Text, 'mediator.weonlydo.com', 8000);
AddToList('Searching for '+ Edit3.Text);

Seems that mediator.weonlydo.com was not found, or I didn't understand what to do. Can you help please?


Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 22:19 (2641 days ago) @ Fabio

Hmm. Your code seems fine. And I checked for mediator, it's online at IP 91.134.235.212 and works ok.

Where do you get Host not found? Is it result of Search method call?

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 22:43 (2641 days ago) @ Jasmine

Hi

Where do you get Host not found? Is it result of Search method call?

Yes. Please, what the "Search" button do exactly? For example, My ID is John and Remote Id is Bill. Search button would connect to your mediator to gets IP from Bill ?

I did some other tests: used in "Step 2" the localhost (127.0.0.1) and port of each other peer, and now can connected. See the imagem imgur.com/a/w6TDu . But I repeated this test with the IP from the internet (Wan) in 2 different computers / internet connections and can't connect. The application try to connect and show the message DISCONNECTED.

Must I use the Add TCP forwarding channel?

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 22:45 (2641 days ago) @ Fabio

No need to add TCP forwarding channel.

You should press Search on both forms at more/less same time (within few seconds). They both sends packets to mediator.weonlydo.com. When he finds a match that both parties are searching for each other, mediator just replies back with details from one-another. Then his job completes.

But you should not get host not found since mediator is online and working.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Thursday, August 31, 2017, 23:18 (2641 days ago) @ Jasmine

Ok, I did tests in another computer and it works! I think my Comodo firewall was causing the issue, even though I disabled it for testing...

One more question please: When I used the Search button in Step 1, the Hostname field in Step 2 was filled with a "strange" IP. It is not my WAN neither my LAN IP... Is this the IP from the mediator?

Now I will try to implement a function to share some stream between the peers.

Thank you again!

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Thursday, August 31, 2017, 23:19 (2641 days ago) @ Fabio

Hi

Could this be your WAN address? What was it? DId you do a whois for that IP to try to determine who it belongs to? What does 'what is my ip' in google return to you, is it same as this one?

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 00:05 (2641 days ago) @ Jasmine

Hi!

Could this be your WAN address? What was it? DId you do a whois for that IP to try to determine who it belongs to? What does 'what is my ip' in google return to you, is it same as this one?

Ok, it is an IP from my VirtualBox Ethernet adapter. The correct IP should be my WAN IP ?

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 00:07 (2641 days ago) @ Fabio

Are you referring to where wodVPN has connected? Oh, that's fine then.

When mediator replies to both sites, it sends list of IP addresses for peers - in case they are on same LAN (like you are now) so that direct connection is made, and not through internet. So IP address that responds first and connection establishes - that IP is used.

In your case, it connected through virtual IP from your VirtualBox. It's fine.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 00:26 (2641 days ago) @ Jasmine

Hi Jasmine,

Ok! Now I am reading your help file and trying to create a simple procedure to send files between the peers.

My last question for today :): In my main computer I still get the "Host not found" message, even after uninstalling the Comodo Firewall and restarting Windows. I already tried to "ping" the IP from your mediator and it is accessible. Do you have any idea what can cause this issue?

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 00:44 (2641 days ago) @ Fabio

Fabio,

no, I don't see why it returns that. Did you try to put IP instead of hostname?

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 00:49 (2641 days ago) @ Jasmine

Hi!

Did you try to put IP instead of hostname?

The issue happens when I click in the Search button. If I put manually the hostname and port (step 2) it connects normally. I will do more tests here. Thank you very much!

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 00:52 (2641 days ago) @ Fabio

No, I mean did you try to use IP in Search method instead of hostname?

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 00:59 (2641 days ago) @ Jasmine

OMG, I changed the code this morning for making tests and typed the mediator URL wrong. My mistake!! Sorry!

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 15:13 (2640 days ago) @ Fabio

Hello again!

Yesterday I was reading the wodVPN help file and found this information about the SendData method:

"You will not get notification when message is delivered. You can not know when exactly you can send new message, SendData isn't made for such "time sensitive" operations or for transferring large amount of data. Even SendData, in theory, can send any amount of data, your complete VPN will be frozen until message is delivered, so all forwarded ports will have to wait."

So now I do not think this solution will help. What I need is to allow users to transfer files between them (P2P), in a way they can send/receive any amout of data (specially videos) with a progress status. Security is also important. It is basically what we can do with Whatsapp or Skype chat when sending files, but what I think is to avoid using my XMPP server as a "bridge", so would be great if I can allow users to connect P2P. Please, do you have another solution that I can use? Or any other tip to archive my needs?

Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 16:05 (2640 days ago) @ Fabio

Fabio,

XMPP server is not a bridge. It is sort of 'presence' protocol - it gives you ability to find other people. WHen they interact directly, they don't use any bridge.

If you don't use XMPP protocol, you must decide which other way of finding persons will exist. You can't assume everyone will be online all the time, and press 'Search' button on all of them constantly hoping your peer will reply.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 16:36 (2640 days ago) @ Jasmine

Hi Jasmine,

I need that my chat software (created with Delphi) allow users to send files between them (P2P) and they can follow the sending progress, with some sort of progress bar. Can I do this with wodVPN? If not, do you have another solution that I can use?

Thanks! Regards,

Fabio

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 16:48 (2640 days ago) @ Fabio

Does wodXMPP file transfer support XEP-0166 ?

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 21:01 (2640 days ago) @ Fabio

Hi Fabio,

Jingle is not supported in wodXMPP.

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 21:42 (2640 days ago) @ Jasmine

Ok, no problem. Please, keep this as a suggestion for future versions. I bet it would increase your sales, I did lot of research about this subject and found nothing for Delphi... Thanks!

Can wodXMPP and wodVPN act together?

by Jasmine, Friday, September 01, 2017, 21:01 (2640 days ago) @ Fabio

Fabio,

if you establish P2P connection with wodVPN, I suggest you forward some port, and then use any kind of application for file transfers you wish, any that work by "dumping" data to specific port.

There's not need to forward all network traffic, thus you don't need virtual network adapter with specific IP addresses (ones that are used by Wippien and 5.x.x.x range)

Jasmine.

Can wodXMPP and wodVPN act together?

by Fabio, Friday, September 01, 2017, 21:36 (2640 days ago) @ Jasmine

Hello Jasmine,

Ok, I understood your idea and wil try to implement using wodVPN. Thanks!

Regards,

Fabio