Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - drduh/gone: Emphemeral content hosting server - share files, messages and more using command-line API or a script-free HTML interface.
Nothing Special   »   [go: up one dir, main page]

Skip to content
/ gone Public

Emphemeral content hosting server - share files, messages and more using command-line API or a script-free HTML interface.

License

Notifications You must be signed in to change notification settings

drduh/gone

Repository files navigation

Design

gone is an ephemeral content hosting server written in Go.

The primary goal is to enable sharing of files and text using command-line API or simple HTML user interface.

Features

  • No disk storage (memory only) - content cleared on exit
  • No third-party dependencies - only Go required to build
  • No Javascript required to use HTML-based user interface
  • Share multiple files: upload, download and list feature
  • Files expire after number of downloads or time duration
  • Share short text messages and shared text area for edit
  • JSON-based configurations, logging and server responses
  • Token (string-based) authentication and request limiter

Development

gone requires Go to develop.

Build

make build

Binaries are built to the release directory for distribution and installation.

Run

make run

Debug

make debug

Install

To install as a service on Linux:

make install

Output

Application output is structured in JSON format and can be parsed with jq for convenience, for example:

gone | jq .data

The optional -debug flag can be used for debug mode (provides additional application output).

Configuration

gone uses an embedded JSON-based configuration defaultSettings.json as default settings.

To change application settings, copy the default settings JSON file and use the -config flag:

gone -config mySettings.json

To disable a feature, set the path to an empty value. For example, to disallow file uploads:

"upload": "",

Clients

The server provides a basic user interface for uploading, downloading and listing files at the default path (/):

localhost:8080

All features are also available using command line programs such as curl:

Status

Get server status:

curl localhost:8080/heartbeat

Upload

Upload file:

curl -F "file=@test.txt" localhost:8080/upload

Upload multiple files:

curl -F "file=@test.txt" -F "file=@test2.txt" localhost:8080/upload

With 3 allowed downloads before file expiration:

curl -F "downloads=3" -F "file=@test.txt" localhost:8080/upload

With a 15 minutes file expiration:

curl -F "duration=15m" -F "file=@test.txt" localhost:8080/upload

List

List uploaded files:

curl localhost:8080/list

Download

Download a file (the default configuration requires basic authentication):

curl -H "X-Auth: mySecret" "localhost:8080/download/test.txt"

Get static (never expires) content:

curl localhost:8080/static

Message

Post a message (use single quotes to wrap special characters):

curl -s -F 'message=hello, world!' localhost:8080/msg >/dev/null

Wall

Post multi-line text for shared edit:

curl -s -F "wall=$(cat /etc/dnsmasq.conf)" localhost:8080/wall >/dev/null

Get shared multi-line text:

curl localhost:8080/wall | jq -r

Random

Get a random value of certain type:

curl localhost:8080/random/

curl localhost:8080/random/name

curl localhost:8080/random/nato

curl localhost:8080/random/number

curl localhost:8080/random/coin

Functions

See config/zshrc for alias and function examples, such as:

$ gone_put test.txt 1 20m
[
  {
    "name": "test.txt",
    "downloads": {
      "allow": 1
    },
    "size": "6.00 Bytes",
    "owner": {
      "address": "127.0.0.1:4306",
      "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.3"
    },
    "time": {
      "allow": "20m0s",
      "upload": "2025-04-22T10:00:00"
    }
  }
]

Documentation

Application documentation is available with godoc:

make doc

Testing

Unit tests are validated by a workflow on repository changes. They can also be run manually:

make test

make test-verbose

Test coverage is also available - to generate an HTML report as testCoverage.html:

make cover

About

Emphemeral content hosting server - share files, messages and more using command-line API or a script-free HTML interface.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

0