Christian, thanks for the suggestions.
Christian Biesinger wrote:
Hi,
I think the easiest way for doing it is to follow darin's suggestion in http://www.mail-archive.com/[EMAIL PROTECTED]/msg01903.html and implement nsISocketProvider.
If changing mozilla code for what you want to is OK, you could do some hacking w/ http://lxr.mozilla.org/seamonkey/source/netwerk/base/src/nsSocketTransport2.cpp to do stuff w/ the data.
I think I will implement the socks server in JS that you mentioned - for the portability. But I will keep these approaches in mind for a possible re-implementation. Once I've built the extension once, I imagine I will have a better handle on "the right way" to do things. And what I'm trying to do is pretty generic (possibly of widespread appeal) so if I'm coding in C++, I would hope to be able to get the changes back into the mozilla tree.
So there is not really an "SSL protocol handler". There is an HTTPS protocol handler. if you want to tunnel over HTTPS, that will be easy. SSL directly, I have no idea about. you could, I think, get a socket transport with a socket type of "ssl" and write to that like to any other socket transport.
right. Yes, I meant over https.
And I should have realized earlier that nsISocketProvider is not actually scriptable... http://lxr.mozilla.org/seamonkey/source/netwerk/socket/base/nsISocketProvider.idl#42
What would still work, although maybe a bit hacky, is to implement a SOCKS server in JS, have it start with mozilla, have your extension configure mozilla to use that server, and have that proxy forward everything to your server. The relevant APIs are all scriptable; although server sockets only exist since 2003-11-14 (that should be Mozilla 1.6, or Netscape 7.2)
This sounds like a very good starting point. I'll likely have some more questions once I've got an extension skeleton going.
Do you have any pointers to documentation for the "relevant APIs"?
thanks! _______________________________________________ Mozilla-netlib mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-netlib
