- I create the socket.

- I do 'CONNECT' with Streamhost (other machine directly) using this socket,
on IP address and port which streamhost sends to me.

- This connection completes successfully.

This is because you're doing a normal TCP connection.

- I do 'CONNECT' with SHA1(streamid+initiatorjid+targetjid) hostname and
port 0, with the same socket I use for connecting with Streamhost before, it
returns it can't connect.

You don't do the same thing here. With the socket you now have open, you need to use SOCKS5 (RFC1928, which can be found at http://www.ietf.org/rfc/rfc1928.txt for reference) to request a connection from the streamhost to that SHA1'd string, as if you were connecting to a SOCKS5 proxy for general Internet use.

A streamhost is basically pretending to be a SOCKS5 proxy server, so once you've connected you need to do the SOCKS5 negotiation and then issue the SOCKS5 'CONNECT' command -- the command in the SOCKS5 protocol which requests a connection to a destination site -- to the streamhost. /Not/ a normal TCP connect() call, a SOCKS5 command packet with the SHA1'd host as the destination field.

Does that help?

--
Rachel 'Sparks' Blackman -- sysadmin, developer, mad scientist
"If it is not broken, give me five minutes to redesign it!"

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mail.jabber.org/mailman/listinfo/jdev

Reply via email to