Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/trimpta/ngrokwebhook

Made by chatgpt, starts an ngrok tunnel and forwards the url onto a discord webhook
https://github.com/trimpta/ngrokwebhook

Last synced: about 1 month ago
JSON representation

Made by chatgpt, starts an ngrok tunnel and forwards the url onto a discord webhook

Awesome Lists containing this project

README

        

# The code and following readme has been generated by ChatGPT 4o

This project enables you to establish a secure tunnel using ngrok for exposing a local service to the internet, while also sending notifications via a Discord webhook.

## Prerequisites

- Python 3.x
- Pip (Python package installer)

## Setup

1. **Clone the Repository**
```sh
git clone https://your-repository-url.git
cd your-repository-folder
```

2. **Install Dependencies**
```sh
pip install -r requirements.txt
```

3. **Configure Settings**
- Create a file named `config.json` in the project directory.
- Add your ngrok authentication token and Discord webhook URL to `config.json`:

```json
{
"ngrok_auth_token": "your_ngrok_auth_token_here",
"discord_webhook_url": "your_discord_webhook_url_here"
}
```

## Usage

1. **Run the Script**
```sh
python your_script_name.py --port PORT_NUMBER
```

Replace `PORT_NUMBER` with the port you want to expose via ngrok.

2. **Access the Service**
- The script will start an ngrok tunnel on the specified port and post the public URL to your Discord webhook.
- Use the URL provided in the Discord message to access your service from anywhere.

## Files

- `config.json`: Contains the ngrok authentication token and Discord webhook URL.
- `requirements.txt`: Lists the Python dependencies.
- `your_script_name.py`: The main Python script to run.