From eaba3ada9590a58977eaea2a9b8045d69629c6a1 Mon Sep 17 00:00:00 2001 From: Alexander Schiemann Date: Wed, 21 May 2025 14:01:53 +0200 Subject: [PATCH] 3 --- README.md | 70 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 775ec49..d9bddf6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # ip2nginx +[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/donate/?hosted_button_id=JNFS79EFEM7C6)

- [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/donate/?hosted_button_id=JNFS79EFEM7C6)

- +

@@ -13,25 +13,29 @@

+--- + ## 💡 Project Overview **ip2nginx** is a lightweight and secure system for dynamically updating NGINX reverse proxy configurations based on public IP address changes, typically reported by edge devices like **pfSense**. It ensures that NGINX always routes traffic through the correct IP, even in dynamic environments. **Current Version:** `0.0.1` +--- + ## 📚 Table of Contents - [💡 Project Overview](#project-overview) - [⚙️ Features](#-features) - [📁 Project Structure](#-project-structure) -- [✅ Example Entry in token.json](#-example-tokenjson) -- [✅ Example Entry in meta.json](#-example-metajson) - [🚀 Update Process: update.php](#-remote-update-api-updatephp) - [🚀 Update Process: updater.php](#-update-process-updaterphp) - [🛠 Environment Setup: check_env.php](#-check_envphp-environment-setup) - [📅 Cron Setup with run.sh](#-cron-setup-runsh) - [🔄 Usage Example from pfSense](#-pfsense-shell-example) +- [✅ Example Entry in token.json](#-example-tokenjson) +- [✅ Example Entry in meta.json](#-example-metajson) - [🛡 Security](#-security-highlights) - [✅ Requirements](#-requirements) - [📜 License](#-license) @@ -73,35 +77,6 @@ ip2nginx/ --- -## ✅ Example: `token.json` - -```json -{ - "domain1.to.com": "SECRET_TOKEN_8v73jDKsdLzAq9DkeUz1", - "domain2.to.com": "SECRET_TOKEN_3im83jUj28mjo2mI23un" -} -``` - ---- - -## ✅ Example: `meta.json` - -```json -{ - "domain1.to.com": { - "domain": "domain.from.com", - "ip": "192.0.2.4", - "port": "443", - "protocol": "https", - "location": "/", - "time": "2025-05-16T09:00:00+00:00", - "changed": 1 - } -} -``` - ---- - ## 🌐 Remote Update API: `update.php` Supports **POST** (preferred) and **GET** methods. @@ -181,6 +156,35 @@ curl -s -X POST "$SERVER/update.php" -d "name=$NAME" -d "domain=$DOMAIN" - --- +## ✅ Example: `token.json` + +```json +{ + "domain1.to.com": "SECRET_TOKEN_8v73jDKsdLzAq9DkeUz1", + "domain2.to.com": "SECRET_TOKEN_3im83jUj28mjo2mI23un" +} +``` + +--- + +## ✅ Example: `meta.json` + +```json +{ + "domain1.to.com": { + "domain": "domain.from.com", + "ip": "192.0.2.4", + "port": "443", + "protocol": "https", + "location": "/", + "time": "2025-05-16T09:00:00+00:00", + "changed": 1 + } +} +``` + +--- + ## 🔒 Security Highlights - `.htaccess` denies access to all files except `update.php`.