Hi,
your SntpClient.java has hardcoded NTP port.
https://github.com/lyft/Kronos-Android/blob/master/kronos-java/src/main/java/com/lyft/kronos/internal/ntp/SntpClient.java#L91
Sometimes is useful host custom NTP server on different then well known (blocked) port.
What about parse port for NTP server from host using : as separator and NTP_PORT as fallback?
Define host like host := "hostname[:port]" where hostname is string containing DNS or IP address of target NTP server and optional port for target listening port number.
Right before dns resolve(InetAddress address = dnsResolver.resolve(host);).
Hi,
your
SntpClient.javahas hardcoded NTP port.https://github.com/lyft/Kronos-Android/blob/master/kronos-java/src/main/java/com/lyft/kronos/internal/ntp/SntpClient.java#L91
Sometimes is useful host custom NTP server on different then well known (blocked) port.
What about parse port for NTP server from
hostusing:as separator andNTP_PORTas fallback?Define
hostlikehost := "hostname[:port]"wherehostnameis string containing DNS or IP address of target NTP server and optionalportfor target listening port number.Right before dns resolve(
InetAddress address = dnsResolver.resolve(host);).