pyngrok is a Python wrapper for ngrok

Overview

pyngrok - a Python wrapper for ngrok

PyPI Version CI/CD Codecov Docs Python Versions PyPI License Tweet

pyngrok is a Python wrapper for ngrok that manages its own binary, making ngrok available via a convenient Python API.

ngrok is a reverse proxy tool that opens secure tunnels from public URLs to localhost, perfect for exposing local web servers, building webhook integrations, enabling SSH access, testing chatbots, demoing from your own machine, and more, and its made even more powerful with native Python integration through pyngrok.

Installation

pyngrok is available on PyPI and can be installed using pip:

pip install pyngrok

or conda:

conda install -c conda-forge pyngrok

That's it! pyngrok is now available as a package to our Python projects, and ngrok is now available from the command line.

Basic Usage

To open a tunnel, use the connect method, which returns a NgrokTunnel, and this returned object has a reference to the public URL generated by ngrok in its public_url attribute.

.ngrok.io" -> "http://localhost:80"> http_tunnel = ngrok.connect() # Open a SSH tunnel # "localhost:22"> ssh_tunnel = ngrok.connect(22, "tcp") ">
from pyngrok import ngrok

# Open a HTTP tunnel on the default port 80
# 
     
      
       .ngrok.io" -> "http://localhost:80">
      
     
http_tunnel = ngrok.connect()
# Open a SSH tunnel
# 
     
       "localhost:22">
     
ssh_tunnel = ngrok.connect(22, "tcp")

The connect method takes kwargs as well, which allows us to pass additional properties that are supported by ngrok.

This package puts the default ngrok binary on our path, so all features of ngrok are available on the command line.

ngrok http 80

For details on how to fully leverage ngrok from the command line, see ngrok's official documentation.

Documentation

For more advanced usage, pyngrok's official documentation is available at http://pyngrok.readthedocs.io.

Python 2.7

The last version of pyngrok that supports Python 2.7 is 4.1.x, so we need to pin pyngrok>=4.1,<4.2 if we still want to use pyngrok with this version of Python. Its legacy documentation can be found here.

Contributing

If you would like to get involved, be sure to review the Contribution Guide.

Want to contribute financially? If you've found pyngrok useful, a donation would also be greatly appreciated!

Comments
  • Zombie ngrok processes

    Zombie ngrok processes

    Not sure if this is a pyngrok issue or not, but it's something I'm running into and wanted to bring it to your attention. Feel free to close if it's a Python or ngrok binary issue, or if it's too much of a niche problem. It's more of just an OS housekeeping issue than a functional problem.

    Describe the Bug I have a long running application that always keeps an ngrok tunnel open using pyngrok. The tunnel occasionally drops and my application will automatically start a new one. Sometimes the ngrok process itself fails to respond, so the process is killed and then relaunched automatically with the next connect(). Over time, zombie ngrok processes accumulate (on linux) and remain in the process tree until the Python application (the parent process) is terminated or restarted.

    1577660169370 remmina-2020-7-25-5:50:27 786813

    Steps to Reproduce I run a timer thread to check for connection every few minutes and restart the tunnel when necessary, but it can probably also be simulated with a loop and delay. ngrok.connect() kill ngrok process externally with linux kill statement (simulating a crash of the ngrok binary) ngrok.disconnect() will result in a ngrok.exception.PyngrokNgrokURLError ngrok.get_tunnels() will result in a ngrok.exception.PyngrokNgrokURLError ngrok.kill() leaves defunct zombie process ngrok.connect() starts new ngrok process

    Restarting the Python program clears out all of the zombie ngrok processes (as it should).

    Expected Behavior Defunct ngrok processes should be removed by the calling process (Python?) at the time the child process exits.

    Environment

    • OS: Linux Raspbian on ARM
    • Python Version: 3.5
    • pyngrok Version: 4.1.5

    Additional Context I'm not sure why the ngrok process randomly stops responding, but it happens at least every few days. Also, this is running on a Raspberry Pi

    bug 
    opened by JennaSys 17
  • Crash on start with HiddenEye

    Crash on start with HiddenEye

    Describe the Bug Traceback (most recent call last): File "HiddenEye.py", line 49, in <module> server_menu.server_selection(port) File "/home/ghost/Desktop/88888/HiddenEye-dev/Defs/ActionManager/Server/server_menu.py", line 47, in server_selection server_runner.start_ngrok(port) # FIXED File "/home/ghost/Desktop/88888/HiddenEye-dev/Defs/ActionManager/Server/server_runner.py", line 88, in start_ngrok ngrok.connect(port) File "/usr/local/lib/python3.8/dist-packages/pyngrok/ngrok.py", line 183, in connect api_url = get_ngrok_process(ngrok_path, config_path, auth_token, region).api_url File "/usr/local/lib/python3.8/dist-packages/pyngrok/ngrok.py", line 135, in get_ngrok_process return process.get_process(ngrok_path, config_path, auth_token, region) File "/usr/local/lib/python3.8/dist-packages/pyngrok/process.py", line 147, in get_process return _start_process(ngrok_path, config_path, auth_token, region) File "/usr/local/lib/python3.8/dist-packages/pyngrok/process.py", line 270, in _start_process raise PyngrokNgrokError("The ngrok process errored on start.", ngrok_process.startup_logs, pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start.

    Environment

    • Tested on:
    1. Parrot Linux
    2. Arch Linux Server
    • pyngrok Version: 2.1.5

    Additional Context Maybe i did something wrong with HiddenEye, but i can't solve this problem on my own. Tried everything i can, should be working. Works great on my own machine but some of users have this error.

    invalid 
    opened by sTiKyt 17
  • pyngrok.exception.PyngrokNgrokError: The ngrok process was unable to start.

    pyngrok.exception.PyngrokNgrokError: The ngrok process was unable to start.

    Describe the Bug Hey Alex,

    I'm looking to build a flask server /w Ngrok and using Pyngrok. I have an issue that is probably very easy but can't seem to figure it. It's throwing out an error for me when I'm trying to build a tunnel. I've configured my yml file with my api key. Simply:

    from pyngrok import ngrok
    public_url = ngrok.connect()
    

    Stack trace shows:

    Traceback (most recent call last):
      File "<input>", line 1, in <module>
      File "C:\Users\*Redact*\PycharmProjects\GithubListener\venv\lib\site-packages\pyngrok\ngrok.py", line 158, in connect
        api_url = get_ngrok_process(ngrok_path, config_path).api_url
      File "C:\Users\*Redact*\PycharmProjects\GithubListener\venv\lib\site-packages\pyngrok\ngrok.py", line 117, in get_ngrok_process
        return process.get_process(ngrok_path, config_path)
      File "C:\Users\*Redact*\PycharmProjects\GithubListener\venv\lib\site-packages\pyngrok\process.py", line 84, in get_process
        return _start_process(ngrok_path, config_path)
      File "C:\Users\*Redact*\PycharmProjects\GithubListener\venv\lib\site-packages\pyngrok\process.py", line 197, in _start_process
        raise PyngrokNgrokError("The ngrok process was unable to start.", errors)
    pyngrok.exception.PyngrokNgrokError: The ngrok process was unable to start.
    

    Environment

    • Windows 10
    • Python 3.7
    • Pyngrok 5.1
    invalid 
    opened by l0pht1337 16
  • Stackoverflow [68766528] - ngrok reconnect issues

    Stackoverflow [68766528] - ngrok reconnect issues

    Hi Alex,

    Thank you for responding to me here: https://stackoverflow.com/questions/68766528/pyngrok-retrying-failed-connections?noredirect=1#comment121546605_68766528

    As for my code, I have a Flask server which calls this function here to automatically start an ngrok tunnel:

    # Function to start ngrok instance e.g. when restart button on Admin page is hit
    def startngroktunnel():
        ngrokFile = os.path.abspath("ngrok.yml")
        ngrokConfig = conf.PyngrokConfig(config_path=ngrokFile)
        http_tunnel = ngrok.connect(name='merakihud', pyngrok_config=ngrokConfig)
    

    my YAML file:

    authtoken: <hidden>
    tunnels:
      merakihud:
        addr: 5001
        proto: http
        root_cas: trusted
        bind_tls: true
    

    Stack trace / log:

    [email protected]:~/fujiwara-api/app$ python3 webhook.py 
    t=2021-08-16T11:00:39+0900 lvl=eror msg="failed to reconnect session" obj=csess id=eeb66655d762 err="x509: certificate signed by unknown authority"
    Traceback (most recent call last):
      File "webhook.py", line 11, in <module>
        appsc.startngroktunnel()
      File "/home/vlad/fujiwara-api/app/app_startchecks.py", line 112, in startngroktunnel
        http_tunnel = ngrok.connect(name='merakihud', pyngrok_config=ngrokConfig)
      File "/home/vlad/.local/lib/python3.8/site-packages/pyngrok/ngrok.py", line 251, in connect
        api_url = get_ngrok_process(pyngrok_config).api_url
      File "/home/vlad/.local/lib/python3.8/site-packages/pyngrok/ngrok.py", line 162, in get_ngrok_process
        return process.get_process(pyngrok_config)
      File "/home/vlad/.local/lib/python3.8/site-packages/pyngrok/process.py", line 295, in get_process
        return _start_process(pyngrok_config)
      File "/home/vlad/.local/lib/python3.8/site-packages/pyngrok/process.py", line 472, in _start_process
        raise PyngrokNgrokError("The ngrok process errored on start: {}.".format(ngrok_process.startup_error),
    pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: x509: certificate signed by unknown authority.
    

    Basically this script works on other systems, its just this one and I'm quite sure its my company trying to prevent reverse proxy tunnels through the use of a cloud DNS system to block requests (I'm going to test this also by manually changing my DNS Settings in my Ubuntu VM) and this only started being blocked recently from what I can tell.

    ngrok application stdout log

    [email protected]:~/fujiwara-api/app$ ngrok start --log=stdout -config ngrok.yml merakihud
    INFO[08-16|11:10:08] open config file                         path=/home/vlad/fujiwara-api/app/ngrok.yml err=nil
    t=2021-08-16T11:10:08+0900 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040
    t=2021-08-16T11:10:09+0900 lvl=eror msg="failed to reconnect session" obj=csess id=c11a09a2aae0 err="x509: certificate signed by unknown authority"
    t=2021-08-16T11:10:09+0900 lvl=eror msg="failed to reconnect session" obj=csess id=c11a09a2aae0 err="x509: certificate signed by unknown authority"
    t=2021-08-16T11:10:10+0900 lvl=eror msg="failed to reconnect session" obj=csess id=c11a09a2aae0 err="Get \"https://dns.google.com/resolve?cd=true&name=tunnel.us.ngrok.com&type=A\": x509: certificate signed by unknown authority"
    t=2021-08-16T11:10:13+0900 lvl=info msg="tunnel session started" obj=tunnels.session
    t=2021-08-16T11:10:13+0900 lvl=info msg="client session established" obj=csess id=c11a09a2aae0
    t=2021-08-16T11:10:13+0900 lvl=info msg="started tunnel" obj=tunnels name=merakihud addr=http://localhost:5001 url=https://444b23cd36ff.ngrok.io
    

    As you can see, it swaps to dns.google.com to resolve the tunnel then magically it comes up, I find pyngrok stops before it hits this fallback and so I can't get the tunnel up otherwise. Any help would be much appreciated!

    bug wip 
    opened by vladivanovic 12
  • Provided ngrok binary defunct?

    Provided ngrok binary defunct?

    whenever i use the ngrok provided by this package;- located in /home/me/miniconda3/bin/ngrok, I only get the results of ngrok help no matter what command i put in.

    It appeared to be the source of a bug resulting in a PyNgrokError being thrown.

    bug 
    opened by CallumJHays 9
  • Py Ngrok WIndow

    Py Ngrok WIndow

    I would very much like that when I save the file in .pyw format and run it there is a way to hide the ngrok window. If there is already a method I would like to know. Thank you so much

    enhancement stale 
    opened by Ricc4rdo0107 7
  • Bad tunnel name when serving local directories

    Bad tunnel name when serving local directories

    Describe the Bug When tunneling a local directory, the generated name in ngrok.py:163: "name": name if name else "{}-{}-{}".format(proto, port, uuid.uuid4()), apparently creates a name that the ngrok api is not able to process correctly, specifically for listing tunnel info or deleting tunnel.

    Steps to Reproduce

    from pyngrok import ngrok
    from time import sleep
    
    ngrok.set_auth_token(SECRET_KEY)
    public_url = ngrok.connect('file:///')
    
    print(public_url)
    sleep(5)
    ngrok.disconnect(public_url)
    

    Above code generates error at disconnect attempt: pyngrok.exception.PyngrokNgrokHTTPError: ngrok client exception, API returned 404: {"status_code":404,"msg":"Not Found","details":{"path":"/api/tunnels/http-file:///-d207771d-59de-4d1b-838c-b56751d14661 (http)"}}

    Using the api directly with the generated URI to get tunnel info: http://127.0.0.1:4040/api/tunnels/http-file:%2F%2F%2F-d207771d-59de-4d1b-838c-b56751d14661 results in:

    <Error>
    <StatusCode>404</StatusCode>
    <Message>Not Found</Message>
    </Error>
    

    Removing the "port" portion of the name fixes it:

    from pyngrok import ngrok
    from time import sleep
    import uuid
    
    ngrok.set_auth_token(SECRET_KEY)
    public_url = ngrok.connect('file:///', name='http-{}'.format(uuid.uuid4()))
    
    print(public_url)
    sleep(5)
    ngrok.disconnect(public_url)
    

    Expected Behavior ngrok.disconnect() should not generate errors with a valid public_url

    Environment

    • OS: Linux Mint 19.3
    • Python Version: 3.7.5
    • pyngrok Version: 4.1.3

    Additional Context N/A

    bug 
    opened by JennaSys 7
  • get_tunnels() keeps dropped tunnels in list

    get_tunnels() keeps dropped tunnels in list

    Describe the Bug Not sure if this is a bug or feature, but if a tunnel gets dropped due to loss of internet connection, get_tunnels() still retains the invalid tunnel.

    Steps to Reproduce

    url = ngrok.connect()
      <drop internet connection>
    ngrok.disconnect(url)
      <ngrok client exception, URLError: timed out>
      <reconnect internet connection>
    url = ngrok.connect()
    len(ngrok.get_tunnels()) == 2
    

    Expected Behavior If disconnect() on a tunnel fails with a "session closed" error, it should be removed from the list.
    get_tunnels() should ideally return the same results as the web interface.

    Environment

    • OS: Linux Mint 19.3
    • Python Version: 3.7.5
    • pyngrok Version: 4.1.5

    Additional Context The only way I know to clear out dropped tunnels is to use ngrok.kill() and start over. I'm open to other suggestions if there are alternatives.

    Edit: This may be an ngrok issue - calling the api directly still shows the tunnels as well. Pulling up tunnel status on the account in the web admin does not though. Is there a way to clear these out in the api?

    wontfix 
    opened by JennaSys 6
  • How to set region while connecting nrok tunnel

    How to set region while connecting nrok tunnel

    Describe the Bug I have a paid version of ngrok and thus a reserved hostname for region in. When I try to connect ngrok tunnel following

    public_url = ngrok.connect(options={'hostname':'example.com'}) I get following region error as default region is us:

    Traceback (most recent call last):
      File "main.py", line 25, in <module>
        public_url = ngrok.connect(options={'region': 'in','hostname':'example.com'})
      File "/usr/local/lib/python3.6/dist-packages/pyngrok/ngrok.py", line 178, in connect
        tunnel = NgrokTunnel(api_request("{}/api/{}".format(api_url, "tunnels"), "POST", data=options, timeout=timeout))
      File "/usr/local/lib/python3.6/dist-packages/pyngrok/ngrok.py", line 314, in api_request
        status_code, e.msg, e.hdrs, response_data)
    pyngrok.exception.PyngrokNgrokHTTPError: ngrok client exception, API returned 502: {"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"This name is reserved in a different region.\nFailed to bind the domain 'example.com' in the region 'us' because it is reserved\nin the 'in' region.\n\nTry connecting to a different region: https://ngrok.com/docs#global-usage\r\n\r\nERR_NGROK_322\r\n"}}
    
    
    

    Steps to Reproduce public_url = ngrok.connect(options={'hostname':'example.com'}) Pass options with reserved hostname with region other than us image

    Expected Behavior There should be a function like ngrok.set_region("<REGION>") like we have ngrok.set_auth_token("<NGROK_AUTH_TOKEN>")

    enhancement 
    opened by sumitdubey 6
  • Ngrok not working in colab

    Ngrok not working in colab

    Describe the Bug It was working fine before Dec 2020 but in Jan 2021. I'm not able to create a tunnel.

    Before, I was able to create tunnel and then use it for streamlit app. But now, I'm not able too cause whenever the link gets generated and I open it then it says Tunnel XXXXXX.ngrok.io not found.

    Steps to Reproduce I tried both ways:

    1. Downloading the zip file in colab and then creating tunnel
    2. Installing the pyngrok and then creating tunnel

    but neither of them is working.

    Expected Behavior It should be able to create a tunnel.

    Environment

    • OS: Linux (Colab)
    • Python Version: 3.6.9
    • pyngrok Version: 5.0.1

    Additional Context You can try it here: https://colab.research.google.com/drive/1BZFSfzLGiZ-1inZ8S9xQPCQFVemzPrpO?usp=sharing

    invalid-forum invalid-ngrok 
    opened by debparth 5
  • Choosing region not working

    Choosing region not working

    The region is not being selected on a tcp tunnel despite setting it in the options

    host = ngrok.connect(8080, proto='tcp', options={'region': 'in'}) this would be equivalent to ngrok tcp -region=in 8080

    Expected Behavior This should lead to the creation of a tcp tunnel with region in, but this is instead created with the US (default) region

    Environment

    • Windows 10
    • Python Version: 3.8.2
    • pyngrok Version: 2.0.3

    The connection still opens in the default location, the US every time. No errors are being thrown, but the tcp tunnel just opens with the us region

    enhancement 
    opened by supercoder186 5
Releases(5.2.1)
  • 5.2.1(Nov 29, 2022)

  • 5.2.0(Nov 28, 2022)

    Added

    • Support for ngrok v3 (v2 is still used by default).
    • Documentation and examples for using pyngrok with ngrok v3.

    Fixed

    • Stability improvements.
    • Documentation improvements.
    • Test improvements.
    Source code(tar.gz)
    Source code(zip)
  • 5.1.0(Aug 25, 2021)

    Removed

    • reconnect_session_retries from PyngrokConfig, instead relying on ngrok's own built-in retry mechanism on startup fails.

    Fixed

    • Logging improvements.
    • Documentation improvements.
    • Test improvements.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.6(Aug 8, 2021)

    Added

    • Darwin 64-bit ARM support, as this was added to ngrok itself.

    Removed

    • Darwin 386 support, as this was removed from ngrok itself.

    Fixed

    • Build improvements.
    • Documentation improvements.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.5(Mar 26, 2021)

    Added

    • reconnect_session_retries is a new configuration parameter in PyngrokConfig, which determines the max number of times to retry establishing a new session with ngrok if the connection fails on startup.

    Fixed

    • Build improvements.
    • Test improvements.
    Source code(tar.gz)
    Source code(zip)
  • 5.0.4(Mar 8, 2021)

  • 5.0.3(Mar 3, 2021)

  • 5.0.2(Feb 12, 2021)

  • 5.0.1(Dec 28, 2020)

  • 5.0.0(Oct 25, 2020)

    Added

    Changed

    • ngrok.connect() now returns a NgrokTunnel instead of a str of the public URL. The returned NgrokTunnel has a reference to the previously returned public_url in it.
    • ngrok.connect() changed its signature, renamed kwarg port (the first arg) to addr to match ngrok's documentation.
    • ngrok.connect() changed its signature, the options kwarg should now be unpacked, pass each option directly to the method as a kwarg.
    • NgrokTunnel.__init__()'s params (data, pyngrok_config, and api_url) are now required.
    • ngrok.disconnect() no longer installs and starts ngrok, it simply returns if the ngrok process has not been started.
    • Renamed conf.DEFAULT_PYNGROK_CONFIG to conf._default_pyngrok_config (use conf.set_default() instead).
    • Renamed ngrok.ensure_ngrok_installed() to ngrok.install_ngrok().
    • ngrok.install_ngrok() (formerly ngrok.ensure_ngrok_installed()) changed its signature, now takes a pyngrok_config (optional) instead of ngrok_path as its only arg.
    • Renamed process._ensure_path_ready() to process._validate_path().

    Removed

    • Support for Python 2.7. To use pyngrok with Python 2.7, pin pyngrok>=4.1,<4.2.
    • return_ngrok_tunnel from ngrok.connect(). The kwarg can still be passed, but it will do nothing, it now always uses the True behavior.
    Source code(tar.gz)
    Source code(zip)
  • 4.2.2(Oct 12, 2020)

    The next release, 5.0.0, contains breaking changes, including dropping support for Python 2.7. 4.2.x is meant to ease migration between 4.1.x and 5.0.0 and should not be pinned, as it will not be supported after 5.0.0 is released. To prepare for these breaking changes, see the changelog below. To avoid these breaking changes altogether, or if Python 2.7 support is still needed, pin pyngrok>=4.1,<4.2.

    Added

    • ngrok.connect() replaced options with kwargs, maintained backwards compatibility. Support for passing options as a dict will be removed in 5.0.0, unpack the dict as kwargs.
    • ngrok.connect() added return_ngrok_tunnel to its args, which defaults to False for backwards compatibility. This will default to True in 5.0.0, and the flag will be removed.
    • conf.get_default(), replacing the need to directly reference conf.DEFAULT_PYNGROK_CONFIG, which will be removed in 5.0.0.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.16(Oct 12, 2020)

  • 4.1.13(Oct 3, 2020)

  • 4.1.12(Sep 10, 2020)

    Added

    • Validation for log_format in ngrok's config.yaml, as pyngrok depends on key/value logs.
    • Validation for log_level in ngrok's config.yaml, as pyngrok depends on the level being either info or debug.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.11(Sep 9, 2020)

  • 4.1.10(Aug 14, 2020)

  • 4.1.9(Aug 12, 2020)

    Fixed

    • The thread that monitors ngrok logs now maintains its own alive state instead of modifying PyngrokConfig.monitor_thread.
    • The thread that monitors ngrok logs is now daemonic, so it no longer blocks the Python process from terminating.
    • Documentation improvements.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.8(Jul 27, 2020)

    Added

    • DEFAULT_PYNGROK_CONFIG variable to conf module, used when pyngrok_config is not passed to ngrok methods.

    Fixed

    • Zombie processes remaining in certain cases when ngrok exited early or was terminated externally.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.7(Jul 24, 2020)

  • 4.1.6(Jul 9, 2020)

    Added

    • start_new_process is a new configuration parameter in PyngrokConfig, which will be passed to subprocess.Popen when ngrok is started. Requires Python 3 and POSIX.

    Fixed

    • Documentation improvements in integration examples.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.5(Jul 6, 2020)

    Fixed

    • Appears ngrok itself has a bug around not properly escaping characters in tunnel names, so avoiding this bug for fileserver tunnels by substituting their name.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.4(Jul 6, 2020)

    Fixed

    • Inconsistent support for a local directory (ex. file:///) being passed as ngrok.connect()'s port. This is valid, and ngrok will use its built-in fileserver for the tunnel.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.3(Jun 21, 2020)

  • 4.1.2(Jun 19, 2020)

  • 4.1.1(Jun 18, 2020)

  • 4.1.0(Jun 18, 2020)

  • 4.0.3(Jun 17, 2020)

  • 4.0.2(Jun 17, 2020)

  • 4.0.1(Jun 9, 2020)

    Changed

    • Moved _DEFAULT_NGROK_CONFIG_PATH from ngrok module to conf module, renamed to DEFAULT_NGROK_CONFIG_PATH.

    Fixed

    • Exception thrown when trying to validate the config when no file is given (i.e. the variable is None and thus the default should be used).
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Jun 9, 2020)

    Added

    • PyngrokConfig, which contains all of pyngrok's configuration for interacting with the ngrok binary rather than passing these values around in an ever-growing list of kwargs. It is documented here.
    • log_event_callback is a new configuration parameter in PyngrokConfig, a callback that will be invoked each time a ngrok log is emitted.
    • monitor_thread is a new configuration parameter in PyngrokConfig which determines whether ngrok should continue to be monitored (for logs, etc.) after it has finished starting. Defaults to True.
    • startup_timeout is a new configuration parameter in PyngrokConfig.
    • max_logs is a new configuration parameter in PyngrokConfig.
    • start_monitor_thread() and stop_monitor_thread() to NgrokProcess.

    Changed

    • timeout parameter that was passed down to ngrok.api_request() is now configurable by request_timeout in PyngrokConfig.
    • Max number of logs stored by the NgrokProcess from 500 to 100.
    • NgrokProcess.log_boot_line() renamed to NgrokProcess._log_startup_line().
    • NgrokProcess.log_line() renamed to NgrokProcess._log_line().
    • Auto-generated tunnel names (if name is not given when calling ngrok.connect()) are no prefixed with proto and port.
    • web_addr cannot be set to false in, as the pyngrok modules depends on this API.

    Fixed

    • installer.install_default_config() documentation now properly reflects that data is a dict and not a str.

    Removed

    • ngrok_path, config_path, auth_token, and region were all removed from process.get_process(). Use PyngrokConfig instead.
    • ngrok_path, config_path, auth_token, and region were all removed from ngrok.get_ngrok_process(). Use PyngrokConfig instead.
    • ngrok_path, config_path, auth_token, region, and timeout were all removed from ngrok.connect(). Use PyngrokConfig instead.
    • ngrok_path, config_path, and timeout were all removed from ngrok.disconnect(). Use PyngrokConfig instead.
    • ngrok_path, and timeout were all removed from ngrok.get_tunnels(). Use PyngrokConfig instead.
    Source code(tar.gz)
    Source code(zip)
Owner
Alex Laird
Leader • Software Creator • Visionary • Learner • [he/him] Engineer @ Twilio
Alex Laird
Tiny Interactive File Transfer Application

TIFTA: Tiny Interactive File Transfer Application This repository holds all the source code, tests and documentation of the TIFTA software. The main g

Jorge Martínez 2 Dec 08, 2021
A Python module that allows you to create and use simple sockets.

EasySockets A Python module that allows you to create and use simple sockets. Installation The easysockets module can be installed using pip. pip inst

Matthias Wijnsma 2 Jan 16, 2022
Simple HTTP Server for CircuitPython

Introduction Simple HTTP Server for CircuitPython Dependencies This driver depen

Adafruit Industries 22 Jan 06, 2023
tradingview socket api for fetching real time prices.

tradingView-API tradingview socket api for fetching real time prices. How to run git clone https://github.com/mohamadkhalaj/tradingView-API.git cd tra

MohammadKhalaj 35 Dec 31, 2022
This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

Nord Fondkommission AB 2 Dec 15, 2021
league-connection is a python package to communicate to riot client and league client

league-connection is a python package to communicate to riot client and league client.

Sandbox 1 Sep 13, 2022
Wifi-Jamming is a simple, yet highly effective method of causing a DoS on a wireless implemented using python pyqt5.

pyqt5-linux-wifi-jamming-tool Linux-Wifi-Jamming is a simple GUI tool, yet highly effective method of causing a DoS on a wireless implemented using py

lafesa 8 Dec 05, 2022
ANalyse is a vehicle network analysis and attack tool.

CANalyse is a tool built to analyze the log files to find out unique datasets automatically and able to connect to simple user interfaces suc

0xh3nry 87 Dec 18, 2022
Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.

🚀 IPpy Parallel testing of IP addresses and domains in python. Reads IP addresses and domains from a CSV file and gives two lists of accessible and i

Shivam Mathur 54 May 21, 2022
EUserv - A Python script which can help you renew your free EUserv IPv6 VPS

English | 简体中文 This project comes from https://github.com/a-beam-of-light/eu_ex

阿两 0 Jan 06, 2022
Rufus is a Dos tool written in Python3.

🦎 Rufus 🦎 Rufus is a simple but powerful Denial of Service tool written in Python3. The type of the Dos attack is TCP Flood, the power of the attack

Billy 88 Dec 20, 2022
No-dependency, single file NNTP server library for developing modern, rfc3977-compliant (bridge) NNTP servers.

nntpserver.py No-dependency, single file NNTP server library for developing modern, rfc3977-compliant (bridge) NNTP servers for python =3.7. Develope

Manos Pitsidianakis 44 Nov 14, 2022
It can be used both locally and remotely (indicating IP and port)

It can be used both locally and remotely (indicating IP and port). It automatically finds the offset to the Instruction Pointer stored in the stack.

DiegoAltF4 13 Dec 29, 2022
EV: IDS Evasion via Packet Manipulation

EV: IDS Evasion via TCP/IP Packet Manipulation 中文文档 Introduction EV is a tool that allows you crafting TCP packets and leveraging some well-known TCP/

256 Dec 08, 2022
Connection package to a raspberry or any other machine using ssh, it simplifies the deployment scripts and monitoring.

Connection package to a raspberry or any other machine using ssh, it simplifies the deployment scripts and monitoring.

Dashstrom 7 Mar 29, 2022
Building a Robust IOT device which is customizable, encrypted, secure and user friendly

Building a Robust IOT device which is customizable, encrypted, secure and user friendly, which uses a single GPIO pin to extract multiple sensor values

1 Jan 03, 2022
ServerStatus with node management and monitor

ServerStatus with node management and monitor

lidalao 162 Jan 01, 2023
A simple tool to get information about IP

IP Info Tool Just a simple tool to get IP's information, it uses requests module to gather information about IP, if you dont have much knowledge about

0 Dec 01, 2021
Tool for ROS 2 IP Discovery + System Monitoring

Monitor the status of computers on a network using the DDS function of ROS2.

Ar-Ray 33 Apr 03, 2022
A pure-Python KSUID implementation

Svix - Webhooks as a service Svix-KSUID This library is inspired by Segment's KSUID implementation: https://github.com/segmentio/ksuid What is a ksuid

Svix 83 Dec 16, 2022