Redirecting Problem on WebSockets (wodVPN)
by uzuner, Tuesday, January 21, 2014, 20:55 (3909 days ago)
I'm using WodVPN for p2p communication and I need to use WebSockets with TCP channel but channel forwarding not working correct with websocket protocole.
Without port forwarding Websockets works good, channel configuration is correct and work with other TCP communications.
I tried "IP Works WS for Delphi" and "Esegece WebSockets for Delphi"
All WebSocket Components says "Socket Error #10061" (Connection refused.) on connecting.
I have no idea about it, have any suggestion for this.
Redirecting Problem on WebSockets
by wodDrazen, Tuesday, January 21, 2014, 21:10 (3909 days ago) @ uzuner
Hi Uzuner,
From pictures you sent everything seems correct and connection should work. Did you maybe change something inside our sample? What happens if you use our sample as is on both sides?
Do you have maybe some firewall that could block local port forwarding? What happens if you disable it and try it again?
Let us know how it goes.
Regards,
Drazen
--
_________________________________________________
WeOnlyDo! Software - Internet Security Components
----------=== http://www.weonlydo.com ===----------
Redirecting Problem on WebSockets
by uzuner, Tuesday, January 21, 2014, 23:21 (3909 days ago) @ wodDrazen
Hi;
I'm using WodVPN's own sample on tests and only I add this for MTU tests;
procedure TForm1.Button6Click(Sender: TObject);
begin
wodVPN1.MTU := StrToInt(Edit11.Text);
end;
I know everything is correct on WodVPN configuration because I use Indy TCPServer/TCPClient like this and Indy works correct.
WebSockets (IPWorks and Esegece) works very well when I'm not using forwarding port to other peer with channels on WodVPN.
But WebSockets and WodVPN Channels not working together and WebSocket Client says "Connection Refused" everytime.
I'm trying all peers on same computer (local) and I have no firewall or another restriction object.
All peers find the other peer on mediator.weonlydo.com:8000 and there is no problem on find, connect or send somethink on WodVPN.
Redirecting Problem on WebSockets
by wodSupport, Tuesday, January 21, 2014, 23:24 (3909 days ago) @ uzuner
Uzuner,
hi. Did you add and start this channel correctly? Did ChannelStart
http://www.weonlydo.com/VPN/Help/wodVPN-ChannelStart-Event.html
event fire on both sides of wodVPN?
Kreso
Redirecting Problem on WebSockets
by uzuner, Tuesday, January 21, 2014, 23:33 (3909 days ago) @ wodSupport
Redirecting Problem on WebSockets
by wodSupport, Tuesday, January 21, 2014, 23:42 (3909 days ago) @ uzuner
I'm looking at the picture you posted, and I'm not sure what I see. Are you running them both on same PC?
If so, then you're redirecting:
25252 -> 5414
is that correct? 25252 is listening, accepting connection. All that arrives goes to 5414 (wodVPN is not listening there).
BTW you're redirecting TCP or UDP connection?
Kreso
Redirecting Problem on WebSockets
by uzuner, Tuesday, January 21, 2014, 23:53 (3909 days ago) @ wodSupport
Yes I'm testing it on local and all peers on same pc.
WebSockets works on TCP
WebScoket Server Running on 5414.
I'm listening port 25252 with WodVPN and I'm redirect to other peers 5414.
I have tested it with other TCP communication which use indy, so I think this must work with WebSocket too.
Redirecting Problem on WebSockets
by wodSupport, Tuesday, January 21, 2014, 23:55 (3909 days ago) @ uzuner
Are you sure port 25252 is open, and that 5414 is open too? 5414 should be open by your websocket software. If you do 'netstat -an' you should see 127.0.0.1:25252 and 127.0.0.1:5414 having 'listening' state.
Kreso
Redirecting Problem on WebSockets
by uzuner, Wednesday, January 22, 2014, 00:05 (3909 days ago) @ wodSupport
Redirecting Problem on WebSockets
by wodSupport, Wednesday, January 22, 2014, 00:07 (3909 days ago) @ uzuner
If all are set to listen, why do you get Connection refused with your chat software? Did you try to connect to those ports with any other tcp client, such as telnet, or putty (in raw/telnet mode)?
BTW I don't really know what WebSockets you're referring to, so my guess is that those are regular sockets. If they're not, then problem could lie there.
Kreso
Redirecting Problem on WebSockets
by uzuner, Wednesday, January 22, 2014, 00:28 (3909 days ago) @ wodSupport
I'm using WodVPN for a long time and I know many problems on it but I solved same of them indirectly.
For example;
- you create a channel on WodVPN and you create and delete many tcp connection like http protocole WodVPN hang after some hours and I'm freeing WodVPN all and re create them again.
- When you use all peers on same pc, wodVPN work really slow and many packet corruptions become.
- When I use TCP channel with blocked sockets, packets arrive to other side wrong packet or packet sizes; (Ex. SendPacket1="aaaaaaaaa" SendPacket2="bbbbbbbbb" --->>> ReceivePacket1="aaaaaaaaabbbb" ReceivePacket2="bbbbb" ReceivePacket3="")
I'm waiting an update for these for a long time and I think websocket problem is related with these issues.
Do you have a update plan in a short time on your road map.
Redirecting Problem on WebSockets
by wodSupport, Wednesday, January 22, 2014, 00:32 (3909 days ago) @ uzuner
But, wrong order, by definition of TCP, cannot happen. I cannot say why you experience those issues, but it just cannot happen.
I cannot say if this is related to WebSockets or not. However, I am not sure that WebSockets use regular TCP at all. It could be this is HTTP protocol related socket.
Did you manage to use them with any other TCP service at all? Such as Indy<>WebSockets directly? Does that work?
Kreso
Redirecting Problem on WebSockets
by uzuner, Wednesday, January 22, 2014, 00:44 (3909 days ago) @ wodSupport
I did use Ararat Synapse and same issues ( connection refused, reset by peer,... ) become only when I use communication in Channel redirections.
For Example; I Connect one peer to other over channel and it works good after I send a buffer it work if I send a string after this buffer, and I send another string but it arrive empty string and connection not lost after many try some times second string arrive correct otherwise empty string. And I think websocket issue is like this
Synapse is socket library which is using blocked sockets.
Redirecting Problem on WebSockets
by wodDrazen, Wednesday, January 22, 2014, 13:28 (3908 days ago) @ uzuner
Uzuner,
I tried to duplicate your issue on our side. However it works without any problem.
I'm running one instance of wodVPN (one peer) and your socket server inside virtual machine and other wodVPN peer and your socket client on my local PC.
Did you maybe try our samples as is? Does it work in that case maybe?
Drazen
--
_________________________________________________
WeOnlyDo! Software - Internet Security Components
----------=== http://www.weonlydo.com ===----------