Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Apple's three domains only; Sort Checked Items Automatically

Yashwanth Kamireddie83922af6a49
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 9dfb8ec..7da6b3d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -121,10 +121,9 @@ body:
id: account
attributes:
label: Apple Account
- description: Accounts in mainland China and Managed Apple Accounts (from a school or workplace) aren't supported yet, so this tells us where to start.
+ description: Managed Apple Accounts (from a school or workplace) aren't supported yet, so this tells us where to start.
options:
- - "Personal, outside mainland China"
- - "Personal, in mainland China"
+ - "Personal"
- "Managed (school or workplace)"
- "Not sure"
diff --git a/.uiverify/app-keys.mjs b/.uiverify/app-keys.mjs
index 04d2292..3f444ae 100644
--- a/.uiverify/app-keys.mjs
+++ b/.uiverify/app-keys.mjs
@@ -47,7 +47,7 @@ for (const scheme of ["light", "dark"]) {
// ── What Skykeep talks to, from the network lock ──
const reach = page.getByRole("region", { name: "What Skykeep Talks To" }).or(page.locator(".settings-reach"));
const text = await reach.first().innerText();
- ok(/apple\.com/.test(text) && /icloud-content\.com/.test(text) && !/\.cn\b/.test(text) && /mainland China/.test(text), `${scheme}: Apple's domains are listed ${JSON.stringify(text.slice(0, 160))}`);
+ ok(/apple\.com/.test(text) && /icloud-content\.com/.test(text) && !/\.cn\b/.test(text) && !/China/.test(text), `${scheme}: Apple's domains are listed ${JSON.stringify(text.slice(0, 160))}`);
ok(text.includes("calendar.example.org"), `${scheme}: and each subscribed calendar's host`);
// ── First Day of Week ──
diff --git a/.uiverify/notes-move-checked.mjs b/.uiverify/notes-move-checked.mjs
index c63bcf8..c7635e6 100644
--- a/.uiverify/notes-move-checked.mjs
+++ b/.uiverify/notes-move-checked.mjs
@@ -1,4 +1,4 @@
-// Move Checked Items to the Bottom: off, a tick only ticks; on, a ticked item goes to the end
+// Sort Checked Items Automatically: off, a tick only ticks; on, a ticked item goes to the end
// of its own checklist and an unticked one back above the ticked — one edit, the text saved
// whole, nothing else in the note touched.
//
diff --git a/.uiverify/stub.mjs b/.uiverify/stub.mjs
index 8b3c9d8..8091c6c 100644
--- a/.uiverify/stub.mjs
+++ b/.uiverify/stub.mjs
@@ -1010,7 +1010,7 @@ export function installStub({ screen, services, twoFactor, calendarFixture, note
case "system_contrast": return window.__contrast ?? false;
// LC_TIME, LANG (appearance.rs): null leaves the engine's own language.
case "system_time_locale": return window.__timeLocale ?? null;
- case "network_reach": return { apple: ["apple.com", "icloud.com", "icloud-content.com", "apple.com.cn", "icloud.com.cn", "icloud-content.com.cn"], subscribed: window.__reachSubscribed ?? [] };
+ case "network_reach": return { apple: ["apple.com", "icloud.com", "icloud-content.com"], subscribed: window.__reachSubscribed ?? [] };
case "outbox_resend": case "outbox_discard": {
(window.__outboxCalls ??= []).push([cmd, args.id]);
if (window.__outbox) window.__outbox = { ...window.__outbox, refused: window.__outbox.refused.filter((r) => r.id !== args.id) };
diff --git a/SECURITY.md b/SECURITY.md
index bd4279e..12b2882 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -14,14 +14,12 @@ Apple, and to calendars you subscribe to — nothing else:
- `*.icloud.com` service addresses Apple gives the session (CloudKit, Contacts, Calendar,
iCloud Drive, Photos), `gateway.icloud.com` and `cvws.icloud-content.com` (downloads).
- `calendars.icloud.com` — Apple's public holiday calendars.
-- The `.com.cn` equivalents of the above are on the allow-list too, kept for accounts in
- mainland China. Signing in with one isn't supported yet, so today they go unused.
- The host of each calendar you subscribe to by address (Calendar ▸ + ▸ New Subscription…),
and only once you have: a `webcal://` or `https://` address of a public calendar file.
This is enforced, not only promised: every network client Skykeep makes is built by
`quince_auth::apple_only()`, whose resolver refuses to look up any host outside `apple.com`,
-`icloud.com` and `icloud-content.com` (and their `.com.cn` twins) — a request anywhere else
+`icloud.com` and `icloud-content.com` — a request anywhere else
fails before a connection exists. A URL that names an address instead of a host
(`https://1.2.3.4/`) is never looked up, so each request's URL is checked too, a redirect's
included: anything that is not Apple's by name (or this computer, `127.0.0.1`) is refused the
diff --git a/crates/quince-auth/src/lib.rs b/crates/quince-auth/src/lib.rs
index 89df23d..5d95394 100644
--- a/crates/quince-auth/src/lib.rs
+++ b/crates/quince-auth/src/lib.rs
@@ -36,8 +36,7 @@ use std::sync::Arc;
/// Base URLs for Apple's auth and setup services.
///
-/// Injectable so the sign-in flow can be exercised against a mock server, and so Apple's
-/// China domains are a constructor rather than a fork.
+/// Injectable so the sign-in flow can be exercised against a mock server.
#[derive(Clone, Debug)]
pub struct Endpoints {
/// Origin for the SRP sign-in calls.
@@ -62,16 +61,6 @@ impl Default for Endpoints {
}
impl Endpoints {
- /// Accounts hosted in mainland China.
- pub fn china() -> Self {
- Self {
- auth_root: "https://idmsa.apple.com.cn".into(),
- auth: "https://idmsa.apple.com.cn/appleauth/auth".into(),
- setup: "https://setup.icloud.com.cn/setup/ws/1".into(),
- home: "https://www.icloud.com.cn".into(),
- }
- }
-
/// Point every service at one base URL. Test seam.
pub fn at(base: &str) -> Self {
let base = base.trim_end_matches('/');
@@ -1126,16 +1115,9 @@ impl Client {
}
/// The domains Apple's client can reach, each with every host under it: Apple's sign-in,
-/// iCloud's services and their files, push, and their China-mainland twins. What Settings
+/// iCloud's services and their files, and push. What Settings
/// lists as what Skykeep talks to, read from here so the list is the lock itself.
-pub const APPLE_DOMAINS: [&str; 6] = [
- "apple.com",
- "icloud.com",
- "icloud-content.com",
- "apple.com.cn",
- "icloud.com.cn",
- "icloud-content.com.cn",
-];
+pub const APPLE_DOMAINS: [&str; 3] = ["apple.com", "icloud.com", "icloud-content.com"];
/// Whether `host` is Apple's: under one of [`APPLE_DOMAINS`] — every host Skykeep has any
/// reason to reach. Loopback too, which is this computer.
diff --git a/crates/quince-auth/tests/apple_only.rs b/crates/quince-auth/tests/apple_only.rs
index f7f5f19..a295986 100644
--- a/crates/quince-auth/tests/apple_only.rs
+++ b/crates/quince-auth/tests/apple_only.rs
@@ -10,7 +10,6 @@ fn only_apples_hosts_count_as_apples() {
"p177-ckdatabasews.icloud.com",
"cvws.icloud-content.com",
"p34-webcourier.push.apple.com",
- "setup.icloud.com.cn",
"www.icloud.com.",
"localhost",
] {
@@ -23,6 +22,7 @@ fn only_apples_hosts_count_as_apples() {
"apple.com.evil.example",
"evilicloud.com",
"tile.openstreetmap.org",
+ "setup.icloud.com.cn",
] {
assert!(!is_apple_host(no), "{no}");
}
diff --git a/src/screens/SettingsView.tsx b/src/screens/SettingsView.tsx
index 92e808b..ac498a5 100644
--- a/src/screens/SettingsView.tsx
+++ b/src/screens/SettingsView.tsx
@@ -886,7 +886,7 @@ function ReachGroup() {
<code>{d}</code>
</span>
))}{" "}
- and their mainland China versions. Any other address is refused before a connection opens.
+ and every address under them. Any other address is refused before a connection opens.
</span>
</div>
<div className="settings-row is-stacked">
@@ -907,7 +907,7 @@ function ReachGroup() {
);
}
-/** Notes' Move Checked Items to the Bottom: on this computer, as each iPhone keeps its own. */
+/** Notes' Sort Checked Items, Automatically: on this computer, as each iPhone keeps its own. */
function MoveCheckedRow() {
const [on, setOn] = useState(() => {
try {
@@ -919,14 +919,14 @@ function MoveCheckedRow() {
return (
<div className="settings-row">
<span className="settings-label settings-stack">
- Move Checked Items to the Bottom
- <span className="settings-hint">In Notes checklists, ticked items sort below the rest</span>
+ Sort Checked Items Automatically
+ <span className="settings-hint">Ticked checklist items move below the rest</span>
</span>
<button
className="switch"
role="switch"
aria-checked={on}
- aria-label="Move Checked Items to the Bottom"
+ aria-label="Sort Checked Items Automatically"
onClick={() => {
const next = !on;
setOn(next);
diff --git a/src/screens/SignIn.tsx b/src/screens/SignIn.tsx
index f2f8866..7127678 100644
--- a/src/screens/SignIn.tsx
+++ b/src/screens/SignIn.tsx
@@ -166,8 +166,8 @@ export function SignIn({
open to a full sign-in with your two-factor code, the same one icloud.com uses.
</p>
<p>
- <strong>Personal Apple Accounts.</strong> Accounts in mainland China and Managed
- Apple Accounts from a school or workplace aren&rsquo;t supported yet.
+ <strong>Personal Apple Accounts.</strong> Managed Apple Accounts from a school or
+ workplace aren&rsquo;t supported yet.
</p>
<p>
<strong>Your iCloud, right here.</strong> Your calendar, reminders, notes, contacts
diff --git a/src/screens/notes/NoteEditor.tsx b/src/screens/notes/NoteEditor.tsx
index f7db9ed..a69ddd2 100644
--- a/src/screens/notes/NoteEditor.tsx
+++ b/src/screens/notes/NoteEditor.tsx
@@ -850,7 +850,7 @@ export const NoteEditor = forwardRef<EditorHandle, Props>(function NoteEditor(
event.preventDefault();
const checked = !node.attrs.checked;
const tr = vw.state.tr.setNodeMarkup(pos, undefined, { ...node.attrs, checked });
- // With "Move Checked Items to the Bottom" on, the item goes where Notes sorts it, in
+ // With "Sort Checked Items Automatically" on, the item goes where Notes sorts it, in
// the same edit, so one undo puts both back.
if (moveCheckedOn()) {
const starts: number[] = [];
diff --git a/src/screens/notes/model.ts b/src/screens/notes/model.ts
index d6175a0..3ce5412 100644
--- a/src/screens/notes/model.ts
+++ b/src/screens/notes/model.ts
@@ -11,7 +11,7 @@ const daysBetween = (from: Date, to: Date) =>
/** One run of the note list under a heading. */
export type Section = { key: string; heading: string; notes: Note[] };
-/** Settings ▸ Move Checked Items to the Bottom: off unless turned on, kept on this computer. */
+/** Settings ▸ Sort Checked Items Automatically: off unless turned on, kept on this computer. */
export const MOVE_CHECKED_KEY = "notes.moveChecked";
/** How the list is ordered, as Notes' View menu offers it. */
diff --git a/src/screens/notes/rich.ts b/src/screens/notes/rich.ts
index ac8612c..894395a 100644
--- a/src/screens/notes/rich.ts
+++ b/src/screens/notes/rich.ts
@@ -341,8 +341,8 @@ export function sameFormatting(text: string, a: Run[] | null, b: Run[] | null):
}
/**
- * Where a checklist item goes when it is ticked or unticked with "Move Checked Items to the
- * Bottom" on, as Notes sorts them: ticked, the item — with the items nested under it — goes
+ * Where a checklist item goes when it is ticked or unticked with "Sort Checked Items
+ * Automatically" on, as Notes sorts them: ticked, the item — with the items nested under it — goes
* to the end of its own checklist; unticked, back up to just above the ticked items. Only
* within the run of checklist lines it sits in, and only for a top-level item (a nested one
* moves with its parent). `index` is the item's place among the document's lines; `checked`