Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Distributed File Server

使用场合

  1. 如果你有一个文件可能分布在不同服务器,不同的机房,但是有着类似的目录结构,而你只知道目录结构,并不清楚它在哪台机器上。这个程序可以让你通过http的方式方便的获取它。

  2. 如果需要利用客户机的运算能力把文件简单处理一下再传过来,也可以。 请看 -t -e 选项就是做这个的.虽然现在只处理audio类型

用法

这个程序分为服务端和客户端,服务端会监听两个端口8612,8701。8612用来与客户机连接使用。8701 用来做处理通过http get进来的文件请求。

用法很简单

linux:

服务器端 ./dfs >>server.log & 客户端: ./dfc -b "/home" -r "127.0.0.1:8612">>client.log &

windows:

服务器端 dfs.exe >>server.log 客户端: dfc.exe -b "." -r "127.0.0.1:8612" >>client.log

启动后,在浏览器输入: http://127.0.0.1:8701/path/to/file.zip 服务器断接收到请求后会向所有客户端发起找 “/home/path/to/file.zip" 这个文件的请求,找到, 则返回这个文件的流; 没找到, 返回 404.

TODO:

  1. 客户端可以有多个目录
  2. 客户端支持正则过滤功能
  3. 客户端与服务端合并,并支持像cow级连
  4. 支持在线查看

About

Distibute File Server

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages