Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
duruyao committed Jul 29, 2024
1 parent eee4c08 commit c8bffb4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GoShare

GoShare provides a simple Web UI and a file transfer service which using HTTP or FTP protocol.
GoShare provides a simple Web UI and a file transfer service which using HTTP protocol.

## Install

Expand All @@ -10,8 +10,6 @@ Download the compiled **[releases](https://github.com/duruyao/goshare/releases)*

## Usage

The following operation takes the Linux platform as an example.

Type `goshare -h` to show help manual.

```text
Expand All @@ -26,21 +24,20 @@ Type `goshare -h` to show help manual.
Usage: goshare [OPTIONS]
GoShare shares file and directory by HTTP or FTP protocol
GoShare shares files and directories via HTTP protocol
Options:
-h, --help Display this help message
--host STRING Host address to listen (default: 'localhost:3927')
--path STRING Path or directory (default: '/opt/sdk')
--host STRING Host address to listen (default: '0.0.0.0:80')
--path STRING Path or directory (default: '${PWD}')
--scheme STRING Scheme name (default: 'http')
--url-prefix STRING Custom URL prefix (default: '/')
-v, --version Print version information and quit
Examples:
goshare -host example.io -path /opt/sdk
goshare -host localhost:3927 -path /opt/sdk
goshare --host localhost:3927 --url-prefix /sdk --path /opt/sdk
goshare --host=localhost:3927 --url-prefix=/sdk --path=/opt/sdk
./goshare -host 0.0.0.0:80 -path ${PWD}
./goshare --host 0.0.0.0:80 --path ${PWD} --url-prefix /
./goshare --host=0.0.0.0:80 --path=${PWD} --url-prefix=/
See more about GoShare at https://github.com/duruyao/goshare
Expand All @@ -64,17 +61,21 @@ Start goshare in the background via **Nohup**.
sudo nohup goshare --host=localhost:3927 --url-prefix=$PWD --path=$PWD </dev/null 1>/tmp/goshare.out 2>&1 &
```

Share the files with your group members by using the **LAN IP** or **WAN IP** instead of `localhost`, `127.0.0.1` or `*`.
Share the files with your group members by using the **LAN IP** or **WAN IP** instead of `localhost`, `127.0.0.1`, `*` or `0.0.0.0`.

Browse the file system via a web browser.

![web_page.png](./web_page.png)

Download a file via `wget` or `curl`.
Download files via `wget` or `curl`.

```bash
wget <https://ip:port/path/to/file>

curl <https://ip:port/path/to/file> -o <file>
```

Download a directory via `wget`.
Download the directories via `wget`.

```bash
wget -r -np -nH -R "index.html*" <https://ip:port/path/to/dir>
Expand Down
Binary file added favicon.ico
Binary file not shown.
Binary file removed img/browser-127.0.0.1.png
Binary file not shown.
Binary file added web_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c8bffb4

Please sign in to comment.