- Goal: Make the best HTTP File Server.
- Features: Human-friendly UI, file uploading support, direct QR-code generation for Apple & Android install package.
- 目标: 做最好的HTTP文件服务器
- 功能: 人性化的UI体验,文件的上传支持,安卓和苹果安装包的二维码直接生成。
Binaries can be downloaded from this repo releases
If using go1.5, ensure you set GO15VENDOREXPERIMENT=1
- 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
- .ghs.yml support (like .htaccess)
- Calculate md5sum and sha
- Folder upload
- Support sort by size or modified time
- Add version info into index page
- Add api
/-/info/some.(apk|ipa)
to get detail info - Add api
/-/apk/info/some.apk
to get android package info - Auto tag version
- Custom title support
- Support setting from conf file
- Quick copy download link
- Show folder size
go get -v github.com/codeskyblue/gohttpserver
cd $GOPATH/src/github.com/codeskyblue/gohttpserver
go build && ./gohttpserver
Listen on port 8000 of all interfaces, and enable file uploading.
./gohttpserver -r ./ --addr :8000 --upload
-
Enable basic http authentication
$ gohttpserver --auth-type http --auth-http username:password
-
Use openid auth
$ gohttpserver --auth-type openid --auth-openid https://login.example-hostname.com/openid/
The openid returns url using "http" instead of "https", but I am not planing to fix this currently.
Add access rule by creating a .ghs.yml
file under a sub-directory. An example:
---
upload: false
delete: false
users:
- email: "[email protected]"
delete: true
upload: true
In this case, if openid auth is enabled and user "[email protected]" has logged in, he/she can delete/upload files under the directory where the .ghs.yml
file exits.
For example, in the following directory hierarchy, users can delete/uploade files in directory foo
, but he/she cannot do this in directory bar
.
root -
|-- foo
| |-- .ghs.yml
| `-- world.txt
`-- bar
`-- hello.txt
User can specify config file name with --conf
, see example config.yml.
To specify which files is hidden and which file is visible, add the following lines to .ghs.yml
accessTables:
- regex: block.file
allow: false
- regex: visual.file
allow: true
This is used for server on which https is enabled. default use https://plistproxy.herokuapp.com/plist
./gohttpserver --plistproxy=https://someproxyhost.com/
Test if proxy works:
$ http POST https://proxyhost.com/plist < app.plist
{
"key": "18f99211"
}
$ http GET https://proxyhost.com/plist/18f99211
# show the app.plist content
For example, upload a file named foo.txt
to directory somedir
$ curl -F [email protected] localhost:8000/somedir
The search query follows common format rules just like Google. Keywords are seperated with space(s), keywords with prefix -
will be excluded in search results.
hello world
means must containshello
andworld
hello -world
means must containshello
but not containsworld
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 themes are available, "black" and "green".
go-bindata-assetfs -tags bindata res/...
go build -tags bindata
- Core lib Vue https://vuejs.org.cn/
- Icon from https://www.easyicon.net/558394-file_explorer_icon.html
- Code Highlight https://craig.is/making/rainbows
- Markdown Parser https://github.com/showdownjs/showdown
- Markdown CSS https://github.com/sindresorhus/github-markdown-css
- Upload support https://www.dropzonejs.com/
- ScrollUp https://markgoodyear.com/2013/01/scrollup-jquery-plugin/
- Clipboard https://clipboardjs.com/
- Underscore https://underscorejs.org/
Go Libraries
- https://github.com/elazarl/go-bindata-assetfs
- https://www.gorillatoolkit.org/pkg/handlers
The old version is hosted at https://github.com/codeskyblue/gohttp
This project is licensed under MIT.