Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Page: previous  1  2 
Avatar
Alex #16
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 905
simons: you are correct.

Alan: you are sedning your packet to a bare jid. This is the reason why it doesnt get delivered. All IQs have to be sent to a full Jid, the only exception here is the Vcard IQ.
There are lots of existing clients which support Socks5 file transfer. To name only some of them: Exodus, PSI, jBother, Spark

Alex
Avatar
Alan #17
Member since May 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
Alex and Simon, thank you for your help!
Avatar
simons #18
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
I have reached the last stage of the signaling code for sending a file (still using PSI as the target app) and I am seeing some strange behavior when trying to activate the stream.  As you can see from the message sequence below the response to the Activate request message is error 405, the strange thing is that I only get an error  out of 5 times.  For the remaining 2 out of 5 attempts I get to the stage where the Socks 5 socket is open in the direction of the proxy and the file is sent to the proxy but the proxy does not pass it on to the other side.
Any ideas will be greatfully accepted.

  1. SEND:
  2. <iq xmlns="jabber:client" id="agsXMPP_5" type="set" to="simonhome@amessage.info/Psi">
  3. <si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="s5b_632851569642118192">
  4. <file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="Settings.xml" size="256">
  5. <desc />
  6. </file>
  7. <feature xmlns="http://jabber.org/protocol/feature-neg">
  8. <x xmlns="jabber:x:data" type="form">
  9. <field type="list-single" var="stream-method">
  10. <option>
  11. <value>http://jabber.org/protocol/bytestreams</value>
  12. </option>
  13. </field>
  14. </x>
  15. </feature>
  16. </si>
  17. </iq>
  18.  
  19. RECV:
  20. <iq xmlns="jabber:client" from="simonhome@amessage.info/Psi" to="simonhamelech@amessage.info/MiniClient" type="result" id="agsXMPP_5">
  21. <si xmlns="http://jabber.org/protocol/si">
  22. <feature xmlns="http://jabber.org/protocol/feature-neg">
  23. <x xmlns="jabber:x:data" type="submit">
  24. <field var="stream-method">
  25. <value>http://jabber.org/protocol/bytestreams</value>
  26. </field>
  27. </x>
  28. </feature>
  29. </si>
  30. </iq>
  31.  
  32. SEND:
  33. <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy.ag-software.de">
  34. <query xmlns="http://jabber.org/protocol/bytestreams" />
  35. </iq>
  36.  
  37. RECV:
  38. <iq xmlns="jabber:client" from="proxy.ag-software.de" to="simonhamelech@amessage.info/MiniClient" type="result" id="agsXMPP_6">
  39. <query xmlns="http://jabber.org/protocol/bytestreams">
  40. <streamhost port="7777" jid="proxy.ag-software.de" host="82.165.34.23" />
  41. </query>
  42. </iq>
  43.  
  44. SEND:
  45. <iq xmlns="jabber:client" id="agsXMPP_7" type="set" to="simonhome@amessage.info/Psi">
  46. <query xmlns="http://jabber.org/protocol/bytestreams" sid="s5b_632851569642118192">
  47. <mode>tcp</mode>
  48. <streamhost jid="proxy.ag-software.de" host="82.165.34.23" port="7777" />
  49. </query>
  50. </iq>
  51.  
  52. RECV:
  53. <iq xmlns="jabber:client" from="simonhome@amessage.info/Psi" to="simonhamelech@amessage.info/MiniClient" type="result" id="agsXMPP_7">
  54. <query xmlns="http://jabber.org/protocol/bytestreams">
  55. <streamhost-used jid="proxy.ag-software.de" />
  56. </query>
  57. </iq>
  58.  
  59. SEND: <iq xmlns="jabber:client" id="agsXMPP_8" type="set" to="proxy.ag-software.de">
  60. <query xmlns="http://jabber.org/protocol/bytestreams" sid="s5b_632851569642118192">
  61. <activate>simonhome@amessage.info/Psi</activate>
  62. </query>
  63. </iq>
  64.  
  65. RECV:
  66. <iq xmlns="jabber:client" from="proxy.ag-software.de" to="simonhamelech@amessage.info/MiniClient" type="error" id="agsXMPP_8">
  67. <error code="405" type="cancel">
  68. <not-allowed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  69. </error>
  70. </iq>
This post was edited on 2013-03-08, 18:51 by Alex.
Avatar
Alex #19
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

according to this JEP the error means "Proxy is unable to act as a StreamHost". Are you sure that both SOCKS5 sockets are setup correctly when you activate the stream?
Here you see the exact flow of your case Mediated Connection: http://www.jabber.org/jeps/jep-0065.html#narr-direct
If you do everything correct, did you try it with other clients than PSI? Orother proxies than proxy.ag-software.de?
I can remeber that we also got sometime errors when testing with PSI.

Alex
Avatar
simons #20
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
Hi,

When I run tests using 2 PSI clients the file seems to transfer every time, only when I use my code to a PSI client do I experience the problem.  In my code I send the activate message only after I have finished the Socks5 connection routine, at this stage I have no way of knowing whether the remote client has successfully connected or not, I guess I can put a manual wait into my code before sending the activate message and see whether it helps. 
Is there anything that you can tell from the proxy.ag-software.de logs?
Can you suggest another Socks5 proxy that I can use to test with?
I will also test this scenario using the other Jabber clients suggested below.

Thanks,

Simon
Avatar
Alex #21
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi simons,

as you can see in my link the target which is your PSI client opens the socket to the streamhost at point 3 and acknowledges this at point 5. So the target should be connected before the initiater is connecting to the streamhost.
I will check the logfiles later and let you know if there is something that would help you. I think jabber.org is running another implementation of a SOCKS5 proxy. You can also download the wildfire server at jivesoftware.org an run it on your local developer machine.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2 
Forum: agsXMPP RSS