Not logged in. · Lost password · Register
Forum: XMPP Protocol RSS
Page: previous  1  2  3  4  next
Avatar
scharfed #16
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 1156
My wildfire server accepts  s2s connection on port 5269, and file transfer proxy is enabled on port 7777.  Here is a dump of my XML debug (apologies for the length)

SEND: <stream:stream to='192.168.10.71' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="192.168.10.71" version="1.0" xml:lang="en" id="816252f" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
SEND: <stream:stream to='192.168.10.71' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="192.168.10.71" version="1.0" xml:lang="en" id="816252f" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09IjE5Mi4xNjguMTAuNzEiLG5vbmNlPSJhdzRiUDJPNzFvdXhwVUdjLytKWHVralB5d0k1MzRoampkWmpnTjd5Iixxb3A9ImF1dGgiLGNoYXJzZXQ9InV0Zi04IixhbGdvcml0aG09Im1kNS1zZXNzIg==</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9ImpzaGFmZmVyIixyZWFsbT0iMTkyLjE2OC4xMC43MSIsbm9uY2U9ImF3NGJQMk83MW91eHBVR2MvK0pYdWtqUHl3STUzNGhqamRaamdON3kiLGNub25jZT0iYTc4MjBlYTI5MDMzZmU3OGM1NjBlODlmNjg3Y2UwYjU5M2I0MzE0M2RmODBhNzhkNWNiNTRkNmMxNTFjMzI3NiIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC8xOTIuMTY4LjEwLjcxIixjaGFyc2V0PXV0Zi04LHJlc3BvbnNlPTUzMzIxZDJhMGQ4YTU4ZjlmNTRlNDUyZmI2MjVhOTEz</response>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">[B@404eb2</success>
SEND: <stream:stream to='192.168.10.71' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="192.168.10.71" version="1.0" xml:lang="en" id="816252f" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
SEND: <iq xmlns="jabber:client" id="agsXMPP_1" type="set" to="192.168.10.71"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MiniClient</resource></bind></iq>
RECV: <iq xmlns="jabber:client" from="192.168.10.71" to="192.168.10.71/816252f" type="result" id="agsXMPP_1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>jshaffer@192.168.10.71/MiniClient</jid></bind></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_2" type="set" to="192.168.10.71"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
RECV: <iq xmlns="jabber:client" from="192.168.10.71" to="jshaffer@192.168.10.71/MiniClient" type="result" id="agsXMPP_2"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_3" type="get" to="192.168.10.71"><query xmlns="jabber:iq:agents" /></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_4" type="get"><query xmlns="jabber:iq:roster" /></iq>
RECV: <iq xmlns="jabber:client" from="192.168.10.71" to="jshaffer@192.168.10.71/MiniClient" type="error" id="agsXMPP_3"><query xmlns="jabber:iq:agents" /><error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
RECV: <iq xmlns="jabber:client" to="jshaffer@192.168.10.71/MiniClient" type="result" id="agsXMPP_4"><query xmlns="jabber:iq:roster"><item name="jshaffer" jid="jshaffer@192.168.10.71" subscription="both"><group>Friends</group><group>SMS Team</group></item><item name="Bryan Spangler" jid="bspangler@192.168.10.71" subscription="both"><group>SMS Team</group></item><item name="jpublic" jid="jpublic@192.168.10.71" subscription="both"><group>Friends</group><group>SMS Team</group></item><item name="lfournier" jid="lfournier@192.168.10.71" subscription="both"><group>Friends</group><group>SMS Team</group></item><item name="npiasecki" jid="npiasecki@192.168.10.71" subscription="both"><group>Friends</group><group>SMS Team</group></item><item name="ascharf" jid="ascharf@192.168.10.71" subscription="both"><group>Friends</group><group>SMS Team</group></item></query></iq>
SEND: <presence xmlns="jabber:client"><status /><priority>1</priority></presence>
RECV: <presence xmlns="jabber:client" from="jshaffer@192.168.10.71/MiniClient" to="jshaffer@192.168.10.71/MiniClient"><status /><priority>1</priority></presence>
RECV: <presence xmlns="jabber:client" from="ascharf@192.168.10.71/Spark" to="jshaffer@192.168.10.71/MiniClient" id="s6FFA-8"><status>Online</status></presence>
SEND: <iq xmlns="jabber:client" id="agsXMPP_5" type="set" to="ascharf@192.168.10.71/Spark"><si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="s5b_8c87a10df51fd34"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="license.txt" size="15883"><desc /></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field type="list-single" var="stream-method"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
RECV: <iq xmlns="jabber:client" from="ascharf@192.168.10.71/Spark" to="jshaffer@192.168.10.71/MiniClient" type="result" id="agsXMPP_5"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy.ag-software.de"><query xmlns="http://jabber.org/protocol/bytestreams" /></iq>
Avatar
Alex #17
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

if you server is setup correct then your XML should look like that:


SEND:
  1. <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy.ag-software.de">
  2. <query xmlns="http://jabber.org/protocol/bytestreams" />
  3. </iq>
RECV:
  1. <iq xmlns="jabber:client" from="proxy.ag-software.de" to="simonhamelech@amessage.info/MiniClient" type="result" id="agsXMPP_6">
  2. <query xmlns="http://jabber.org/protocol/bytestreams">
  3. <streamhost port="7777" jid="proxy.ag-software.de" host="82.165.34.23" />
  4. </query>
  5. </iq>

Your server IP looks like it is a intenal IP. Did you forward the xmpp ports from your Internet IP to the IP of this machine?
Did you try the proxy which comes with your wildfire server? By default the Jid should be proxy.192.168.10.71.
I would configure the server on a domain name. IPs as server name often make problems.

Alex
This post was edited on 2006-07-20, 22:16 by Alex.
Avatar
scharfed #18
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
I am not sure how to forward the xmpp ports like you mentioned.  I changed the JID to proxy@192.168.10.71, but in my debug code there is no RECV response until the transfer fails (on the spark side).  I then press cancel on the MiniClient side and get this:

SEND: <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy@192.168.10.71">
         <query xmlns="http://jabber.org/protocol/bytestreams" /></iq>

RECV: <iq type="error" id="agsXMPP_6" from="proxy@192.168.10.71" to="jshaffer@192.168.10.71/MiniClient">
         <query xmlns="http://jabber.org/protocol/bytestreams"/><error code="503" type="cancel">
         <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

I will look into changing the IP to a domain name if that indeed is the problem.

Thanks.


edit: In my Wildfire error console, I recieve this:

2006.07.20 05:40:07 [org.jivesoftware.wildfire.filetransfer.ProxyConnectionManager$1$1.run(ProxyConnectionManager.java:112)] Error processing file transfer proxy connection
java.io.IOException: Only SOCKS5 supported
at org.jivesoftware.wildfire.filetransfer.ProxyConnectionManager.processConnection(ProxyConnectionManager.java:141)
at org.jivesoftware.wildfire.filetransfer.ProxyConnectionManager.access$100(ProxyConnectionManager.java:38)
at org.jivesoftware.wildfire.filetransfer.ProxyConnectionManager$1$1.run(ProxyConnectionManager.java:109)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
This post was edited on 2006-07-20, 20:34 by scharfed.
Avatar
Alex #19
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
OK,

i think you should forget this packet for now because i don't think you need it.
After the other client accepted your SI request you should offer your streamhosts to which the other client should connect.

Sample XML:
Send:
  1. <iq xmlns="jabber:client" id="agsXMPP_6" to="xxx@myjabber.net/Psi" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="f7ca0ec0-8496-44a6-8a22-af4766ca560d"><streamhost jid="yyy@ag-software.de/SharpIM" host="192.168.1.105" port="1000" /><streamhost jid="proxy.ag-software.de" host="proxy.ag-software.de" port="7777" /></query></iq>

Recv:
  1. <iq xmlns="jabber:client" from="xxx@myjabber.net/Psi" to="yyy@ag-software.de/SharpIM" type="result" id="agsXMPP_6"> <query xmlns="http://jabber.org/protocol/bytestreams"> <streamhost-used jid="proxy.ag-software.de" /> </query> </iq>

i send 2 streamhosts here. One is my proxy and the other is my internal IP Address. The other client runs in another network and can't connect to my internal IP address so it's choosing the proxy for accepting my file. I connect to the proxy then and activate the SOCKS5 bytestream.

Send:
  1. <iq xmlns="jabber:client" id="agsXMPP_7" to="proxy.ag-software.de" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="f7ca0ec0-8496-44a6-8a22-af4766ca560d"><activate>xxx@myjabber.net/Psi</activate></query></iq>

i hope this will help you.

Alex

Recv:
  1. <iq xmlns="jabber:client" from="proxy.ag-software.de" to="yyy@ag-software.de/SharpIM" type="result" id="agsXMPP_7" />
Avatar
scharfed #20
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Alex,

You're very helpful, im starting to get on the right track.  Could you post a sample of the code you are using for sending a file (frmSend.cs)?  I am doing some debugging right now and would like to make some comparisons if at all possible.

Thanks.


edit:  I dont know why I keep getting this Service Unavailable error, but in frmSend.cs:
1:       private void OnProxyResponse(object sender, IQ iq, object data)
 2:       {
 3:           if (InvokeRequired)
 4:           {
 5:               // Windows Forms are not Thread Safe, we need to invoke this :(
 6:               // We're not in the UI thread, so we need to call BeginInvoke               
 7:               BeginInvoke(new IqCB(OnProxyResponse), new object[] { sender, iq, data });
 8:               return;
 9:           }
10:
11:            if ((iq.Error == null) && (iq.Type == IqType.result))
12:            {
13:                ByteStream bs = iq.Query as ByteStream;
14:                if (bs != null)
15:                {
16:                    StreamHost sh = bs.SelectSingleElement(typeof(StreamHost)) as StreamHost;
17:                    if (sh != null)
18:                        SendSocketFileTransferParams(sh.Port, sh.Host, sh.Jid);
19:                }
20:            }
21:        }

iqType = error with something about Service being Unavailable.  Any thoughts?
This post was edited on 2006-07-20, 21:50 by scharfed.
Avatar
Alex #21
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
please post your XML debug. Normally you get this error when you send to a unavailble Jid or a unavailable server (s2s issues).

The file transfer code i use is proprietary. So I'm sorry that i can't post it. If you are a licened user of agsXMPP with a support contract then please contact our support team. They can send you a file transfer sample.

Alex
Avatar
scharfed #22
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Here is the debug code:

SEND: <iq xmlns="jabber:client" id="agsXMPP_5" type="set" to="ascharf@192.168.10.71/Spark"><si xmlns="http://jabber.org/protocol/si" profile="http://jabber.org/protocol/si/profile/file-transfer" id="s5b_8c87a2543da7f78"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="license.txt" size="15883"><desc /></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field type="list-single" var="stream-method"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
RECV: <iq xmlns="jabber:client" from="ascharf@192.168.10.71/Spark" to="jshaffer@192.168.10.71/MiniClient" type="result" id="agsXMPP_5"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy@192.168.10.71"><query xmlns="http://jabber.org/protocol/bytestreams" /></iq>
RECV: <iq xmlns="jabber:client" from="proxy@192.168.10.71" to="jshaffer@192.168.10.71/MiniClient" type="error" id="agsXMPP_6"><query xmlns="http://jabber.org/protocol/bytestreams" /><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>

I apologize for all the trouble :(
This post was edited on 2006-07-20, 22:11 by scharfed.
Avatar
Alex #23
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry this was my mistake. The Jid of the proxy is proxy.192.168.10.71
This packet will return you the IP and the port of the proxy then. If you know the IP or domain and port, then you don't have to care about that request.

Sorry Alex
This post was edited on 2006-07-20, 22:18 by Alex.
Avatar
scharfed #24
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
No worries, now we are getting somewhere :)

SEND: <iq xmlns="jabber:client" id="agsXMPP_6" type="get" to="proxy.192.168.10.71"><query xmlns="http://jabber.org/protocol/bytestreams" /></iq>
SEND: <iq xmlns="jabber:client" id="agsXMPP_7" type="set" to="ascharf@192.168.10.71/Spark"><query xmlns="http://jabber.org/protocol/bytestreams" mode="tcp" sid="s5b_8c87a26e3392f28"><streamhost jid="proxy.192.168.10.71" host="127.0.1.1" port="7777" /></query></iq>
RECV: <iq xmlns="jabber:client" from="proxy.192.168.10.71" to="jshaffer@192.168.10.71/MiniClient" type="result" id="agsXMPP_6"><query xmlns="http://jabber.org/protocol/bytestreams"><streamhost port="7777" jid="proxy.192.168.10.71" host="127.0.1.1" /></query></iq>
RECV: <iq xmlns="jabber:client" from="ascharf@192.168.10.71/Spark" to="jshaffer@192.168.10.71/MiniClient" type="error" id="agsXMPP_7"><error code="406" /></iq>

From the looks of your XML, the host IP should match the JID of proxy.  Is that correct?
Avatar
Alex #25
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
it's not important if they math or not. But smth is wrong here. It looks like the spark client was not able to connect to your offered hosts.

<streamhost jid="proxy.192.168.10.71" host="127.0.1.1" port="7777" />

can your 2nd client connect to 127.0.0.1 on port 7777? Does it see the proxy on localhost?

Alex
Avatar
scharfed #26
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
no, it cannot connect to that IP.  I'm not sure how to get this to work.
Avatar
Alex #27
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
a SOCKS5 proxy is used for file transfers if one or both parties are behind NAT or firewalled. Normally the proxy runs on the public server with a public IP address in the Internet. So both clients can connect to the proxy which gets you around the NAT and firewall issues. If you run your test server with proxy in your local network then make sure that both clients you use for testing can connect to it, and use for host the IP adress of this machine when you offer the streamhosts.

Alex
Avatar
scharfed #28
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
In that case, both clients are able to connect to the test server at the address 192.168.10.71.  So i should use the host for that IP address.  I'll let you know if there is any success.
Avatar
Alex #29
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes, the host of the proxy must be that address.
Avatar
scharfed #30
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
I'm having trouble finding where in the code I should made this change.  Any suggestions?
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  3  4  next