Skip to content

Instantly share code, notes, and snippets.

@kunalghosh
Created February 24, 2011 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunalghosh/842166 to your computer and use it in GitHub Desktop.
Save kunalghosh/842166 to your computer and use it in GitHub Desktop.
Hi all , i have been working on UDP hole punching , and now have a fair idea about how it works :)
I will be implementing a simple file sharing python script, to transfer a file from a computer behind a NAT
to another behind another NAT.
will keep all posted.
I have a few ideas / suggestions / questions :
1. OwnCloud Could be designed to be either
1.1 hosted at a webhost, like goDaddy.com etc. which will make the data available
via static IP / godaddy(et-al) sub-domain.
Pros : the data is available though an FTP client , or a nice web interface, very easy to code too ! :)
Cons: 1. High initial cost 2. The user is not in control of the data ( what if the web-server goes down !!)
1.2 hosted on the users' computer behind a NAT
Pros: 1. All the data is with the user 2. Computers in local network do not need to access the internet to get the data :)
Cons: 1. Difficult to make data available to outside world (NAT hole-punching) or (reverse-proxy)
OwnCloud could be designed to be a two part system:
One part resident on the OwnCloud users' home computer behind an always on internet connection
protected behind a NAT.
This part includes the web based front-end , which ownCloud currently has, which serves any computers in the Local Network.
Plus the web-based front end can be used by any one who opts for scenario 1.1 above (hosted at a webhost).
Part Two could be designed as a sync-client + simple file browser + NAT-hole-puncher + simple file server
This part is always running on the client's home PC (scenario 1.2 hosted on the users' computer behind a NAT )
and does the following:
It runs on any device (netbook , laptop, desktop) where the user wants to edit data (Mobile phones are not included
as user may just want to access data on the phone (Comments ?)
a) this application running on any computer on the local lan other than the server : requests for files and if the user
updates the file , sends in the new file back to the server.
b) this application running on any computer outside the NAT : does NAT hole punching , to reach the application running
on the server and then works normally (first retrieving only the files list , and then retrieving more files as and when a user asks for it)
c) this application running on the server , facilitates NAT hole punching. Serves files to clients, receives updated files
if any , triggers the file versioning mechanism and then saves the files.
Concerns In general :
1. Authentication : We could use a share-key encryption mechanism , thus allowing sharing of you cloud resources with your friends :)
2. Security : We could host OwnCloud inside a Virtual Machine, so in case , someone cracks into the system the damages could
be sandboxed.
3. File versioning mechanism : Candidates : 1) git 2) Mercurial 3) ZFileSystem (an OS based versioning mechanism)
If we go with a virtual machine , we could use FreeBSD as a base OS and ZFS as a filesystem based versioning mechanism.
ZFS is open Sourced, and is a server grade technology part of Solaris 10. (video showing ZFS being used in FreeNAS http://www.youtube.com/watch?v=16v4jNYH0GI )
4. WebDav : This afaik doesn't work if the computers are separated by a NAT.
my 2cents :) Please let me know if my ideas above work towards what OwnCloud is trying to achieve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment