-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,51 @@ | ||
# DSF - Dead Simple Fileserver | ||
|
||
[![Go Reference](https://pkg.go.dev/badge/github.com/nanmu42/dsf.svg)](https://pkg.go.dev/github.com/nanmu42/dsf) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/nanmu42/dsf)](https://goreportcard.com/report/github.com/nanmu42/dsf) | ||
|
||
**English** | [中文](https://github.com/nanmu42/dsf/blob/main/README.zh-cn.md) | ||
|
||
A dead simple HTTP fileserver to share your files across LAN. | ||
|
||
Yes, `python3 -m http.server` will do, but sometimes I got bitten by its single-threaded nature. | ||
|
||
## Usage | ||
|
||
``` | ||
$ dsf -h | ||
Usage of dsf: | ||
-port int | ||
listening port (default 8080) | ||
-root string | ||
root for files (default "./") | ||
``` | ||
|
||
Serve current working directory: | ||
|
||
```bash | ||
$ dsf | ||
listening on: http://127.0.0.1:8080 | ||
listening on: http://::1:8080 | ||
``` | ||
|
||
Serve a specific directory and listen on a desired port: | ||
|
||
```bash | ||
$ dsf -port 3000 -root ~/images | ||
listening on: http://127.0.0.1:3000 | ||
listening on: http://::1:3000 | ||
``` | ||
|
||
## Installation | ||
|
||
Precompiled binaries are available for Linux, Mac and Windows: https://github.com/nanmu42/dsf/releases/ | ||
|
||
For gophers: | ||
|
||
```bash | ||
go install github.com/nanmu42/dsf | ||
``` | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# DSF - 极简文件服务 | ||
|
||
[![Go Reference](https://pkg.go.dev/badge/github.com/nanmu42/dsf.svg)](https://pkg.go.dev/github.com/nanmu42/dsf) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/nanmu42/dsf)](https://goreportcard.com/report/github.com/nanmu42/dsf) | ||
|
||
[English](https://github.com/nanmu42/dsf) | **中文** | ||
|
||
一个非常简单的HTTP文件服务,可以把本地的文件暴露到局域网上。 | ||
|
||
虽然`python3 -m http.server`也能用,但是有时我没法接受它单线程一次只能服务一个文件的特性。 | ||
|
||
## 用法 | ||
|
||
``` | ||
$ dsf -h | ||
dsf 的用法: | ||
-port int | ||
监听端口 (默认 8080) | ||
-root string | ||
文件根目录 (默认 "./") | ||
``` | ||
|
||
分享当前工作目录: | ||
|
||
```bash | ||
$ dsf | ||
listening on: http://127.0.0.1:8080 | ||
listening on: http://::1:8080 | ||
``` | ||
|
||
在特定端口分享特定目录: | ||
|
||
```bash | ||
$ dsf -port 3000 -root ~/images | ||
listening on: http://127.0.0.1:3000 | ||
listening on: http://::1:3000 | ||
``` | ||
|
||
## 安装 | ||
|
||
适用于Linux, Mac 和 Windows预编译二进制可以在这里找到:https://github.com/nanmu42/dsf/releases/ | ||
|
||
Gophers 可以这样安装: | ||
|
||
```bash | ||
go install github.com/nanmu42/dsf | ||
``` | ||
|
||
使用愉快! | ||
|
||
## License | ||
|
||
MIT |