goshs

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 3 Imported by: 0

README

Version GitHub GitHub go.mod Go version GitHub issues goreleaser

goshs-logo

goshs is a replacement for Python's SimpleHTTPServer. It allows uploading and downloading via HTTP/S with either self-signed certificate or user provided certificate and you can use HTTP basic auth.

goshs-screenshot

Installation

Release

You can download the executable from the release section

Go

go get -u github.com/patrickhener/goshs
go install github.com/patrickhener/goshs

Build yourself

git clone https://github.com/patrickhener/goshs.git
cd goshs
make build

Usage

goshs -h
Usage of goshs:
  -P string
    	Use basic auth password (user: gopher)
  -d string
    	Web root directory (default "")
  -p int
    	The port (default 8000)
  -s	Use self-signed TLS
  -sc string
    	Path to own server cert
  -sk string
    	Path to own server key
  -ss
    	Use self-signed certificate

Examples

Serve from your current directory

goshs

Serve from another directory

goshs -d /path/to/directory

Serve from port 1337

goshs -p 1337

Password protect the service

goshs -P VeryS3cureP4$$w0rd

Please note: goshs uses HTTP basic authentication. It is recommended to use SSL option with basic authentication to prevent from credentials beeing transfered in cleartext over the line. User is gopher.

Use TLS connection

Self-Signed

goshs -s -ss

Provide own certificate

goshs -s -sk server.key -sc server.crt

Credits

A special thank you goes to sc0tfree for inspiring this project with his project updog written in Python.

Tutorial Series

I wrote several blog posts how and why I implemented all of this. You can find it here if you are intereseted about the technical background.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
myca
Package myca ...
Package myca ...
Package static contains embedded resources
Package static contains embedded resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL