Git Product home page Git Product logo

fiche-golang's Introduction

fiche-golang

fiche-golang is a command line pastebin for sharing terminal output. inspired by fiche.

docker start

sudo docker run -d --restart=unless-stopped -p 8080:80 -p 9999:9999 -e prefix=http://`curl -s https://api.ipify.org`:8080 imfht/fiche-golang:latest

tip: the docker image < 10mb. use docker is a good choise

New Features

Old fiche only support txt file, fiche-golang support lots of file format and will auto add extension. for example:

Fiche

➜  /tmp cat simple_jpg.jpg| nc termbin.com 9999
http://termbin.com/0zuw
➜  /tmp curl http://termbin.com/0zuw

����%

Fiche-golang

➜  /tmp cat simple_jpg.jpg| nc termbin.co 9999
https://termbin.co/t4OZ/index.jpg

and click https://termbin.co/t4OZ/index.jpg you'll see the image.

Client-side usage

for example, use public server

echo "I will always love you" | nc termbin.co 9999

you could get an url to your paste as a response. e.g.:

https://termbin.co/BoUI

Server-side useage

Installation

  1. Clone
git clone https://github.com/imfht/fiche-golang
  1. build
go build main.go

Usage

Usage of ./paste_server:
  -prefix string
        prefix of saved file,eg: https://termbin.co/ (default "http://127.0.0.1/")

Release

if you are using amd 64 Linux, you can download https://github.com/imfht/fiche-golang/raw/master/filche-golang and run directly.

TODO

  • Build executable for common platform
  • Add ipv6 support.
  • Add a systemd example
  • Add a dockerfile
  • Maybe add more options such as white-list etc..
  • Maybe I should limit file size to avoid memory leak.‰‰‰

fiche-golang's People

Contributors

imfht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fiche-golang's Issues

The client side isn't given a url

When I run echo Hello | nc nc.mydomain.com 9999, the client remains hanging. I can see the main program printing where the file is stored though.

Is there something I have to change in the main.go code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.