Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexagoncore/get-ngrok-tunnel-info
Easy and fast tool written in python to get info about running ngrok tunnel as variables in python. TAGS: Get ngrok ip, Get ngrok port, Get ngrok hostname, Get ngrok info
https://github.com/hexagoncore/get-ngrok-tunnel-info
get get-info https info info-grabber linux macos ngrok ngrok-tunnel python tcp tunnel windows
Last synced: about 1 month ago
JSON representation
Easy and fast tool written in python to get info about running ngrok tunnel as variables in python. TAGS: Get ngrok ip, Get ngrok port, Get ngrok hostname, Get ngrok info
- Host: GitHub
- URL: https://github.com/hexagoncore/get-ngrok-tunnel-info
- Owner: HexagonCore
- License: mit
- Created: 2021-05-08T18:11:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-07T14:35:17.000Z (10 months ago)
- Last Synced: 2024-10-11T14:25:10.607Z (about 1 month ago)
- Topics: get, get-info, https, info, info-grabber, linux, macos, ngrok, ngrok-tunnel, python, tcp, tunnel, windows
- Language: Python
- Homepage: https://pypi.org/project/ngrok-info/
- Size: 128 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![CodeFactor](https://www.codefactor.io/repository/github/hexagoncore/get-ngrok-tunnel-info/badge)](#/)
[](#/)
[](#/)
[](#/)
[](#/)# Get ngrok tunnel info
Easy and fast tool written in **python 3** to get info about running ngrok tunnel. Supports **HTTPS** and **TCP**
___
### ## Installation
* ### Windows / macOS / Linux
Run `python3 -m pip install ngrok_info`###
## Usage
* ### Windows / macOS / Linux
Add this to your script:
```py
import ngrok_info
ngrok_info.get()
```
Now, if you run it, you will see output with some **info**. If ngrok is not running on your computer, it will output error. After you run it, you can acess the info as variables too!
If you are using **config file** to specify the tunnel preset, use `ngrok_info.get("TUNNEL_NAME")` (Replace *TUNNEL_NAME* with your tunnel name. Please do not remove the quotation marks.)If you do not want to print output, but **only variables**, use `ngrok_info.get_notext()`
If the tunnel is **TCP**, you have access these variables: `ngrok_info.tnl_name`, `ngrok_info.tnl_type`, `ngrok_info.address`, `ngrok_info.ip` and `ngrok_info.port`.
With **https** tunnel, you can acess these variables: `ngrok_info.tnl_name`, `ngrok_info.tnl_type`, `ngrok_info.address` and `ngrok_info.ip`.
**⚠️** The `ngrok_info.get()` and `ngrok_info.get_notext()` functions do **not return** anything when executed! **⚠️**
Do you want to be reminded to update the package?
Run `ngrok_info.allow_update()` RIGHT AFTER importing the package.
### ## Uninstallation
* ### Windows / macOS / Linux
Run `python3 -m pip uninstall ngrok-info`###
## FAQ
* ### Error: wrong tunnel name specified or no tunnel is running
Check if ngrok is really running on your computer.
If yes, check if you have correctly specified the [tunnel name](https://ngrok.com/docs/agent/config/#tunnel-configurations). You need to specify it only, if you are using [config file](https://ngrok.com/docs/agent/config/#default-locations) to specify tunnel preset. If you've checked everything, but it's still not working, contact [us on Discord](https://discord.gg/agREa6Dh3r) or [open an issue](https://github.com/HexagonCore/get-ngrok-tunnel-info/issues/new).
### Do you like this? Hit that ⭐!
Use the star button as way to show us, that it works
Forks and pull requests are welcome of course