Maybe you can just parse the URL as usual and then validate the host starts with `//` and the scheme is present? :)