modified: README.md

This commit is contained in:
it00147
2025-11-26 14:39:49 +00:00
parent f1f6cf39fa
commit b6e70d5c35

124
README.md
View File

@@ -51,15 +51,17 @@ Per lindirizzo IP viene mostrato:
## 📂 Struttura del progetto
```
myip-webapp/
├─ app.py
├─ requirements.txt
├─ Dockerfile
├─ static/
│ ├─ myip.css
│ ├─ logo.png
│ └─ favicon.ico
├─ myip.css
├─ logo.png
└─ favicon.ico
└─ README.md
```
---
@@ -69,6 +71,120 @@ myip-webapp/
```bash
docker build -t myip:latest .
docker run -p 8080:8000 myip
```
### Run
```bash
docker run -p 8080:8000 myip
```
Apri:
```
http://localhost:8080
```
---
## ☸️ Deploy in Kubernetes (Helm)
### values.yaml minimale
```yaml
ingress:
enabled: true
className: nginx
host: myip.example.com
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
nginx.ingress.kubernetes.io/use-forwarded-headers: "true"
nginx.ingress.kubernetes.io/real-ip-header: "X-Forwarded-For"
nginx.ingress.kubernetes.io/compute-full-forwarded-for: "true"
tls:
enabled: true
```
### ingress-nginx PROXY protocol (fondamentale)
Nella ConfigMap del controller:
```yaml
data:
use-proxy-protocol: "true"
real-ip-header: "proxy_protocol"
set-real-ip-from: "10.166.93.0/24"
use-forwarded-headers: "true"
```
### HAProxy (L4) davanti ad ingress-nginx
```haproxy
server backend1 10.166.93.34:443 send-proxy-v2 check
server backend2 10.166.93.35:443 send-proxy-v2 check
server backend3 10.166.93.36:443 send-proxy-v2 check
```
---
## 🧠 Note Tecniche
### Determinazione dellIP reale
Lapp utilizza:
```python
X-Forwarded-For X-Real-IP remote_addr
```
ed è compatibile con proxy multipli e ingress-nginx.
### Lookup RIPE
Usa la API ufficiale RIPEstat:
- `/network-info/`
- `/as-overview/`
Timeout veloce (2s) per non bloccare la UI.
---
## 🎨 Personalizzazioni
Tutto il design è modificabile in:
```
static/myip.css
```
Puoi sostituire:
- `logo.png` → per branding
- `favicon.ico` → icona personalizzata
---
## 🏁 Roadmap
- [ ] Endpoint `/api/ip`
- [ ] Multi-theme (light/dark manuale)
- [ ] Mini-widget JavaScript includibile in altri siti
- [ ] Supporto IPv6-only
- [ ] Caching locale del lookup RIPE
---
## 🤝 Credits
- Frontend & Styling by ChatGPT + NETECH style guidelines
- Backend Python + Flask
- Lookup dati: **RIPEstat Data API**
- Supporto PROXY prot. v2: HAProxy + ingress-nginx
---
## 📄 Licenza
MIT (o altra licenza a tua scelta)