Thanks a ton Waqas.<br><br>This is probably what I was looking for.<br><br>Just some minor queries ::<br><br>a)<br>Once the proxies are setup (i.e. there is a link (Alice's WebDAV hosted in "httpd") <==> (Tom's server) <==> (Bob's browser), then the user-experience will be the same as though Alice and Bob are on the same network, right?<br>
<br><br>b)<br>What is your general opinion on this approach? Would the amount and complexity of the added code (proxy-setup) be worthwhile, than looking for a possible alternative like "upload-files-to-central-server-and-then-download-from-there"?<br>
<br><br>Anyways, thanks a ton for the confidence :)<br><br><br>Thanks and Regards,<br>Ajay<br><br><div class="gmail_quote">On Wed, Mar 28, 2012 at 2:00 PM, Waqas Hussain <span dir="ltr"><<a href="mailto:waqas20@gmail.com">waqas20@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Mar 28, 2012 at 9:33 AM, Ajay Garg <<a href="mailto:ajaygargnsit@gmail.com">ajaygargnsit@gmail.com</a>> wrote:<br>
> Hi all.<br>
><br>
> I have already posted the following query at "JAdmin" mailing list; but I am<br>
> not sure as to which mailing list is the appropriate one.<br>
><br>
> Anyhow, since my query refers to a very conceptual doubt, I am posting this<br>
> here as well, to avoid any delay. I am sorry if I sound too desperate, but<br>
> the answer to the following query is indispensable; only then can I decide<br>
> on the go/no-go for the design.<br>
><br>
><br>
> #######################################################################################################<br>
> There are two users Bob and Alice. Each of Bob and Alice have setup a WebDAV<br>
> server on their local machines over SSL, and listen on port 443. In a normal<br>
> environment, Bob is able to access Alice's share by typing "https://<Alice's<br>
> IP Address>/webdav". Alice is able to the same.<br>
><br>
> Next, both Alice and Bob log onto a Jabber server set up by their common<br>
> friend Tom; and the only way they can communicate is via Jabber. They still<br>
> want to make their shares available to each other; and wish for the simplest<br>
> way to do it - via their browser. So, can Tom configure his Jabber server in<br>
> a manner, so as to allow Bob and Alice to access each other's WebDAV shares'<br>
> via their respective browsers?<br>
> #######################################################################################################<br>
><br>
><br>
> Looking forward to a reply.<br>
><br>
><br>
> Thanks and Regards,<br>
> Ajay<br>
<br>
</div></div>So your problem basically boils down to a reverse HTTP(S) proxy,<br>
tunneling over XMPP. You are probably considering XMPP to avoid<br>
worrying about IP addresses and firewalls, and trying to expose local<br>
services to contacts.<br>
<br>
Possible? Sure. But note, at a minimum you'll need a custom client,<br>
and a custom server (or server plugin), since nothing supports your<br>
use-case out of the box.<br>
<br>
Here's how I might do this:<br>
<br>
I'm assuming Tom's server is public (not behind a firewall, can accept<br>
connections). I'm assuming Alice's server is behind a NAT/firewall, so<br>
can't accept direct connections. I'm also assuming you want large file<br>
transfer support.<br>
<br>
Alice is running a local httpd. Alice's client will open a TCP stream<br>
to Tom's server, and a TCP stream to the local httpd, and then will<br>
act as a dumb proxy between these connections. This is fairly simple.<br>
You can probably use some existing HTTP proxy codebase. The client<br>
initiates the connections when it receives a signal over XMPP from the<br>
server. There can be multiple connections at the same time.<br>
<br>
On the server end, it's a bit more complicated. Take an existing HTTP<br>
proxy codebase. Then you need to modify its connection opening logic<br>
to signal the appropriate client via the XMPP server, which opens a<br>
reverse connection to the server proxy. Then that connection can be<br>
used for proxying as normal.<br>
<br>
Here's how it would flow:<br>
<br>
1. Bob requests <a href="http://tom.com/webdav/alice/" target="_blank">http://tom.com/webdav/alice/</a> using his web browser<br>
2. Tom's server signals Alice's client<br>
3. Alice's client connects to Tom's server and local server<br>
4. Tom's server forwards request to Alice's server via Alice's client<br>
5. Bob gets response from Alice's server via the two proxies<br>
<br>
Why use XMPP for this? For signalling, authentication, persistent<br>
connections, and other various features XMPP has standardized.<br>
<br>
Why not transfer data over XMPP itself? That would be much simpler,<br>
but large file transfers would be highly inefficient, so we open<br>
separate connections for the HTTP tunneling.<br>
<br>
--<br>
Waqas Hussain<br>
_______________________________________________<br>
JDev mailing list<br>
Info: <a href="http://mail.jabber.org/mailman/listinfo/jdev" target="_blank">http://mail.jabber.org/mailman/listinfo/jdev</a><br>
Unsubscribe: <a href="mailto:JDev-unsubscribe@jabber.org">JDev-unsubscribe@jabber.org</a><br>
_______________________________________________<br>
</blockquote></div><br>