3
This commit is contained in:
parent
3f604f53fe
commit
eaba3ada95
70
README.md
70
README.md
@ -1,8 +1,8 @@
|
|||||||
# ip2nginx
|
# ip2nginx
|
||||||
|
[](https://www.paypal.com/donate/?hosted_button_id=JNFS79EFEM7C6)
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
[](https://www.paypal.com/donate/?hosted_button_id=JNFS79EFEM7C6)<br><br>
|
<img src="https://nginxproxymanager.com/github.png">
|
||||||
<img src="https://nginxproxymanager.com/github.png">
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<img src="https://img.shields.io/badge/version-2.12.3-green.svg?style=for-the-badge">
|
<img src="https://img.shields.io/badge/version-2.12.3-green.svg?style=for-the-badge">
|
||||||
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
|
||||||
@ -13,25 +13,29 @@
|
|||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 💡 Project Overview
|
## 💡 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.
|
**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`
|
**Current Version:** `0.0.1`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<!-- TOC -->
|
<!-- TOC -->
|
||||||
## 📚 Table of Contents
|
## 📚 Table of Contents
|
||||||
|
|
||||||
- [💡 Project Overview](#project-overview)
|
- [💡 Project Overview](#project-overview)
|
||||||
- [⚙️ Features](#-features)
|
- [⚙️ Features](#-features)
|
||||||
- [📁 Project Structure](#-project-structure)
|
- [📁 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: update.php](#-remote-update-api-updatephp)
|
||||||
- [🚀 Update Process: updater.php](#-update-process-updaterphp)
|
- [🚀 Update Process: updater.php](#-update-process-updaterphp)
|
||||||
- [🛠 Environment Setup: check_env.php](#-check_envphp-environment-setup)
|
- [🛠 Environment Setup: check_env.php](#-check_envphp-environment-setup)
|
||||||
- [📅 Cron Setup with run.sh](#-cron-setup-runsh)
|
- [📅 Cron Setup with run.sh](#-cron-setup-runsh)
|
||||||
- [🔄 Usage Example from pfSense](#-pfsense-shell-example)
|
- [🔄 Usage Example from pfSense](#-pfsense-shell-example)
|
||||||
|
- [✅ Example Entry in token.json](#-example-tokenjson)
|
||||||
|
- [✅ Example Entry in meta.json](#-example-metajson)
|
||||||
- [🛡 Security](#-security-highlights)
|
- [🛡 Security](#-security-highlights)
|
||||||
- [✅ Requirements](#-requirements)
|
- [✅ Requirements](#-requirements)
|
||||||
- [📜 License](#-license)
|
- [📜 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`
|
## 🌐 Remote Update API: `update.php`
|
||||||
|
|
||||||
Supports **POST** (preferred) and **GET** methods.
|
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
|
## 🔒 Security Highlights
|
||||||
|
|
||||||
- `.htaccess` denies access to all files except `update.php`.
|
- `.htaccess` denies access to all files except `update.php`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user