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:
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.
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);
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.