[jcifs] Port specification

eglass1 at comcast.net eglass1 at comcast.net
Mon Jun 28 17:58:15 GMT 2004


Is that a vote "for"?  The draft would appear to support this notion;
Section 6.5 addresses this scenario in particular.  As far as jCIFS is
concerned, it would just be connecting to a CIFS server providing services
on a peculiar port (non-139/445).

Attached is the simple standalone implementation:

TunnelServlet and TunnelPipe are the HTTP server side pieces; you would
install them in a servlet container, using web.xml as an example deployment
descriptor.

TunnelListener and TunnelConnection are the client-side plumbing; you would
run:

java tunnel.TunnelListener http://httpserver/smbserver/ 139

This will start listening for SMB connections on localhost (port 139).  It
will tunnel the requests over HTTP to "httpserver", which will then forward
the conversation to the remote SMB server "smbserver".

Example.java contains a simple example, which just lists the shares on
localhost; you should see the shares from the remote SMB server come over
the HTTP tunnel.


Eric



> My thought:  Many people have asked me about using jCIFS as the reference 
> implementation for the SMB URL, so the closer we are to the draft the 
> better.
> 
> Chris -)-----
> 
> On Mon, Jun 28, 2004 at 10:39:38AM +0000, eglass1 at comcast.net wrote:
> > Mike,
> > 
> > I was wanting to get your take on including support for port specification
> > (i.e., "smb://server:4567/share/dir/file.txt").  One of the things I'm
> > toying about with for Davenport is support for HTTP tunneling between
> > instances.  This would work as follows:
> > 
> > 
> > 1)  An alias is created in Davenport instance "dav1", representing a remote
> > SMB server (i.e., part of a completely different network).  This would be
> > accessed via a WebDAV/HTTP client like:
> > 
> >     http://dav1/davenport/myalias/
> > 
> > 2)  Davenport installs a listener on a local port (i.e., 4567) and maps
> > requests to "myalias" to this port:
> > 
> >     http://dav1/davenport/myalias -> smb://localhost:4567/
> > 
> > 3)  The listener tunnels the SMB traffic over HTTP(S) POST to a remote
> > Davenport instance (i.e., "http://dav2/endpoint/").
> > 
> > 4)  The remote Davenport instance pipes the data in the POST request to the
> > real server (i.e., "smb://myserver/"), and sends pending response content
> > back in the HTTP response.
> > 
> > 5)  The HTTP response is fed back to the SMB client connected to
> > localhost:4567.
> > 
> > 
> > I've currently got a standalone tunnel working (i.e., not integrated with
> > Davenport as of yet, and needs a bit of work), but it only works if I set
> > the listener on localhost:139 (since jCIFS currently only connects to that
> > port).  Any thoughts?
> > 
> > 
> > Eric
> 
> -- 
> "Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
> Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
> ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-tar
Size: 2883 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20040628/436a1f21/attachment.tar


More information about the jcifs mailing list