Not logged in. · Lost password · Register
Forum: XMPP XMPP Protocol RSS
Page:  1  2  3  4  next
Avatar
mayprog #1
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Subject: FileTransfer problem
Dear sirs,
I am working on FIleTransfers using SI and ByteStreams.
I am trying to transfer a file from Spark to my App using the standard JEPS (jep 0096, jep 0095 and jep 0065).
I have implemented my custom SOCKS5 protocol in which i use only "No Authentication" mechanism and i work just as jep 0065 says.

The problem is that althought all the protocols are working fine, finally i cannot tranfer the file.
As spark on the ByteSTream packet offers me 2 ways (through the proxy which is the wildfire or directly to the spark client IP) there are 2 situations:
a) I use the direct way, but even after spark authenticates me (SOCKS5) and i sent to it the Steam I Used (i do watch the messages from the spark Trace window)
my socket does not receive anything.
b) When i use the mediated way (through the Wildfire proxy), on to connect command proxy returns me "0x02 - Connection not allowed by ruleset" and everything stops there.

I think the problem might be on the way i do the hashing of the SID, i use this way:
    string sToHash = sId+sInitiatorJid+sTargetJid;

    SHA1 sha = SHA1.Create();
    byte[] ret = sha.ComputeHash(System.Text.Encoding.UTF8.GetBytes(sToHash));
    ....
    ....
    socket.send(VER ......);
    socket.send(ret);

I would like to ask you if this is the right way to hash the SID and if you think i am possibly doing something else wrong.
Also, if i used username/password authentication what username and password should i use?
For the proxy server i use Wildifre which does not offer on the administration UI a username - password resrtiction in order to access it for file tranfers.
This post was edited on 2006-08-12, 18:28 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes your hashing algorithm looks correct to me. The Jids must be full Jids (with Resource).
Did you try to sniff the SOCKS5 sockets from 2 Spark clients to see if the create the hash in the same way?

Alex
Alexander Gnauck
AG-Software
Avatar
mayprog #3
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
No Alex, i havent done any Sniffing but i will soon.
What about authentication, should no authentication work always or there are times that i should authenticate with the proxy server?

Thanks!
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
if your proxy/streamhost requires authentication then you have to authenticate. But all XMPP servers and proxies i tried yet did not support authentication. This makes sense if you run a public XMPP server and don't want that everybody is using your proxy for transfering files.

Alex
Alexander Gnauck
AG-Software
Avatar
mayprog #5
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
You are wright Alex,
thanks again!
Avatar
scharfed #6
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Alex, Mayprog,

I came upon this thread in hopes of getting some help in implementing file transfer in the Jabber client that I am developing.  I am currently using Wildfire as the jabber server, and im using Spark to send the file to my client.  I was able to recieve this xml message from my client regarding send-file request:

"<file size=\"764752\" name=\"image_M0.png\" xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\"><desc>Sending file</desc></file><feature xmlns=\"http://jabber.org/protocol/feature-neg\"><x type=\"form\" xmlns=\"jabber:x:data\"><field type=\"list-multi\" var=\"stream-method\"><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature>"

I am rather new to Jabber, so any help regarding the steps that need to be taken would be greatly appreciated.

Thanks
Avatar
Alex #7
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello scharfed,

look also at this thread: http://forum.ag-software.de/forum.php?req=thread&id=216
There is a MiniClient code with a complete file transfer solution attached.
I think ths will be a big help for you.

Alex
Alexander Gnauck
AG-Software
Avatar
scharfed #8
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Alex,

I seem to be having trouble compiling Simon's project along with the file you added: JEP65Socket.cs

This is the type of error I am recieving....

The type or namespace name 'Stream' does not exist in the namespace 'agsXMPP.protocol.client'
The type or namespace name 'FileTransferCB' could not be found

I downloaded Simon's most recent .zip file, added it to the Miniclient from the download's page and added all the necessary project files.
I'm also using Visual Studio 2005 with .Net 2.0

Any help would be greatly appreciated, as once I can get a file-transfer solution working my life at work will be so much easier!

Thanks again Alex,
Scharfed
Avatar
Alex #9
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i have no idea which version of the library simon was using for his latest patch. You had to patch the MiniClient and agsXMPP.
You can ask simon for help in this thread. Are you using the latest code from SVN? I know tht simon is always using the latest SVN codes.

Alex
Alexander Gnauck
AG-Software
Avatar
scharfed #10
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Thanks alot for your help, Alex.  I almost have this client running.  The only problem I am running into is this error in frmSendFile.cs...

private void GetProxyParameters()
        {
            ByteStreamIq bsIQ = new ByteStreamIq(IqType.get);
            bsIQ.To = new Jid(Properties.Resources.Socks5Proxy);
            m_XmppCon.IqGrabber.SendIq(bsIQ, new IqCB(OnProxyResponse), null);
        }

'MiniClient.Properties.Resources' does not contain a definition for 'Socks5Proxy'

Would you happen to know how to resolve this issue?

Thanks
Avatar
Alex #11
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
simon stores there the domain for the file transfer proxy. You can hardcode the domain of your file transfer proxy here, or use our proxy for testing. Our proxy runs on proxy.ag-software.de.

Alex
Alexander Gnauck
AG-Software
Avatar
scharfed #12
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Alex,

Thank you, ive got it to work :)

Take care
Avatar
Alex #13
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
cool
Alexander Gnauck
AG-Software
Avatar
scharfed #14
Member since Jul 2006 · 33 posts
Group memberships: Members
Show profile · Link to this post
Alex,

With regards to the code sample in my above post, how would I use your proxy?

private void GetProxyParameters()

        {

            ByteStreamIq bsIQ = new ByteStreamIq(IqType.get);

            bsIQ.To = new Jid("proxy.ag-software.de");

            m_XmppCon.IqGrabber.SendIq(bsIQ, new IqCB(OnProxyResponse), null);

        }

The above causes a 404 remote server not found error, and so does placing my local proxy server in the quotes (192.168.10.71:7777).  Is there something I am doing wrong?

Thanks,
Scharfed
This post was edited on 2006-07-20, 18:41 by scharfed.
Avatar
Alex #15
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i assume your server is not setup correctly for s2s connections and can't reach our server.
Make sure your server is setup for s2s connections, or make and account on our server and use it directly.
But this is only and assumption because i have not seen your XML Debug.

Alex
Alexander Gnauck
AG-Software
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:  1  2  3  4  next
Forum: XMPP XMPP Protocol RSS