Project

localhook

0.0
No commit activity in last 3 years
No release in over 3 years
Localhook makes it super easy to connect public webhook endpoints with development environments.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0

Runtime

 Project Readme

Localhook

Localhook let you receive webhooks behind a firewall. It works like UltraHook or ngrok, but you host the server yourself.

What is Localhook?

A WebHook is an HTTP callback: an HTTP POST that occurs when something happens. Many popular services (GitHub, Stripe, ActiveCampaign, Papertrail, etc) support updates via webhooks. However, since these webhook requests are made over Internet, it's difficult receive them when testing from behind a firewall.

Localhook lets you host a public endpoint for other services and tunnels requests to a private endpoint on your computer.

Installation

Install localhook client:

gem install localhook

Usage

First, you must host your own localhook server on internet. Check localhook-server for details.

Then configure a endpoint in localhook-server:

LOCALHOOK_ENDPOINTS=endpoint1:1234

To expose a local webhook http://localhost:3000/webhook to internet,

localhook https://localhook.mydomain.com http://localhost:3000 --token=1234

Instead of giving third party url "http://localhost:3000/webhook", you give them https://localhook.mydomain.com/endpoint1/webhook.

Any POST request sent to https://localhook.mydomain.com/endpoint1/webhook will be forwarded to http://localhost:3000/webhook.

Contributing

  1. Fork it ( http://github.com//localhook/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT License.