main
build / build (push) Successful in 4m55s
tbin
tbin is a simple pastebin application that allows you to store and share text snippets from your terminal.
Prerequisites
Before building and starting tbin, ensure that you have the following software installed on your system:
- Docker
- Go (if you want to build the application from source)
Building from source
To build tbin from source, follow these steps:
- Clone the tbin repository:
git clone https://git.rznet.fr/tchivert/tbin - Change into the project directory:
cd tbin - Build the application using Go:
go build -o tbin - The
tbinbinary will be generated in the project directory.
Starting tbin with Docker
tbin can also be started using Docker. To do this, follow these steps:
- Make sure you have Docker installed and running on your machine.
- Clone the tbin repository:
git clone https://git.rznet.fr/tchivert/tbin - Change into the project directory:
cd tbin - Start the application using Docker Compose:
docker-compose up -d - tbin will be started as a Docker container and will be accessible via telnet and HTTP.
Usage
To submit a text snippet using the telnet interface, follow these steps:
- Open a terminal session.
- Use the
nccommand to connect to the tbin server:echo "Your text snippet" | nc localhost 4242 - The server will generate a unique URL for your text snippet, which will be displayed in the terminal.
Purges can be trigged with the /purge endpoint.
It will remove all snippets olders than the configuered TTL (default: 48 hours).
Configuration
tbin can be configured using command-line flags when starting the application.
--host: Host address to listen on (default: 0.0.0.0).--port: Port number to listen on for telnet connections (default: 4242).--http-port: Port number to listen on for HTTP connections (default: 8080).--http-url: Base URL to send back to the client (default: http://localhost:8080/).--dir: Directory to store snippets (default: ./data).--ttl: Time-to-live in hours for the snippets (default: 48).--buff: Buffer size in MB for handling incoming data (default: 8).--chunk: Chunk size in bytes for reading data (default: 8192).--conn-time: Connection timeout in seconds (default: 10).--read-time: Read timeout in seconds (default: 2).--verbose: Enable verbose logging (default: false).--plaintext: Only allow plaintext snippets (default: false).
License
tbin is licensed under the MIT License. See the LICENSE file for more information.
Description
Languages
Go
67.2%
HTML
30.9%
Dockerfile
1.9%