There are multiple options in the VyOS CLI that take a URL. Examples include: commit archive location, proxy server address, WPAD and boot file URLs in DHCP server. As we implement new features, there certainly will be more.
Right now URL validation is done using regular expressions in command definitions. Those regexes are hard to keep track of and validation logic fixes and improvements have to be done in multiple places. I believe it's time to implement a generic URL validator.
- It should allow command definition authors to specify allowed URL schemes (e.g. only HTTPS, any of HTTP(S)/FTP/SFTP, or something else).
- It should give users informative errors: is the URL scheme inappropriate, if the host part malformed, etc.
- It should support all valid inputs and detect most user errors.