chore(ci/cd): refine scripts and docs (#36)

* chore(ci/cd): refine scripts and docs

* text(server): fix incorrect server port
This commit is contained in:
Hexxa 2021-01-30 22:03:59 +08:00 committed by GitHub
parent e87a342c93
commit ede6c239f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 81 additions and 296 deletions

View file

@ -1,82 +0,0 @@
## Configuration
```Javascript
{
"AppName": "qs",
"AdminId": "admin", // login user name
"AdminPwd": "quicksh@re", // login password
"SecretKey": "qs", // key for hashing cookie (jwt)
"Production": true,
"HostName": "", // listening address
"Port": 8888, // listening port
"MaxUpBytesPerSec": 2000000, // upload speed limit
"MaxDownBytesPerSec": 1000000, // download speed limit
"MaxRangeLength": 10485760, // max length of chunk to upload at once
"Timeout": 7200000, // connection timeout
"ReadTimeout": 5000, // connection read request timeout
"WriteTimeout": 7200000, // connection write response timeout
"IdleTimeout": 10000, // connection idle timeout
"WorkerPoolSize": 16, // number of workers, it decides how many download connections are provided at same time
"TaskQueueSize": 16, // how many requests can be queued
"QueueSize": 16,
"ParseFormBufSize": 5000000, // buffer for parsing request
"MaxHeaderBytes": 1024, // max header size in byte
"DownLimit": -1, // default download limit
"MaxShares": 16384, // max number of sharing
"LocalFileLimit": -1, // max number of listing file at once
"CookieDomain": "",
"CookieHttpOnly": false,
"CookieMaxAge": 604800,
"CookiePath": "/",
"CookieSecure": false,
"KeyAdminId": "adminid",
"KeyAdminPwd": "adminpwd",
"KeyToken": "token",
"KeyFileName": "fname",
"KeyFileSize": "size",
"KeyShareId": "shareid",
"KeyStart": "start",
"KeyLen": "len",
"KeyChunk": "chunk",
"KeyAct": "act",
"KeyExpires": "expires",
"KeyDownLimit": "downlimit",
"ActStartUpload": "startupload",
"ActUpload": "upload",
"ActFinishUpload": "finishupload",
"ActLogin": "login",
"ActLogout": "logout",
"ActShadowId": "shadowid",
"ActPublishId": "publishid",
"ActSetDownLimit": "setdownlimit",
"ActAddLocalFiles": "addlocalfiles",
"AllUsers": "addlocalfiles",
"OpIdIpVisit": 0,
"OpIdUpload": 1,
"OpIdDownload": 2,
"OpIdLogin": 3,
"OpIdGetFInfo": 4,
"OpIdDelFInfo": 5,
"OpIdOpFInfo": 6,
"PathLocal": "files",
"PathLogin": "/login",
"PathDownloadLogin": "/download-login",
"PathDownload": "/download",
"PathUpload": "/upload",
"PathStartUpload": "/startupload",
"PathFinishUpload": "/finishupload",
"PathFileInfo": "/fileinfo",
"PathClient": "/",
"LimiterCap": 256,
"LimiterTtl": 3600,
"LimiterCyc": 1,
"BucketCap": 10, // operation is allowed at most 10 times per second, but SpecialCapsStr will override this value
"SpecialCapsStr": {
"0": 30, // IpVisit is allowed at most 30 times per second
"1": 10, // Uploading is allowed at most 10 times per second
"2": 10, // Downloading is allowed at most 10 times per second
"3": 1 // Login/Logout is allowed at most 1 time per second
// You can also add rate limits according to OpIdxxx above.
}
}
```

View file

@ -1,18 +0,0 @@
## FAQ
- How to change accound name and password?
- Go to quickshare folder
- Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Search for line `"AdminPwd": "quicksh@re",`
- Replace `quicksh@re` with your password, e.g. `"AdminPwd": "myPassword",`
- Then you can also update user name `"AdminId": "myUserName",` in above way.
- How to change listening address(or port)?
- Go to quickshare folder
- Open config.json using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Search for line `"HostName": "",`
- Change the value of `HostName`, e.g. `"HostName": "192.168.0.6",`
- You can also change port value (`"Port": 8888,`) in above way
- How to change background?
- Go to `public` folder under quickshare folder
- Open style.css using text editor. (e.g. notpad++, sublime, vscode, etc...)
- Update `body`'s css.

View file

@ -1,17 +0,0 @@
## 常见问题
- 怎么改用户名和密码?
- 进入 quickshare 文件夹
- 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
- 查找行 `"AdminPwd": "quicksh@re",`
- 用你的密码替换 `quicksh@re`, 比如 `"AdminPwd": "你的密码",`
- 怎么改监听地址(端口)?
- 进入 quickshare 文件夹
- 用文本编辑器打开 config.json. (比如 notpad++, sublime, vscode, 等等...)
- 查找行 `"HostName": "",`
- 更改`HostName`的值, 比如 `"HostName": "192.168.0.6",`
- 你可以用上面的方法更改端口值(`"Port": 8888,`)
- 怎么更改背景?
- 进入 quickshare 文件夹下的`public`文件夹
- 使用文本编辑器打开 style.css. (比如 notpad++, sublime, vscode, 等等...)
- 更新 `body`'的 css

View file

@ -1,12 +1,12 @@
<h1 align="center">
[未完成!!!] Quickshare
Quickshare
</h1>
<p align="center">
的文件共享服务, 使用Go/Golang, Typescript, Gin, React, Boltdb等构建.
的文件共享服务, 使用Go/Golang, Typescript, Gin, React, Boltdb等构建.
</p>
<p align="center">
<a href="https://travis-ci.org/ihexxa/quickshare">
<img src="https://travis-ci.org/ihexxa/quickshare.svg?branch=main" />
<a href="https://github.com/ihexxa/quickshare/actions">
<img src="https://github.com/ihexxa/quickshare/workflows/quickshare-ci/badge.svg" />
</a>
<a href="https://goreportcard.com/report/github.com/ihexxa/quickshare">
<img src="https://goreportcard.com/badge/github.com/ihexxa/quickshare" />
@ -16,58 +16,35 @@
</a>
<p>
![Quickshare 演示](../demo.jpg)
![Quickshare on desktop](./imgs/desktop.jpeg)
![Quickshare on mobile](./imgs/mobile.jpeg)
选择语言: [English](../README.md) | 简体中文
## 下载
## 主要功能
访问 [发布页](https://github.com/ihexxa/quickshare/releases) 获取 Linux | Mac | Windows 版本.
- 在多个设备之间共享文件 (自适应 UI)
- 兼容 Linux, Mac 和 Windows
- 上传下载都支持断点续传
- 在 Web 浏览器 中完成上传下载
## 特点
## 快速开始
- 在浏览器中上传下载, 无需安装任何客户端
- 在桌面电脑和移动设备件间共享文件
- 绿色软件
- 支持添加本地文件
- 支持添加文件下载次数上限
- 支持断点续传
**下载**: 先下载最新版本 [发布页](https://github.com/ihexxa/quickshare/releases).
## 安装
**解压**: 将其解压, 并在运行命令 `./quickshare`. (你可能需要为它更新执行权限: 比如在 linux 上执行 `chmod u+x quickshare`)
开始使用 quickshare 主要需要两步: 解压, 启动.
**运行**: 在第一次运行时, Quickshare 会让你输入你的用户名 (这里输入的用户名是 quickshare), 并会为你生成密码. 它可能会输出类似下面内容 (这里密码是`2fdc98`):
第一步, 解压下载包, 启动 quickshare.
```
Please input admin name: quickshare
password is generated: 2fdc98, please update it after login
user (quickshare) is created
```
### Linux
- 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_linux_x86_6 4.zip`)
- 进入文件夹, 启动 quickshare `./quickshare`
### Mac
- 解压包: `unzip [package].` (`[package]` 可以是`quickshare_0.0.8_macos_x86_6 4.zip`)
- 进入文件夹, 启动 quickshare `./quickshare`
### Windows
- 解压包
- 进入文件夹, 双击 `quickshare.exe` 启动 quickshare
最后一步, 在浏览器中面基 quickshare.
- Quickshare 会在启动后, 在命令中输出中显示 `quickshare starts @ [URL]` (举个栗子 `URL` 可以是 `192.168.0.1:8888`)
- 在浏览器中打开 `URL` 并使用 `admin``quicksh@re` 登入
- 开耍(不过别忘改密码[常见问题文档](./FAQ_zh-cn.md))
**访问**: 最后, 打开你的浏览器并访问 `http://127.0.0.1:8686`.
### 常见问题
请参考[常见问题文档](./FAQ_zh-cn.md)
### 配置
请参考[配置文档](./CONFIG_en-us.md)
### 贡献代码
待添加...
敬请期待.

BIN
docs/imgs/desktop.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

BIN
docs/imgs/mobile.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB