# Configuration IPWatch
# Basé sur consigne-parametrage.md

app:
  name: "IPWatch"
  version: "1.0.6"
  debug: true

network:
  cidr: "10.0.0.0/22"
  gateway: "10.0.0.1"
  dns:
    - "8.8.8.8"
    - "8.8.4.4"

# Sous-réseaux organisés en sections
subnets:
  - name: "static_vm"
    cidr: "10.0.0.0/24"
    start: "10.0.0.0"
    end: "10.0.0.255"
    description: "Machines virtuelles statiques"
  - name: "dhcp"
    cidr: "10.0.1.0/24"
    start: "10.0.1.0"
    end: "10.0.1.255"
    description: "DHCP"
  - name: "iot"
    cidr: "10.0.2.0/24"
    start: "10.0.2.0"
    end: "10.0.2.255"
    description: "IoT"
  - name: "autres"
    cidr: "10.0.3.0/24"
    start: "10.0.3.0"
    end: "10.0.3.254"
    description: "autres"

# IPs connues avec métadonnées
ip_classes:
  "10.0.0.1":
    name: "Gateway"
    location: "Réseau"
    host: "Network"  # Type Network pour affichage spécial (bordure bleue)

scan:
  ping_interval: 600          # Intervalle scan ping (secondes)
  ping_count: 3               # Nombre de ping par IP
  port_scan_interval: 1200    # Intervalle scan ports (secondes)
  parallel_pings: 100         # Nombre de pings simultanés
  timeout: 1.0               # Timeout réseau (secondes)
  force_vendor_update: true  # Écrase le fabricant à chaque scan si true

ports:
  ranges:
    - "22"        # SSH
    - "80"        # HTTP
    - "443"       # HTTPS
    - "445"       # SAMBA
    - "1880"  #nodered
    - "3000"
    - "3389"      # RDP
    - "8123"  #home assistant
    - "8080"      # HTTP alternatif
    - "8006"   # proxmox
    - "8007"  # proxmox backup center
    - "8081"      # HTTP alternatif
    - "8096"  #jellyfin
    - "9090"
    - "3306"      # MySQL
    - "3552"    #arcane
    - "5432"      # PostgreSQL
    - "6053"
    - "8266"
    - "9000"

  # Mapping port -> protocole pour générer des liens cliquables
  protocols:
    22: "ssh"
    80: "http"
    443: "https"
    445: "smb"
    1880: "http"
    3000: "http"
    3306: "mysql"
    3389: "rdp"
    3552: "http"
    5432: "postgresql"
    6053: "http"
    8006: "https"
    8007: "https"
    8080: "http"
    8081: "http"
    8096: "http"
    8266: "http"
    9000: "http"
    9090: "https"

locations:
  - "Bureau"
  - "Salon"
  - "Comble"
  - "Bureau RdC"
  - "Garage"
  - "Exterieur"
  - "SdB"
  - ""

# Hosts avec localisation associée
hosts:
  - name: "physique"
    location: ""
    ip: ""
  - name: "smartphone"
    location: ""
    ip: ""
  - name: "elitedesk"
    location: "Comble"
    ip: "10.0.0.101"
  - name: "m710Q"
    location: "Bureau RdC"
    ip: "10.0.1.232"
  - name: "HP Proliant"
    location: "Bureau RdC"
    ip: "10.0.0.205"
  - name: "pve MSI"
    location: "Bureau RdC"
    ip: "10.0.1.174"
  - name: "HP Proxmox"
    location: "Bureau"
    ip: "10.0.0.x"
  - name: "Lenovo Bureau"
    location: "Bureau"
  - name: "Pve Dell"
    location: "Comble"
    ip: "10.0.1.228"
  - name: "IoT"
    location: ""
  - name: "Network"
    location: ""



history:
  retention_hours: 24        # Conserver 24h d'historique

ui:
  offline_transparency: 0.5  # Transparence des IPs offline
  show_mac: true
  show_vendor: true
  cell_size: 30              # Taille des cellules IP en pixels (30, 35, 40...)
  font_size: 12               # Taille de la police dans les cellules en pixels
  cell_gap: 2.5              # Espacement entre les cellules en pixels
  details_font_size: 13      # Taille de la police dans le volet détails en pixels
  details_spacing: 2         # Espacement entre les champs du volet détails en pixels
  architecture_title_font_size: 18  # Taille des titres Architecture (px)

links:
  hardware_bench_url: "http://10.0.0.50:8087/devices.html"

colors:
  free: "#75715E"            # IP libre (gris Monokai)
  online_known: "#A6E22E"    # En ligne + connue (vert)
  online_unknown: "#66D9EF"  # En ligne + inconnue (cyan)
  offline_known: "#F92672"   # Hors ligne + connue (rose/rouge)
  offline_unknown: "#AE81FF" # Hors ligne + inconnue (violet)
  mac_changed: "#FD971F"     # MAC address changée (orange - alerte)
  network_device: "#1E3A8A"  # Équipements réseau (bleu foncé)

opnsense:
  enabled: true
  host: "10.0.0.1"
  protocol: "http"
  api_key: "ZOwL1iuko13l9tnARvJlU0s93C/44gFwZNRmStRhzGV8u6m2nXAcoOAbb6jxtkEe8dqzIjj4zECcKdzI"
  api_secret: "rMOGHY+3SRfiT7cxpMoGZuwnPPRX0vPHV2oDTn6UPCvH87UXJe1qBkTs8y/ryG942TsTGe5UYO6F7fXK"
  verify_ssl: false

database:
  path: "./data/db.sqlite"

# Services réseau pour l'onglet Ports & Services
services:
  - name: "HTTP"
    port: 80
    protocol: "http"
  - name: "HTTPS"
    port: 443
    protocol: "https"
  - name: "SSH"
    port: 22
    protocol: "ssh"
  - name: "RDP"
    port: 3389
    protocol: "rdp"
  - name: "SMB/CIFS"
    port: 445
    protocol: "smb"
  - name: "FTP"
    port: 21
    protocol: "ftp"
  - name: "DNS"
    port: 53
  - name: "MySQL"
    port: 3306
  - name: "PostgreSQL"
    port: 5432
  - name: "Proxmox VE"
    port: 8006
    protocol: "https"
  - name: "Proxmox Backup"
    port: 8007
    protocol: "https"
  - name: "Home Assistant"
    port: 8123
    protocol: "http"
  - name: "Node-RED"
    port: 1880
    protocol: "http"
  - name: "Jellyfin"
    port: 8096
    protocol: "http"
  - name: "Plex"
    port: 32400
    protocol: "http"
  - name: "Gitea"
    port: 3000
    protocol: "https"
  - name: "Portainer"
    port: 9443
    protocol: "https"
  - name: "Synology DSM"
    port: 5000
    protocol: "http"
  - name: "Unifi Controller"
    port: 8443
    protocol: "https"
  - name: "Arcane"
    port: 3552
    protocol: "http"
  - name: "ESPHome"
    port: 6053
  - name: "Cockpit"
    port: 9090
    protocol: "https"
  - name: "HTTP Alt (8080)"
    port: 8080
    protocol: "http"
  - name: "HTTP Alt (8081)"
    port: 8081
    protocol: "http"
  - name: "HTTP Alt (9000)"
    port: 9000
    protocol: "http"
  - name: "ESP8266"
    port: 8266
    protocol: "http"
