[PR #285] feat: Add support for FQDN, IPv4, and IPv6 addresses in server settings #322

Open
opened 2025-11-20 04:14:06 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE-Local/pull/285

State: closed
Merged: Yes


Summary

This PR adds support for FQDN (Fully Qualified Domain Names), IPv4, and IPv6 addresses in the server settings modal.

Changes

  • Replace IPv4-only validation with comprehensive address validation function
  • Support IPv4 addresses (e.g., 192.168.1.1)
  • Support IPv6 addresses including compressed format (e.g., ::1, 2001:db8::1)
  • Support FQDN/hostnames (e.g., server.example.com, localhost)
  • Update UI label from 'IP Address' to 'Host/IP Address'
  • Update placeholder text with examples for all supported formats
  • Update error messages to reflect new validation capabilities

Validation

The validation function now checks for:

  1. IPv4 addresses using RFC-compliant regex
  2. IPv6 addresses (full format, compressed format, and IPv4-mapped)
  3. FQDN/hostnames per RFC 1123 (max 253 chars, labels max 63 chars)

Testing

  • IPv4 addresses validate correctly
  • IPv6 addresses validate correctly (including compressed format)
  • FQDN/hostnames validate correctly
  • Invalid addresses show appropriate error messages
  • UI labels and placeholders updated correctly
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE-Local/pull/285 **State:** closed **Merged:** Yes --- ## Summary This PR adds support for FQDN (Fully Qualified Domain Names), IPv4, and IPv6 addresses in the server settings modal. ## Changes - Replace IPv4-only validation with comprehensive address validation function - Support IPv4 addresses (e.g., 192.168.1.1) - Support IPv6 addresses including compressed format (e.g., ::1, 2001:db8::1) - Support FQDN/hostnames (e.g., server.example.com, localhost) - Update UI label from 'IP Address' to 'Host/IP Address' - Update placeholder text with examples for all supported formats - Update error messages to reflect new validation capabilities ## Validation The validation function now checks for: 1. IPv4 addresses using RFC-compliant regex 2. IPv6 addresses (full format, compressed format, and IPv4-mapped) 3. FQDN/hostnames per RFC 1123 (max 253 chars, labels max 63 chars) ## Testing - [x] IPv4 addresses validate correctly - [x] IPv6 addresses validate correctly (including compressed format) - [x] FQDN/hostnames validate correctly - [x] Invalid addresses show appropriate error messages - [x] UI labels and placeholders updated correctly
saavagebueno added the pull-request label 2025-11-20 04:14:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE-Local#322