Allow set custom port for NTP server
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 287
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
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);`).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in kronos-java/src/main/java/com/lyft/kronos/internal/ntp/SntpClient.java at the DNS resolution point referenced in the issue. Review how the host is passed to dnsResolver.resolve and how NTP_PORT is used, then verify that a host with an optional port uses that port while a host without one retains the fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100