Godeps | ||
res | ||
scripts | ||
testdata | ||
vendor | ||
.fsw.yml | ||
.gitignore | ||
.travis.yml | ||
build.sh | ||
httpstaticserver.go | ||
ipa.go | ||
LICENSE | ||
main.go | ||
Procfile | ||
README.md | ||
res.go | ||
res_bindata.go | ||
res_nobindata.go | ||
screenshot.png | ||
utils.go | ||
utils_test.go | ||
zip.go | ||
zip_test.go |
gohttpserver
Make the best HTTP File Server. Better UI, upload support, apple&android install package qrcode generate.
- 目标: 做最好的HTTP文件服务器
- 功能: 人性化的UI体验,文件的上传支持,安卓和苹果安装包的二维码直接生成。
Notes
If using go1.5, ensure you set GO15VENDOREXPERIMENT=1
Upload size now limited to 1G
Screenshots
Features
- Support QRCode code generate
- Breadcrumb path quick change
- All assets package to Standalone binary
- Different file type different icon
- Support show or hide hidden files
- Upload support (for security reason, you need enabled it by option
--upload
) - README.md preview
- HTTP Basic Auth
- Partial reload pages when directory change
- When only one dir under dir, path will combine two together
- Directory zip download
- Apple ipa auto generate .plist file, qrcode can be recognized by iphone (Require https)
- Plist proxy
- Download count statistics
- CORS enabled
- Offline download
- Code file preview
- Edit file support
- Global file search
- Hidden work
download
andqrcode
in small screen - Theme select support
- OK to working behide Nginx
- .htaccess support
- Calculate md5sum and sha
- Folder upload
- Support sort by size or modified time
- Add version info into index page
- Add api
/-/stat/some.(apk|ipa)
to get detail info
Installation
go get -v github.com/codeskyblue/gohttpserver
cd $GOPATH/src/github.com/codeskyblue/gohttpserver
go build && ./gohttpserver
Usage
Listen port 8000 on all interface, and enable upload
./gohttpserver -r ./ --addr :8000 --upload
ipa plist proxy
This is used for server which not https enabled.
./gohttpserver --plistproxy=https://someproxyhost.com/
Proxy web site should have ability, when request https://proxyhost.com/www.github.com
return the same page as request from http://www.github.com
Upload with CURL
For example, upload a file named foo.txt
to directory somedir
PS: max upload size limited to 1G (hard coded)
$ curl -F file=@foo.txt localhost:8000/somedir
FAQ
Developer Guide
Depdencies are managed by godep
go get -v github.com/tools/godep
go get github.com/jteeuwen/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
Theme are all defined in res/themes directory. Now only two, black and green.
How to build single binary release
go-bindata-assetfs -tags bindata res/...
go build -tags bindata
That's all. ^_^
Reference Web sites
- https://vuejs.org.cn/
- Icon from http://www.easyicon.net/558394-file_explorer_icon.html
- https://github.com/elazarl/go-bindata-assetfs
- Code Highlight https://craig.is/making/rainbows
- Markdown-JS https://github.com/showdownjs/showdown
- https://github.com/sindresorhus/github-markdown-css
- http://www.gorillatoolkit.org/pkg/handlers
- http://www.dropzonejs.com/
History
The first version is https://github.com/codeskyblue/gohttp
LICENSE
This project is under license MIT