A basic file server automatically generates self certificates and serves the given folder.

Basic Server

A basic file server automatically generates self certificates and serves the given folder.

Options

Usage of /basic-server:
  -client-cert string
        Allow only given client certificate
  -listen string
        Listen addr (default ":443")
  -path string
        Share Path (default "/web/") # Note if you not run in container, default path will be current path
  -server-cert string
        Server cert
  -server-key string
        Server key
  -server-name string
        Server name check from TLS

Examples

Run on local

C:\Users\Ahmet\Desktop\basic-server.exe -h
2021/05/04 02:46:55 github.com/ahmetozer/basic-server
2021/05/04 02:46:55 Current name WORKSTATION\Ahmet
2021/05/04 02:46:55 ./key.pem exist
2021/05/04 02:46:55 ./cert.pem exist
2021/05/04 02:29:51 Starting HTTPS server on :443 at C:\Users\Ahmet\Desktop\

Run in container

This configuration accepts all https clients with all domains.

docker run -it --rm -p 443:443 --mount type=bind,source="/my/path/",target=/web/,readonly  ghcr.io/ahmetozer/basic-server

Run in container with client cert control

To allow incoming request from only cloudflare enable 'Authenticated Origin Pulls' in cloudflare.

docker run -it --rm -p 443:443 --mount type=bind,source="/my/path/",target=/web/,readonly ghcr.io/ahmetozer/basic-server \
--server-name mydomain.test  --client-cert /config/client-cloudflare.pem

Run in different user

You can also run in different user id for access shared path.

docker run -it --rm -p 443:443 -u 1249:1249 --mount type=bind,source="/secret/my/path/",target=/web/,readonly ghcr.io/ahmetozer/basic-server \
--server-name mydomain.test  --client-cert config/client-cloudflare.pem

Dump

You can also inspect your HTTP request with visiting /dump page.

Owner
Ahmet ÖZER
Software Engineer Student ,Working on Linux Server, Network and IOT projects
Ahmet ÖZER
Similar Resources

Maybe is a Go package to provide basic functionality for Option type structures

Maybe Maybe is a library that adds an Option data type for some native Go types. What does it offer: The types exported by this library are immutable

Oct 4, 2022

Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site

Bigfile -- a file transfer system that supports http, rpc and ftp protocol   https://bigfile.site

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文 ∙ English Bigfile is a file transfer system, supports http, ftp and

Dec 31, 2022

QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file

QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file

QueryCSV enable you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to CSV file

Dec 22, 2021

Dragonfly is an intelligent P2P based image and file distribution system.

Dragonfly is an intelligent P2P based image and file distribution system.

Dragonfly Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in o

Jan 9, 2023

File uploader with support for multiple hosts and progress reporting written in Go.

File uploader with support for multiple hosts and progress reporting written in Go.

go-upload File uploader with support for multiple hosts and progress reporting written in Go. Windows, Linux, macOS and Android binaries Usage Upload

Dec 18, 2022

Provide an upload endpoint that stores files on pinata and returns a json response with the uploaded file pinata url

Purpose Build a template repository to get to coding as quickly as possible, by starting from a common template which follows the guidelines here Feat

Dec 30, 2021

Extract profiles and tasks information from CSV file

Footsite-Bot ideas from jw6602 Extract profiles and tasks information from CSV f

Nov 25, 2022

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Upgit - Upgit helps you simply upload any file to your Github repository and then get a raw URL for it

Dec 27, 2022

🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

🌳 Go Bonzai™ File Completer, normal completion looking at files and directories with trailing slashes on directories (like bash)

Apr 12, 2022
A small executable programme that deletes your windows folder.
A small executable programme that deletes your windows folder.

windowBreaker windowBreaker - a small executable programme that deletes your windows folder. Last tested and built in Go 1.17.3 Usage Upon launching t

Nov 24, 2021
Encguess is an application which attempts to guess the encoding of a given file.

Encguess Encguess is an application which attempts to guess the encoding of a given file. It will be focused on solving practical problems which I hav

Nov 10, 2021
Takes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.

vfsgen Package vfsgen takes an http.FileSystem (likely at go generate time) and generates Go code that statically implements the provided http.FileSys

Dec 18, 2022
This is a tool to extract TODOs, NOTEs etc or search user provided terms from given files and/or directories.

ado This is a tool to extract TODOs, NOTEs etc or user provided terms from given files and/or directories. DEPRECIATED: My project seek has cleaner co

Aug 11, 2022
Small gh extension that suggests issues to work on in a given GitHub repository

gh contribute being a gh extension for finding issues to help with in a GitHub repository. This extension suggests an issue in a given repository to w

Dec 24, 2022
go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).
go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).

中文 English 愿景:为用户提供最简单、可靠、高效的分布式文件系统。 go-fastdfs是一个基于http协议的分布式文件系统,它基于大道至简的设计理念,一切从简设计,使得它的运维及扩展变得更加简单,它具有高性能、高可靠、无中心、免维护等优点。 大家担心的是这么简单的文件系统,靠不靠谱,可不

Jan 8, 2023
Read data from rss, convert in pdf and send to kindle. Amazon automatically convert them in azw3.

Kindle-RSS-PDF-AZW3 The Kindle RSS PDF AZW3 is a personal project. The Kindle RSS PDF AZW3 is a personal project. I received a Kindle for Christmas, a

Jan 10, 2022
A very light-weight file sharing platform, including server and client

file-transporter A very light-weight file sharing platform, including server and client Installation git clone https://github.com/vence722/file-transp

Jan 12, 2022
The best HTTP Static File Server, write with golang+vue
The best HTTP Static File Server, write with golang+vue

gohttpserver Goal: Make the best HTTP File Server. Features: Human-friendly UI, file uploading support, direct QR-code generation for Apple & Android

Dec 30, 2022
ZipFly: a golang HTTP server that streams a ZIP file from a list of URLs extracted from a JSON manifest

ZipFly, streaming files as a ZIP like a ?? ZipFly is a golang HTTP server that s

Jun 6, 2022