1 Star 1 Fork 0

楠木 / dsf

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

DSF - Dead Simple Fileserver

Go Reference Go Report Card

English | 中文

A dead simple HTTP fileserver to share your files across LAN.

Motivation

Yes, python3 -m http.server works fine, but...

  • sometimes I got bitten by its single-threaded nature(serving one downloading at a time);
  • dsf prints copy-paste-friendly host IP and port, so I don't need to figure out by myself.

Usage

$ dsf -h
Usage of dsf:
  -port int
    	listening port (default 8080)
  -root string
    	root for files (default "./")

Serve current working directory:

$ dsf
listening on: http://127.0.0.1:8080
listening on: http://::1:8080
listening on: http://192.168.0.6:8080
listening on: http://fe80::1234:1e11:abec:5678:8080

Serve a specific directory and listen on a desired port:

$ dsf -port 3000 -root ~/images
listening on: http://127.0.0.1:3000
listening on: http://::1:3000
listening on: http://192.168.0.6:3000
listening on: http://fe80::1234:1e11:abec:5678:3000

Installation

Precompiled binaries are available for Linux, Mac and Windows: https://github.com/nanmu42/dsf/releases/

For gophers:

go install github.com/nanmu42/dsf@latest

License

MIT

MIT License Copyright (c) 2021 LI Zhennan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

DSF - 极简HTTP文件服务 expand collapse
Go and 2 more languages
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/nanmu42/dsf.git
git@gitee.com:nanmu42/dsf.git
nanmu42
dsf
dsf
main

Search