https://github.com/matthewpi/fiche
Simple TCP to haste-server proxy
https://github.com/matthewpi/fiche
fiche golang hastebin hastebin-client pastebin tcp
Last synced: about 1 year ago
JSON representation
Simple TCP to haste-server proxy
- Host: GitHub
- URL: https://github.com/matthewpi/fiche
- Owner: matthewpi
- License: mit
- Created: 2024-07-30T17:14:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-31T16:09:44.000Z (over 1 year ago)
- Last Synced: 2025-03-25T00:43:09.619Z (about 1 year ago)
- Topics: fiche, golang, hastebin, hastebin-client, pastebin, tcp
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fiche
Simple hastebin proxy server similar in nature to the original
[fiche](https://github.com/solusipse/fiche).
Instead of storing data ourselves, we rely on a [haste-server](https://github.com/toptal/haste-server)
or any HTTP server that accepts a `POST /documents` request that returns a JSON response in the
format of `{"key":"string"}`. The `key` is then joined to the server's URL, forming a response of
`{url}/{key}` (e.x. `https://ptero.co/{key}`) that is sent back to the caller.
This tool is used to allow easy sharing of logs and files without any complex bash scripting or
software installation on systems.
## Client-side Usage
Requests:
```shell script
echo 'Hello, world!' | nc ptero.co 99
```
```shell script
cat file.txt | nc ptero.co 99
```
Response:
```text
https://ptero.co/{key}
```
## Server-side Usage
```text
$ fiche --help
Usage: fiche [flags]
Flags:
-h, --help Show context-sensitive help.
--listen=":99" Listen address
--hastebin=https://ptero.co haste-server URL
```
## Building
```bash
CGO_ENABLED=0 go build -v -trimpath -o dist/fiche github.com/matthewpi/fiche
```