Giter Site home page Giter Site logo

stonewl897 / gohttpserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codeskyblue/gohttpserver

0.0 1.0 0.0 3.26 MB

The best HTTP Static File Server, write with golang+vue

Home Page: https://gohttpserver.herokuapp.com/

License: MIT License

Shell 0.45% Go 14.67% JavaScript 60.01% CSS 15.48% HTML 7.98% Python 1.40%

gohttpserver's Introduction

gohttpserver

Build Status

Make the best HTTP File Server. Better UI, upload support, apple&android install package qrcode generate.

Demo site

  • 目标: 做最好的HTTP文件服务器
  • 功能: 人性化的UI体验,文件的上传支持,安卓和苹果安装包的二维码直接生成。

Binary can be download from github releases

Notes

If using go1.5, ensure you set GO15VENDOREXPERIMENT=1

Upload size now limited to 1G

Screenshots

screen

Features

  1. Support QRCode code generate
  2. Breadcrumb path quick change
  3. All assets package to Standalone binary
  4. Different file type different icon
  5. Support show or hide hidden files
  6. Upload support (for security reason, you need enabled it by option --upload)
  7. README.md preview
  8. HTTP Basic Auth
  9. Partial reload pages when directory change
  10. When only one dir under dir, path will combine two together
  11. Directory zip download
  12. Apple ipa auto generate .plist file, qrcode can be recognized by iphone (Require https)
  13. Plist proxy
  14. Download count statistics
  15. CORS enabled
  16. Offline download
  17. Code file preview
  18. Edit file support
  19. Global file search
  20. Hidden work download and qrcode in small screen
  21. Theme select support
  22. OK to working behide Nginx
  23. .ghs.yml support (like .htaccess)
  24. Calculate md5sum and sha
  25. Folder upload
  26. Support sort by size or modified time
  27. Add version info into index page
  28. Add api /-/info/some.(apk|ipa) to get detail info
  29. Auto tag version
  30. Custom title support
  31. Support setting from conf file
  32. Quick copy download link

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

Advanced usage

Support update access rule if there is a file named .ghs.yml under directory. .ghs.yml example

---
upload: false

For example, if there is such file under directory foo, directory foo can not be uploaded, while bar can.

root -
  |-- foo
  |    |-- .ghs.yml
  |    `-- world.txt 
  `-- bar
       `-- hello.txt

Use config file. specfied with --conf, see example config.yml. Note that command line option can overwrite conf in config.yml

ipa plist proxy

This is used for server which not https enabled. default use https://plistproxy.herokuapp.com/plist

./gohttpserver --plistproxy=https://someproxyhost.com/

Proxy web site should have ability

$ http POST https://proxyhost.com/plist < app.plist
{
	"key": "18f99211"
}
$ http GET https://proxyhost.com/plist/18f99211
# show the app.plist content

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 [email protected] localhost:8000/somedir

FAQ

How the search works

The search algorithm follow the search engine google. keywords are seperated with space, words with prefix - will be excluded.

  1. hello world means must contains hello and world
  2. hello -world means must contains hello but not contains world

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

Go Libraries

History

The first version is https://github.com/codeskyblue/gohttp

LICENSE

This project is under license MIT

gohttpserver's People

Contributors

codeskyblue avatar

Watchers

stonewl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.