isValidTrackerUrl

libtorrent's is_valid_tracker_url (src/parse_url.cpp). Rejects empty URLs, any URL containing a control character or space (RFC 3986 + CRLF-injection defence), and anything not beginning (case-insensitively) with http://, https://, or udp://. The remaining structural check from the C++ (parse_url_components succeeding) is reproduced by parseUrlComponentsOk.