Luma3ds: Use *.pool.ntp.org instead of Google servers.

Created on 25 Jul 2019  Â·  17Comments  Â·  Source: LumaTeam/Luma3DS

*.google.com is blocked in China, and using a VPN is impossible on a 3DS.

Most helpful comment

I searched SO and found this answer.
You can use curl to access a server and extract the current time in the header.

curl -H'Cache-Control:no-cache' -sI example.org|grep ^Date

Of course, I replaced Google with the "example" site since I do not think that it will be usually blocked.
It is not very accurate but it should be accurate within 3-5 seconds, which is enough for a game console.

All 17 comments

Heh right.

Do you have a better NTP server which IP doesn't change?

Just let the user set the IP.

This is a dumb suggestion, but is the Windows NTP server blocked in China?

Also, @TuxSH couldn't you check DNS to get the IP from hostname?

time.windows.com is not blocked.
I think that yoh should just let the user to specify an IP.

FWIW NIST runs a bunch of NTP servers with static addresses, but they also give this advice:

Whether you connect to a server using the name or the IP address, it is a bad practice to “hard-code” a particular server name or address into a device so that these parameters cannot be changed by the end user if that becomes necessary at some future time.

Luma has a configuration file, config.bin, but its contents aren't in plaintext. Could an user-provided URL be stored in there nevertheless?

I searched SO and found this answer.
You can use curl to access a server and extract the current time in the header.

curl -H'Cache-Control:no-cache' -sI example.org|grep ^Date

Of course, I replaced Google with the "example" site since I do not think that it will be usually blocked.
It is not very accurate but it should be accurate within 3-5 seconds, which is enough for a game console.

I'd be willing to let you use my private site for this, if need be. (It's a
private file share for minor things, so it's forever under construction lol)

On Tuesday, October 22, 2019, Gong S. notifications@github.com wrote:

I searched SO and found this answer
https://superuser.com/questions/307158/how-to-use-ntpdate-behind-a-proxy
.
You can use curl to access a server and extract the current time in the
header.

curl -H'Cache-Control:no-cache' -sI example.org|grep ^Date

Of course, I replaced Google with the "example" site since I do not think
that it will be usually blocked.
It is not very accurate but it should be accurate within 3-5 seconds,
which is enough for a game console.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/AuroraWright/Luma3DS/issues/1300?email_source=notifications&email_token=AHE6CQNSAGU3UK2B62CBDADQP2ZU3A5CNFSM4IGXUVM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB45GOA#issuecomment-544854840,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHE6CQMCGJWMNIJ5WTF7QGTQP2ZU3ANCNFSM4IGXUVMQ
.

Private websites are a bad idea since no one knows when you might pull the plug or how much load it can handle. Google has lots of datacenters to ensure high availability under high load.

I think the default should be one of the NTP pools but with the option to change it.

@tomjschwanke I think that it should be "example.org" (it is a real site).
It does not have any meaningful content so it should not be blocked.
Also it is managed by IANA itself.

I'd also like to point out that if we assume the set/given DNS is correct (it should be or we couldn't connect to anything outside the local network at worst) we could just ask for a country to use and then ask the DNS for an IP so this static-IP thing is a non-issue for the most part?

And maybe try the gateway first. Some routers provide NTP services 🤔

usually not great though... it'd work as a fallback though.

On Tuesday, October 29, 2019, Tom Schwanke notifications@github.com wrote:

And maybe try the gateway first. Some routers provide NTP services 🤔

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/AuroraWright/Luma3DS/issues/1300?email_source=notifications&email_token=AHE6CQMMSYTPLZK2HHHGFTTQQ7IRHA5CNFSM4IGXUVM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECPLYLY#issuecomment-547273775,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHE6CQJFJXTO4BNJEIFBL5DQQ7IRHANCNFSM4IGXUVMQ
.

DNS resolution is not done because it takes too much code space (which is very limitedĂ .

Replaced it with the IP of time.windows.com (by default)

@TuxSH Could we please use services that respect privacy? Neither Google nor Microsoft do. Please consider using ntp.org.

I mean, this is better than nothing and isn't impeded in most countries,
plus why would they log who requests time? That's not usable for
advertising or profit-making, so...?

On Saturday, April 18, 2020, Erik Kunze notifications@github.com wrote:

Could we please use services that respect privacy? Neither Google nor
Microsoft do. Please reconsider using ntp.org.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/AuroraWright/Luma3DS/issues/1300#issuecomment-615678492,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHE6CQJDIMVGLQRS6IRLN6LRNFJOXANCNFSM4IGXUVMQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lyptt picture lyptt  Â·  4Comments

Azure-Agst picture Azure-Agst  Â·  3Comments

DartRuffian picture DartRuffian  Â·  3Comments

Masamune3210 picture Masamune3210  Â·  4Comments

c12345678901 picture c12345678901  Â·  3Comments