Giter Club home page Giter Club logo

pipe-to-me's Introduction

PIPE TO ME

Stream data over http using curl. Hosted at pipeto.me

  • No javascript
  • Go standard library only

Your randomly generated pipe address:
	https://pipeto.me/<key>

Input example:
	browse to (chrome, firefox): https://pipeto.me/<key>
	curl -T- -s https://pipeto.me/<key>
	hello world<enter>

Pipe example:
	separate terminal: curl -s https://pipeto.me/<key>
	echo hello world | curl -T- -s https://pipeto.me/<key>

File transfer example:
	curl -s https://pipeto.me/<key> > output.txt
	cat input.txt | curl -T- -s https://pipeto.me/<key>

Watch log example:
	browse to (chrome, firefox): https://pipeto.me/<key>
	tail -f logfile | curl -T- -s https://pipeto.me/<key>

Data is not buffered or stored in any way.
- If data is sent to the pipe when no receivers are listening, 
  it will be dropped and is not retrievable.
- Data is also not retrievable after it has been delivered.

Maximum upload size: 64 MB
Not allowed: anything illegal, malicious, inappropriate, etc

This is a personal project and makes no guarantees on:
	reliability, performance, privacy, etc

Demo: https://raw.githubusercontent.com/jpschroeder/pipe-to-me/master/demo.gif
Source: https://github.com/jpschroeder/pipe-to-me

Installation

With go installed:

go get -u github.com/jpschroeder/pipe-to-me

Usage

pipe-to-me -h
  -baseurl string
        the base url of the service
         (default "http://localhost:8080/")
  -httpaddr string
        the address/port to listen on for http
        use :<port> to listen on all addresses
         (default "localhost:8080")

Building

In order to build the project, just use:

go build

Deploying

You can build the project under linux (or Windows Subsystem for Linux) and just copy the executable to your server.

You can then run the program directly or use systemd to install it as a service and keep it running.

Customize the pipe-to-me.service file in the repo for your server and copy it to /lib/systemd/system/pipe-to-me.service (ubuntu)

Start the app with: systemctl start pipe-to-me
Enable it on boot with: systemctl enable pipe-to-me
Check it's status with: systemctl status pipe-to-me
See standard output/error with: journalctl -f -u pipe-to-me

NGINX

You can host the application using go directly, or you can listen on a local port and use nginx to proxy connections to the app.

Make sure that nginx is installed with: apt-get install nginx

Customize pipe-to-me.nginx.conf and copy it to /etc/nginx/sites-available/pipe-to-me.nginx.conf

Remove the default website configuration: rm /etc/nginx/sites-enabled/default

Enable the go proxy: ln -s /etc/nginx/sites-available/pipe-to-me.nginx.conf /etc/nginx/sites-enabled/pipe-to-me.nginx.conf

Restart nginx to pick up the changes: systemctl restart nginx

NGINX HTTPS

If running as a stand-alone go application, you can use the built-in https support. When running behind a proxy, you should enable https in nginx and forward to the localhost http address.

Install the letsencrypt client with:

add-apt-repository ppa:certbot/certbot
apt-get install python-certbot-nginx

Generate and install a certificate with: certbot --nginx -d pipeto.me

The certificate should auto-renew when necessary.

pipe-to-me's People

Contributors

jpschroeder avatar

Stargazers

methimpact avatar

Watchers

 avatar

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.