All Projects → droidlife → django-rok

droidlife / django-rok

Licence: MIT license
Public url for your local django web server

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-rok

Pyngrok
A Python wrapper for ngrok
Stars: ✭ 159 (+736.84%)
Mutual labels:  webhook, ngrok
Ngrok
Expose your localhost to the web. Node wrapper for ngrok.
Stars: ✭ 1,897 (+9884.21%)
Mutual labels:  webhook, ngrok
PhpBotFramework
A framework for Telegram Bot API written in PHP.
Stars: ✭ 56 (+194.74%)
Mutual labels:  webhook
CTFtime-Discord-hooks
A script that will send the upcoming CTFs to given discord webhook
Stars: ✭ 18 (-5.26%)
Mutual labels:  webhook
plaxt
Webhooks based Trakt.tv scrobbling for Plex
Stars: ✭ 20 (+5.26%)
Mutual labels:  webhook
snmp notifier
A webhook to relay Prometheus alerts as SNMP traps, because sometimes, you have to deal with legacy
Stars: ✭ 33 (+73.68%)
Mutual labels:  webhook
docker-serveo
https://serveo.net is an alternative for ngrok. taichunmin/serveo can let you secure URL to your localhost server through any NAT or firewall in Docker. And taichunmin/serveo-server can let you host your own serveo.
Stars: ✭ 91 (+378.95%)
Mutual labels:  ngrok
deployserver
Deploy your project automatically when git branch was updated.
Stars: ✭ 24 (+26.32%)
Mutual labels:  webhook
gogs-webhook-plugin
Jenkins Gogs Webhook
Stars: ✭ 76 (+300%)
Mutual labels:  webhook
dialogflow-webhook-response-libary-in-python
This library simplifies the JSON response building in Python for Dialogflow.
Stars: ✭ 56 (+194.74%)
Mutual labels:  webhook
epf-transmitter
astrizhachuk.github.io/epf-transmitter/
Stars: ✭ 32 (+68.42%)
Mutual labels:  webhook
plugin-gogs-webhook
[NOT MAINTAINED] Plugin to handle Gogs Webhooks
Stars: ✭ 29 (+52.63%)
Mutual labels:  webhook
mulukhiya-toot-proxy
各種ActivityPub対応インスタンスへの投稿に対して、内容の更新等を行うプロキシ。通称「モロヘイヤ」。
Stars: ✭ 24 (+26.32%)
Mutual labels:  webhook
tnnlink
Simple HTTP tunnel using SSH remote port forwarding
Stars: ✭ 21 (+10.53%)
Mutual labels:  ngrok
pyTwitchAPI
A Python 3.7 implementation of the Twitch API, EventSub and PubSub
Stars: ✭ 132 (+594.74%)
Mutual labels:  webhook
froggit-go
Froggit-Go is a universal Go library, allowing to perform actions on VCS providers.
Stars: ✭ 19 (+0%)
Mutual labels:  webhook
micro-dockerhub-hook
Automatic docker deployment with webhooks
Stars: ✭ 32 (+68.42%)
Mutual labels:  webhook
django-facebook-messenger-bot-tutorial
Code for my Tutorial on building a Facebook Messenger bot using Django/Python
Stars: ✭ 71 (+273.68%)
Mutual labels:  ngrok
shark
Best Tool For Phishing, Future Of Phishing
Stars: ✭ 238 (+1152.63%)
Mutual labels:  ngrok
discord-twitter-webhooks
🤖 Stream tweets to Discord
Stars: ✭ 47 (+147.37%)
Mutual labels:  webhook

django-rok

Public url for exposing your local web server

Overview

Django-rok is an ssh tunnel tool that provide a public url for your local web server and help in testing webhook integrations. The django-rok is inspired from ngrock and built using paramiko.

Installation

Install using pip...

pip install django-rok

Quick Start

  1. Add "django_rok" to your INSTALLED_APPS setting like this::

     INSTALLED_APPS = [
         ...
         'django_rok',
     ]
  2. Add the following parameters to the settings.py::

    ROK_REMOTE_HOST="192.168.1.1" # remote host ip
    ROK_REMOTE_PORT=9000 # remote host port to connect to
    ROK_USERNAME="root" # remote host username
    ROK_PASSWORD="root" # remote host password
  3. Instead of django runsver run this command::

    python manage.py runrok

    This will run the rokserver as well as the django development server.

  4. Now go to the url http://192.168.1.1:9000 to access your local development server publicaly.

Debugging

  1. It's possible that your remote host by default doesn't allow port forwarding. To enable this open /etc/ssh/sshd_config

    $ sudo vim /etc/ssh/sshd_config
    

    Add the following line somewhere in that config file. Make sure you add it only once!

    GatewayPorts yes
    

    Now restart the service

    $ sudo service ssh restart
    
  2. Make sure that the remote port specified is open on the server.

Additional Configuration

  1. Private key can be used to connect to the remote server. To do so add the following parameter to settings.py

    ROK_KEY="/path/to/private/key" # private key for remote host connection
    ROK_PASSWORD=None # remote host password is not required since we are using private key
  2. Rokserver can be started standalone without invoking the django development server. Thing can be achieved by setting env variable

    ROK_ENV="PRODUCTION"
  3. Local port for rokserver can be changed by passing the -lp parameter

    python manage.py runrok -lp 8080
    

Command Line Usage

You can also pass the parameters through command line.

Example:

python manage.py runrok -r 192.168.1.1 -rp 9000 -u 'root' -p 'root'

To check the command line parameters run python manage.py runrok --help

usage: manage.py runrok [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS]
                      [--pythonpath PYTHONPATH] [--traceback] [--no-color]
                      [-lp LOCAL_PORT] [-rp REMOTE_PORT] [-r REMOTE_HOST]
                      [-u USER_NAME] [-p PASSWORD] [-key PKEY] [-env ENV]

Command to run runrok server along with django development server

optional arguments:
-h, --help            show this help message and exit
--version             show program's version number and exit
-v {0,1,2,3}, --verbosity {0,1,2,3}
                      Verbosity level; 0=minimal output, 1=normal output,
                      2=verbose output, 3=very verbose output
--settings SETTINGS   The Python path to a settings module, e.g.
                      "myproject.settings.main". If this isn't provided, the
                      DJANGO_SETTINGS_MODULE environment variable will be
                      used.
--pythonpath PYTHONPATH
                      A directory to add to the Python path, e.g.
                      "/home/djangoprojects/myproject".
--traceback           Raise on CommandError exceptions
--no-color            Don't colorize the command output.
-lp LOCAL_PORT        The local port to forward the request.
-rp REMOTE_PORT       The remote port for ssh connection.
-r REMOTE_HOST        The remote host for ssh connection
-u USER_NAME          The username for remote host
-p PASSWORD           The password for remote host(If there)
-key PKEY             The private key for remote host(If there)
-env ENV              Which env the server is running on

Development

Want to contribute? Great!

To fix a bug or enhance an existing module, follow these steps:

  • Fork the repo
  • Create a new branch (git checkout -b improve-feature)
  • Make the appropriate changes in the files
  • Add changes to reflect the changes made
  • Commit your changes (git commit -am 'Improve feature')
  • Push to the branch (git push origin improve-feature)
  • Create a Pull Request

Bug / Feature Request

If you find a bug kindly open an issue here by including the error thrown.

If you'd like to request a new function, feel free to do so by opening an issue here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].