Git Product home page Git Product logo

goshare's Introduction

GoShare

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

Install

Download executable

Download the compiled releases for your platform.

Usage

The following operation takes the Linux platform as an example.

Type goshare -h to show help manual.


   _____       _____ _
  / ____|     / ____| |
 | |  __  ___| (___ | |__   __ _ _ __ ___
 | | |_ |/ _ \\___ \| '_ \ / _' | '__/ _ \
 | |__| | (_) |___) | | | | (_| | | |  __/
  \_____|\___/_____/|_| |_|\__,_|_|  \___|


Usage: goshare [OPTIONS]

GoShare shares file and directory by HTTP or FTP 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')
    --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

See more about GoShare at https://github.com/duruyao/goshare

Start goshare in the foreground.

sudo goshare --host=localhost:3927 --url-prefix=$PWD --path=$PWD

Start goshare in the background.

sudo goshare --host=localhost:3927 --url-prefix=$PWD --path=$PWD &

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 *.

Download a file via wget or curl.

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

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

Download a directory via wget.

wget -r -np -nH -R "index.html*" <https://ip:port/path/to/dir>

goshare's People

Contributors

duruyao avatar

Stargazers

 avatar  avatar

Watchers

 avatar

goshare's Issues

curl: (18) transfer closed with xxx bytes remaining to read

Downloading a large file shared by goshare using curl, and the following error occurres.

$ curl --url http://host:port/path/to/large_file --output large_file
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 8030M    0 69.9M    0     0   9.7M      0  0:13:41  0:00:07  0:13:34 9851k
curl: (18) transfer closed with xxx bytes remaining to read

Using the tool wget gives a similar error.

$ wget http://host:port/path/to/large_file
--2022-05-19 11:56:05--  http://host:port/path/to/large_file
Connecting to 10.0.13.147:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8420589568 (7.8G) [application/gzip]
Saving to: ‘large_file’

large_file                              16%[+++                       ]   1.30G  9.93MB/s    in 7.2s

2022-05-19 12:00:54 (9.40 MB/s) - Connection closed at byte xxx. Giving up.

GoShare should support sharing a specific file, not the entire directory where the file is located

I just want to share the file HELLO.txt, but the whole directory is shared.

$ echo $PWD
/home/duruyao/tmp
$ ls
HELLO.txt  HI.txt
$ goshare -v
GoShare 1.1.0 (2022-05-26)
$ goshare --path HELLO.txt

   _____       _____ _
  / ____|     / ____| |
 | |  __  ___| (___ | |__   __ _ _ __ ___
 | | |_ |/ _ \\___ \| '_ \ / _' | '__/ _ \
 | |__| | (_) |___) | | | | (_| | | |  __/
  \_____|\___/_____/|_| |_|\__,_|_|  \___|


GoShare is handing directory '/home/duruyao/tmp' and listening on 'localhost:3927'

Access your shared files via this URL http://localhost:3927/HELLO.txt
$ curl -kSsL http://localhost:3927/HI.txt -o HI.txt.bak
$ curl -kSsL http://localhost:3927/HELLO.txt -o HELLO.txt.bak
$ ls
HELLO.txt  HELLO.txt.bak  HI.txt  HI.txt.bak

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.