Skip to content

armgit / soju

Public Imported from GitHub
0

Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.

Sign in with Google (Apple ready on the server side) to find and install games bought with that email (1.10.6)

mikey92dba3154fa324
diff --git a/README.ko.md b/README.ko.md
index 31a10e044a0..14b8a32358c 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -83,7 +83,7 @@ soju install # 이후: soju battlenet / soju d2r / soju steam / soju epic /
설치기는 **다운로드 전에 원하는 런처부터 선택**합니다. Steam만 선택하면 CX 엔진과 애플 GPTK를 받지 않습니다. Steam 그래픽 구성요소는 SHA-256으로 검증한 뒤 Soju 전용 Wine 11.0 환경에 자동으로 설치합니다. Battle.net·Epic·GOG는 공통 CX 엔진과 사용자가 별도로 받은 애플 GPTK를 사용합니다. 각 런처의 보틀·로그인·게임은 독립적으로 유지합니다.
-[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
+[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
## 일상 명령
diff --git a/README.md b/README.md
index 7f2d7c865bb..8dbd2e06265 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ CodeWeavers' published sources; Steam uses a separate private Wine 11 setup.
Apple's proprietary GPTK/D3DMetal is downloaded separately. Games and store
clients are not included.
-**Current release: [v1.10.5](https://github.com/BCD1210/soju/releases/tag/v1.10.5).**
+**Current release: [v1.10.6](https://github.com/BCD1210/soju/releases/tag/v1.10.6).**
The compatibility examples below were verified on M4 Pro / macOS 26.5.
D2R and Hogwarts Legacy are examples of supported games, not the scope of the project.
@@ -104,7 +104,7 @@ soju install # then: soju battlenet / soju d2r / soju steam / soju epic / so
The installer asks which launchers you want **before downloading anything**. Steam-only installs skip the CX engine and Apple GPTK. Steam rendering components are downloaded with SHA-256 verification and installed in a Soju-owned Wine 11.0 runtime. Battle.net, Epic and GOG use the shared CX engine and your separately downloaded Apple GPTK. Each official client keeps its own bottle and shortcut in `~/Applications`.
-[Download Soju for Mac](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip): the native desktop preview includes installed and owned games, store search, favorites, game launching and platform management. See [desktop setup and requirements](docs/DESKTOP.md).
+[Download Soju for Mac](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip): the native desktop preview includes installed and owned games, store search, favorites, game launching and platform management. See [desktop setup and requirements](docs/DESKTOP.md).
## Everyday commands
diff --git a/README.zh.md b/README.zh.md
index 45df70e7ee6..37eac5cfb9b 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -87,7 +87,7 @@ soju install # 然后:soju battlenet / soju d2r / soju steam / soju epic /
安装器会**先询问要安装哪些启动器,再下载对应组件**。仅选择 Steam 时,不会下载 CX 引擎或 Apple GPTK。Steam 图形组件经过 SHA-256 校验后,自动安装到 Soju 专用的 Wine 11.0 环境中。战网、Epic 和 GOG 使用共享 CX 引擎及用户单独下载的 Apple GPTK。各客户端的 bottle、账户和游戏分别保留。
-[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
+[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
## 日常维护
diff --git a/VERSION b/VERSION
index db77e0ee976..7b4d9a4ff9b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.10.5
+1.10.6
diff --git a/app/Store.swift b/app/Store.swift
index dd576132c72..2ad34853a85 100644
--- a/app/Store.swift
+++ b/app/Store.swift
@@ -80,6 +80,7 @@ struct StoreView: View {
@EnvironmentObject var model: SojuModel
@StateObject private var store = StoreModel()
@StateObject private var purchase = PurchaseWatcher()
+ @StateObject private var account = AccountModel()
@State private var keyFor: StoreGame?
@State private var key = ""
private let accent = Color(red: 0.79, green: 0.36, blue: 0.27)
@@ -91,6 +92,7 @@ struct StoreView: View {
Text("Games we make at Didim Labs. Mac builds for M1 and later, no Wine needed.")
.font(.callout).foregroundStyle(.secondary)
}
+ accountBar
if model.busy || !model.activity.isEmpty && model.activity != "Ready." {
HStack(spacing: 8) {
if model.busy { ProgressView().controlSize(.small) }
@@ -126,7 +128,7 @@ struct StoreView: View {
.font(.system(size: 11)).foregroundStyle(.secondary)
}
.padding(28).frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
- .onAppear { store.load(root: model.root) }
+ .onAppear { store.load(root: model.root); account.loadProviders() }
.sheet(item: $keyFor) { game in keySheet(game) }
}
@@ -159,6 +161,10 @@ struct StoreView: View {
if let game = installed(game) {
Button { model.play(game) } label: { Label("Play", systemImage: "play.fill") }
.buttonStyle(.borderedProminent).tint(.green).disabled(model.launchingGames.contains(game.id))
+ } else if account.owned.contains(game.id) {
+ Button { model.run(["didim", "activate", game.id], title: "Installing " + game.title + "…") } label: {
+ Label("Install", systemImage: "arrow.down.circle.fill")
+ }.buttonStyle(.borderedProminent).tint(.green).disabled(model.busy)
} else {
Button { buy(game) } label: {
Label("Buy · " + game.price, systemImage: "cart")
@@ -191,8 +197,35 @@ struct StoreView: View {
}.padding(18).background(Color.primary.opacity(0.04), in: RoundedRectangle(cornerRadius: 16))
}
+ private var accountBar: some View {
+ HStack(spacing: 10) {
+ if account.signingIn != nil {
+ ProgressView().controlSize(.small)
+ Text("Finish signing in in your browser.").font(.system(size: 12))
+ Button("Cancel") { account.cancel() }
+ } else if !account.email.isEmpty {
+ Image(systemName: "person.crop.circle.fill").foregroundStyle(.secondary)
+ Text("Signed in as " + account.email).font(.system(size: 12))
+ Button("Sign out") { account.signOut() }
+ } else if !account.providers.isEmpty {
+ Text("Bought a game already?").font(.system(size: 12)).foregroundStyle(.secondary)
+ if account.providers.contains("apple") {
+ Button { account.signIn("apple") } label: { Label("Sign in with Apple", systemImage: "apple.logo") }
+ }
+ if account.providers.contains("google") {
+ Button { account.signIn("google") } label: { Label("Sign in with Google", systemImage: "g.circle") }
+ }
+ }
+ if !account.message.isEmpty && account.signingIn == nil {
+ Text(account.message).font(.system(size: 11)).foregroundStyle(.secondary).lineLimit(2)
+ }
+ Spacer()
+ }
+ }
+
private func buy(_ game: StoreGame) {
purchase.start(game, fallback: StoreCatalog.safe(game.checkout, hosts: ["buy.polar.sh", "polar.sh"])) { id, title, key in
+ account.markOwned(id)
install(id: id, title: title, key: key)
}
}
@@ -300,3 +333,105 @@ struct StoreView: View {
}.resume()
}
}
+
+/// Sign in with Apple or Google (through didimlabs.com) to find games bought with that email.
+/// The keys go straight into the Keychain; Soju remembers only the email and which games are owned.
+@MainActor final class AccountModel: ObservableObject {
+ @Published var email = UserDefaults.standard.string(forKey: "didimAccountEmail") ?? ""
+ @Published var owned = Set(UserDefaults.standard.stringArray(forKey: "didimOwned") ?? [])
+ @Published var providers: [String] = []
+ @Published var signingIn: String?
+ @Published var message = ""
+ private var timer: Timer?
+ private var state = ""
+ private var started = Date()
+ private static let site = "https://didimlabs.com"
+ static let keychainService = "Soju Didim Labs license"
+
+ func loadProviders() {
+ var request = URLRequest(url: URL(string: Self.site + "/auth/providers")!)
+ request.cachePolicy = .reloadIgnoringLocalCacheData
+ request.timeoutInterval = 15
+ URLSession.shared.dataTask(with: request) { data, _, _ in
+ let list = (data.flatMap { try? JSONSerialization.jsonObject(with: $0) as? [String: Any] }?["providers"] as? [String]) ?? []
+ DispatchQueue.main.async { self.providers = list.filter { ["apple", "google"].contains($0) } }
+ }.resume()
+ }
+
+ func signIn(_ provider: String) {
+ var bytes = [UInt8](repeating: 0, count: 32)
+ guard SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes) == errSecSuccess else { return }
+ state = Data(bytes).base64EncodedString().replacingOccurrences(of: "+", with: "-")
+ .replacingOccurrences(of: "/", with: "_").replacingOccurrences(of: "=", with: "")
+ var parts = URLComponents(string: Self.site + "/auth/start")!
+ parts.queryItems = [URLQueryItem(name: "provider", value: provider), URLQueryItem(name: "state", value: state)]
+ guard let url = parts.url else { return }
+ signingIn = provider; message = ""; started = Date()
+ NSWorkspace.shared.open(url)
+ timer?.invalidate()
+ timer = Timer.scheduledTimer(withTimeInterval: 2, repeats: true) { [weak self] _ in
+ DispatchQueue.main.async { self?.poll() }
+ }
+ }
+
+ func cancel() { timer?.invalidate(); timer = nil; signingIn = nil }
+
+ func signOut() {
+ cancel()
+ email = ""; owned = []; message = "Signed out. Installed games stay installed."
+ UserDefaults.standard.removeObject(forKey: "didimAccountEmail")
+ UserDefaults.standard.removeObject(forKey: "didimOwned")
+ }
+
+ /// A game bought in this Soju counts as owned even without signing in.
+ func markOwned(_ game: String) {
+ owned.insert(game)
+ UserDefaults.standard.set(Array(owned), forKey: "didimOwned")
+ }
+
+ private func poll() {
+ guard signingIn != nil else { return }
+ if Date().timeIntervalSince(started) > 10 * 60 { cancel(); message = "Sign-in timed out. Try again."; return }
+ let current = state
+ var request = URLRequest(url: URL(string: Self.site + "/auth/poll/" + current)!)
+ request.cachePolicy = .reloadIgnoringLocalCacheData
+ request.timeoutInterval = 15
+ URLSession.shared.dataTask(with: request) { data, _, _ in
+ let body = data.flatMap { try? JSONSerialization.jsonObject(with: $0) as? [String: Any] }
+ DispatchQueue.main.async {
+ guard self.state == current, let status = body?["status"] as? String else { return }
+ switch status {
+ case "done": self.cancel(); self.finish(body ?? [:])
+ case "failed": self.cancel(); self.message = (body?["error"] as? String) ?? "Sign-in didn't work."
+ case "expired": self.cancel(); self.message = "Sign-in expired. Try again."
+ default: break
+ }
+ }
+ }.resume()
+ }
+
+ private func finish(_ body: [String: Any]) {
+ let address = (body["email"] as? String) ?? ""
+ var found: [String] = []
+ for item in (body["owned"] as? [[String: Any]]) ?? [] {
+ guard let game = item["game"] as? String, let key = item["key"] as? String,
+ game.range(of: "^[a-z0-9][a-z0-9-]{0,63}$", options: .regularExpression) != nil,
+ key.range(of: "^[A-Za-z0-9-]{8,100}$", options: .regularExpression) != nil else { continue }
+ let save = Process()
+ save.executableURL = URL(fileURLWithPath: "/usr/bin/security")
+ save.arguments = ["add-generic-password", "-U", "-s", Self.keychainService, "-a", game, "-l", "Soju: " + game, "-w", key]
+ if (try? save.run()) != nil { save.waitUntilExit(); if save.terminationStatus == 0 { found.append(game) } }
+ }
+ email = address
+ owned.formUnion(found)
+ UserDefaults.standard.set(address, forKey: "didimAccountEmail")
+ UserDefaults.standard.set(Array(owned), forKey: "didimOwned")
+ if found.isEmpty {
+ message = (body["private"] as? Bool) == true
+ ? "No purchases for this Apple relay address. If you bought with your real email, use Google or your license key."
+ : "No purchases found for " + address + ". If you used another email, sign in with that one or use your key."
+ } else {
+ message = "Found " + String(found.count) + (found.count == 1 ? " game" : " games") + " for " + address + "."
+ }
+ }
+}
diff --git a/docs/DESKTOP.md b/docs/DESKTOP.md
index 7c45cc5c1dc..2bf90ae5d3d 100644
--- a/docs/DESKTOP.md
+++ b/docs/DESKTOP.md
@@ -1,6 +1,6 @@
# Soju for Mac
-[Download v1.10.5](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip)
+[Download v1.10.6](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip)
1. Unzip and move **Soju.app** into Applications or ~/Applications.
2. Open **Platforms** to install or open Battle.net, Steam, Epic Games or GOG GALAXY.
diff --git a/docs/index.html b/docs/index.html
index c6c5ae2e159..91f2d451e08 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -54,8 +54,8 @@
"@id": "https://didimlabs.com/#soju",
"name": "Soju",
"url": "https://didimlabs.com/",
- "downloadUrl": "https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip",
- "softwareVersion": "1.10.5",
+ "downloadUrl": "https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip",
+ "softwareVersion": "1.10.6",
"description": "Free, open-source Mac app that installs the official Windows launchers for Steam, Battle.net, Epic Games, GOG GALAXY and Xbox PC on Apple Silicon and shows every installed game in one library.",
"applicationCategory": "GameApplication",
"operatingSystem": "macOS 14 or later, Apple Silicon (M1 or newer)",
@@ -146,7 +146,7 @@
<a href="ko/" lang="ko" hreflang="ko">한국어</a>
</div></nav>
<main id="main">
-<link rel="preload" as="image" href="assets/soju-logo.png?v=20261109c"/><link rel="preload" as="image" href="assets/soju-library.png?v=20261109c" fetchPriority="high"/><header class="hero"><h1 class="with-logo"><img src="assets/soju-logo.png?v=20261109c" width="72" height="72" alt=""/>Soju</h1><p class="lead">A free Mac app for playing Windows games on Apple Silicon. It installs the real Steam, Battle.net, Epic, GOG GALAXY and Xbox PC launchers, keeps each in its own Wine setup, and lists every installed game in one library.</p><p class="actions"><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip">Download Soju 1.10.5</a><span class="meta">macOS 14+, M1 or newer · open source (GPL-3.0)</span></p><img src="assets/soju-library.png?v=20261109c" alt="Soju 1.10 library with Diablo II: Resurrected, Don&#x27;t Sell the Cat, Guilt Free, Hogwarts Legacy and other installed games" width="1140" height="780" class="shot" fetchPriority="high"/></header><section id="what" aria-labelledby="what-title"><h2 id="what-title">What it does</h2><div class="features"><div class="feature"><h3>Real launchers</h3><p>Battle.net, Epic and GOG share a Wine engine built from <a href="https://www.codeweavers.com/crossover/source">CodeWeavers&#x27; sources</a> with Apple&#x27;s D3DMetal. Steam gets its own Wine 11 setup with DXMT for D3D11 games.</p></div><div class="feature"><h3>One library</h3><p>Finds installed games across every launcher and imports the games you own on Steam and GOG.</p></div><div class="feature"><h3>Store search</h3><p>Searches Steam, GOG and Microsoft Store listings with prices for your region.</p></div><div class="feature"><h3>Xbox PC</h3><p>Experimental: imports owned and Game Pass games and downloads them through the <a href="https://github.com/xodus-gaming/xodus">Xodus</a> backend.</p></div></div><p>Logins, purchases and game updates stay with each store. Soju doesn&#x27;t bundle games, store clients or Apple&#x27;s Game Porting Toolkit.</p></section><section id="works" aria-labelledby="works-title"><h2 id="works-title">Games we&#x27;ve run</h2><p class="intro">Tested on an M4 Pro Mac with macOS 26.5. Other games may or may not work; please <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">report what you try</a>.</p><div class="table-scroll" role="region" aria-label="Tested games" tabindex="0"><table><thead><tr><th scope="col">Game</th><th scope="col">Store</th><th scope="col">Result</th></tr></thead><tbody><tr><th scope="row">Diablo II: Resurrected</th><td>Battle.net</td><td>Plays online. Needs macOS 26.4+. <a href="guides/diablo-2-resurrected-apple-silicon.html">Guide</a></td></tr><tr><th scope="row">Hogwarts Legacy</th><td>Epic</td><td>Installs and plays with D3DMetal.</td></tr><tr><th scope="row">Guilt Free (Unity, D3D11)</th><td>Steam</td><td>Plays with the DXMT setup. <a href="guides/steam-windows-client-apple-silicon.html">Guide</a></td></tr><tr><th scope="row">Retro Classics</th><td>Xbox PC</td><td>Reaches the main menu.</td></tr><tr><th scope="row">GOG GALAXY</th><td>GOG</td><td>Login and library work; few games tried yet.</td></tr></tbody></table></div><p>Games with kernel-level anti-cheat won&#x27;t run. The Steam edition of Diablo II: Resurrected hasn&#x27;t been checked.</p><figure class="video"><video controls="" playsInline="" preload="none" poster="assets/soju-gameplay-demo-poster.jpg?v=20261109c" aria-label="30-second clip of Hogwarts Legacy and Guilt Free running through Soju" width="1280" height="720"><source src="assets/soju-gameplay-demo.mp4?v=20261109c" type="video/mp4"/><track kind="captions" src="assets/soju-gameplay-demo.vtt" srcLang="en" label="English" default=""/></video><figcaption>Hogwarts Legacy through Epic, Guilt Free through Steam. 30 seconds.</figcaption></figure></section><section id="store" aria-labelledby="store-title"><h2 id="store-title">Games from Didim Labs</h2><a class="game" href="games/dont-sell-the-cat.html"><img src="store/dont-sell-the-cat-wide.jpg" alt="Don&#x27;t Sell the Cat: a black cat with yellow eyes on a pawnshop counter" width="920" height="430" loading="lazy"/><span class="game-body"><b>Don&#x27;t Sell the Cat</b><span class="game-meta">$6.99 · Mac and Windows · about 2 hours</span><span>Seven nights at a 1958 pawnshop counter. Check items with a loupe, UV lamp, scale and the shop cat, and don&#x27;t open the back shutter.</span></span></a></section><section id="install" aria-labelledby="install-title"><h2 id="install-title">Install</h2><ol class="steps"><li><b>Download the app</b><p><a href="https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip">Soju-1.10.5-macos-arm64.zip</a>. Unzip it and move Soju to Applications. <a href="https://github.com/BCD1210/soju/blob/main/docs/DESKTOP.md">Signing notes</a>.</p></li><li><b>Pick launchers</b><p>Open Soju, go to Platforms and choose the launchers you use. Battle.net, Epic and GOG also need <a href="https://developer.apple.com/games/game-porting-toolkit/">Apple&#x27;s Game Porting Toolkit</a>, which you download with your Apple ID.</p></li><li><b>Sign in and play</b><p>Sign in inside each launcher as usual. Installed games show up in the library.</p></li></ol><p>Prefer the terminal? Run the installer, or use Homebrew. You&#x27;ll need Rosetta 2, the Xcode Command Line Tools and Homebrew.</p><pre><code>curl -fsSL https://didimlabs.com/install.sh | bash
+<link rel="preload" as="image" href="assets/soju-logo.png?v=20261109c"/><link rel="preload" as="image" href="assets/soju-library.png?v=20261109c" fetchPriority="high"/><header class="hero"><h1 class="with-logo"><img src="assets/soju-logo.png?v=20261109c" width="72" height="72" alt=""/>Soju</h1><p class="lead">A free Mac app for playing Windows games on Apple Silicon. It installs the real Steam, Battle.net, Epic, GOG GALAXY and Xbox PC launchers, keeps each in its own Wine setup, and lists every installed game in one library.</p><p class="actions"><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip">Download Soju 1.10.6</a><span class="meta">macOS 14+, M1 or newer · open source (GPL-3.0)</span></p><img src="assets/soju-library.png?v=20261109c" alt="Soju 1.10 library with Diablo II: Resurrected, Don&#x27;t Sell the Cat, Guilt Free, Hogwarts Legacy and other installed games" width="1140" height="780" class="shot" fetchPriority="high"/></header><section id="what" aria-labelledby="what-title"><h2 id="what-title">What it does</h2><div class="features"><div class="feature"><h3>Real launchers</h3><p>Battle.net, Epic and GOG share a Wine engine built from <a href="https://www.codeweavers.com/crossover/source">CodeWeavers&#x27; sources</a> with Apple&#x27;s D3DMetal. Steam gets its own Wine 11 setup with DXMT for D3D11 games.</p></div><div class="feature"><h3>One library</h3><p>Finds installed games across every launcher and imports the games you own on Steam and GOG.</p></div><div class="feature"><h3>Store search</h3><p>Searches Steam, GOG and Microsoft Store listings with prices for your region.</p></div><div class="feature"><h3>Xbox PC</h3><p>Experimental: imports owned and Game Pass games and downloads them through the <a href="https://github.com/xodus-gaming/xodus">Xodus</a> backend.</p></div></div><p>Logins, purchases and game updates stay with each store. Soju doesn&#x27;t bundle games, store clients or Apple&#x27;s Game Porting Toolkit.</p></section><section id="works" aria-labelledby="works-title"><h2 id="works-title">Games we&#x27;ve run</h2><p class="intro">Tested on an M4 Pro Mac with macOS 26.5. Other games may or may not work; please <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">report what you try</a>.</p><div class="table-scroll" role="region" aria-label="Tested games" tabindex="0"><table><thead><tr><th scope="col">Game</th><th scope="col">Store</th><th scope="col">Result</th></tr></thead><tbody><tr><th scope="row">Diablo II: Resurrected</th><td>Battle.net</td><td>Plays online. Needs macOS 26.4+. <a href="guides/diablo-2-resurrected-apple-silicon.html">Guide</a></td></tr><tr><th scope="row">Hogwarts Legacy</th><td>Epic</td><td>Installs and plays with D3DMetal.</td></tr><tr><th scope="row">Guilt Free (Unity, D3D11)</th><td>Steam</td><td>Plays with the DXMT setup. <a href="guides/steam-windows-client-apple-silicon.html">Guide</a></td></tr><tr><th scope="row">Retro Classics</th><td>Xbox PC</td><td>Reaches the main menu.</td></tr><tr><th scope="row">GOG GALAXY</th><td>GOG</td><td>Login and library work; few games tried yet.</td></tr></tbody></table></div><p>Games with kernel-level anti-cheat won&#x27;t run. The Steam edition of Diablo II: Resurrected hasn&#x27;t been checked.</p><figure class="video"><video controls="" playsInline="" preload="none" poster="assets/soju-gameplay-demo-poster.jpg?v=20261109c" aria-label="30-second clip of Hogwarts Legacy and Guilt Free running through Soju" width="1280" height="720"><source src="assets/soju-gameplay-demo.mp4?v=20261109c" type="video/mp4"/><track kind="captions" src="assets/soju-gameplay-demo.vtt" srcLang="en" label="English" default=""/></video><figcaption>Hogwarts Legacy through Epic, Guilt Free through Steam. 30 seconds.</figcaption></figure></section><section id="store" aria-labelledby="store-title"><h2 id="store-title">Games from Didim Labs</h2><a class="game" href="games/dont-sell-the-cat.html"><img src="store/dont-sell-the-cat-wide.jpg" alt="Don&#x27;t Sell the Cat: a black cat with yellow eyes on a pawnshop counter" width="920" height="430" loading="lazy"/><span class="game-body"><b>Don&#x27;t Sell the Cat</b><span class="game-meta">$6.99 · Mac and Windows · about 2 hours</span><span>Seven nights at a 1958 pawnshop counter. Check items with a loupe, UV lamp, scale and the shop cat, and don&#x27;t open the back shutter.</span></span></a></section><section id="install" aria-labelledby="install-title"><h2 id="install-title">Install</h2><ol class="steps"><li><b>Download the app</b><p><a href="https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip">Soju-1.10.6-macos-arm64.zip</a>. Unzip it and move Soju to Applications. <a href="https://github.com/BCD1210/soju/blob/main/docs/DESKTOP.md">Signing notes</a>.</p></li><li><b>Pick launchers</b><p>Open Soju, go to Platforms and choose the launchers you use. Battle.net, Epic and GOG also need <a href="https://developer.apple.com/games/game-porting-toolkit/">Apple&#x27;s Game Porting Toolkit</a>, which you download with your Apple ID.</p></li><li><b>Sign in and play</b><p>Sign in inside each launcher as usual. Installed games show up in the library.</p></li></ol><p>Prefer the terminal? Run the installer, or use Homebrew. You&#x27;ll need Rosetta 2, the Xcode Command Line Tools and Homebrew.</p><pre><code>curl -fsSL https://didimlabs.com/install.sh | bash
# or
brew install BCD1210/soju/soju
diff --git a/docs/ko/index.html b/docs/ko/index.html
index b5ad10a734d..9b17d666507 100644
--- a/docs/ko/index.html
+++ b/docs/ko/index.html
@@ -88,7 +88,7 @@
<a href="../" lang="en" hreflang="en">English</a>
</div></nav>
<main id="main">
-<link rel="preload" as="image" href="../assets/soju-logo.png?v=20261109c"/><link rel="preload" as="image" href="../assets/soju-library.png?v=20261109c" fetchPriority="high"/><header class="hero"><h1 class="with-logo"><img src="../assets/soju-logo.png?v=20261109c" width="72" height="72" alt=""/>소주 (Soju)</h1><p class="lead">애플 실리콘 맥에서 윈도우 게임을 하기 위한 무료 맥 앱입니다. 진짜 스팀, 배틀넷, 에픽, GOG GALAXY, Xbox PC 런처를 각각 따로 된 Wine 환경에 설치하고, 설치된 게임을 한 라이브러리에 모아 보여 줍니다.</p><p class="actions"><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip">소주 1.10.5 다운로드</a><span class="meta">macOS 14 이상, M1 이상 · 오픈소스(GPL-3.0)</span></p><img src="../assets/soju-library.png?v=20261109c" alt="디아블로 II: 레저렉션, 고양이는 팔지 마세요, Guilt Free, 호그와트 레거시가 있는 소주 1.10 라이브러리" width="1140" height="780" class="shot" fetchPriority="high"/></header><section id="what" aria-labelledby="what-title"><h2 id="what-title">하는 일</h2><div class="features"><div class="feature"><h3>진짜 런처</h3><p>배틀넷·에픽·GOG는 <a href="https://www.codeweavers.com/crossover/source">CodeWeavers 소스</a>로 만든 Wine 엔진과 애플 D3DMetal을 같이 씁니다. 스팀은 D3D11 게임용 DXMT가 들어간 Wine 11 환경을 따로 씁니다.</p></div><div class="feature"><h3>라이브러리 하나</h3><p>모든 런처에 설치된 게임을 찾고, 스팀과 GOG에서 산 게임 목록을 가져옵니다.</p></div><div class="feature"><h3>스토어 검색</h3><p>스팀, GOG, 마이크로소프트 스토어를 지역 가격으로 검색합니다.</p></div><div class="feature"><h3>Xbox PC</h3><p>실험 기능입니다. 보유 게임과 게임 패스 게임을 가져와 Xodus 백엔드로 내려받습니다.</p></div></div><p>로그인, 구매, 게임 업데이트는 각 스토어가 그대로 맡습니다. 소주는 게임, 스토어 프로그램, 애플 게임 포팅 툴킷을 포함하지 않습니다.</p></section><section id="works" aria-labelledby="works-title"><h2 id="works-title">직접 실행해 본 게임</h2><p class="intro">M4 Pro 맥, macOS 26.5에서 확인했습니다. 다른 게임은 해 보기 전에는 모릅니다. <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">결과를 알려 주세요</a>.</p><div class="table-scroll" role="region" aria-label="실행한 게임" tabindex="0"><table><thead><tr><th scope="col">게임</th><th scope="col">스토어</th><th scope="col">결과</th></tr></thead><tbody><tr><th scope="row">디아블로 II: 레저렉션</th><td>배틀넷</td><td>온라인 플레이 됨. macOS 26.4 이상. <a href="../guides/ko/diablo-2-mac.html">가이드</a></td></tr><tr><th scope="row">호그와트 레거시</th><td>에픽</td><td>D3DMetal로 설치·플레이 됨</td></tr><tr><th scope="row">Guilt Free (Unity, D3D11)</th><td>스팀</td><td>DXMT 설정으로 플레이 됨</td></tr><tr><th scope="row">Retro Classics</th><td>Xbox PC</td><td>메인 화면까지 실행</td></tr><tr><th scope="row">GOG GALAXY</th><td>GOG</td><td>로그인·라이브러리 됨, 게임은 아직 조금만 시험</td></tr></tbody></table></div><p>커널 안티치트를 쓰는 게임은 실행되지 않습니다.</p></section><section id="store" aria-labelledby="store-title"><h2 id="store-title">Didim Labs 게임</h2><a class="game" href="../games/dont-sell-the-cat.html#ko"><img src="../store/dont-sell-the-cat-wide.jpg" alt="고양이는 팔지 마세요: 전당포 카운터 위의 노란 눈 검은 고양이" width="920" height="430" loading="lazy"/><span class="game-body"><b>고양이는 팔지 마세요</b><span class="game-meta">$6.99 · 맥·윈도우 · 약 2시간</span><span>1958년 전당포 야간 카운터에서 보내는 일곱 밤. 확대경, UV 램프, 저울, 가게 고양이로 물건을 확인하고, 뒷문 셔터는 열지 마세요.</span></span></a></section><section id="install" aria-labelledby="install-title"><h2 id="install-title">설치</h2><ol class="steps"><li><b>앱 받기</b><p><a href="https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip">Soju-1.10.5-macos-arm64.zip</a>을 받아 압축을 풀고 응용 프로그램 폴더로 옮깁니다.</p></li><li><b>런처 고르기</b><p>소주를 열고 Platforms에서 쓰는 런처를 고릅니다. 배틀넷·에픽·GOG는 애플 ID로 직접 받은 <a href="https://developer.apple.com/games/game-porting-toolkit/">게임 포팅 툴킷</a>도 필요합니다.</p></li><li><b>로그인하고 플레이</b><p>각 런처에서 평소처럼 로그인하면 설치된 게임이 라이브러리에 나타납니다.</p></li></ol><p>터미널이 편하면 설치 스크립트나 Homebrew를 쓰세요. Rosetta 2, Xcode Command Line Tools, Homebrew가 필요합니다.</p><pre><code>curl -fsSL https://didimlabs.com/install.sh | bash
+<link rel="preload" as="image" href="../assets/soju-logo.png?v=20261109c"/><link rel="preload" as="image" href="../assets/soju-library.png?v=20261109c" fetchPriority="high"/><header class="hero"><h1 class="with-logo"><img src="../assets/soju-logo.png?v=20261109c" width="72" height="72" alt=""/>소주 (Soju)</h1><p class="lead">애플 실리콘 맥에서 윈도우 게임을 하기 위한 무료 맥 앱입니다. 진짜 스팀, 배틀넷, 에픽, GOG GALAXY, Xbox PC 런처를 각각 따로 된 Wine 환경에 설치하고, 설치된 게임을 한 라이브러리에 모아 보여 줍니다.</p><p class="actions"><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip">소주 1.10.6 다운로드</a><span class="meta">macOS 14 이상, M1 이상 · 오픈소스(GPL-3.0)</span></p><img src="../assets/soju-library.png?v=20261109c" alt="디아블로 II: 레저렉션, 고양이는 팔지 마세요, Guilt Free, 호그와트 레거시가 있는 소주 1.10 라이브러리" width="1140" height="780" class="shot" fetchPriority="high"/></header><section id="what" aria-labelledby="what-title"><h2 id="what-title">하는 일</h2><div class="features"><div class="feature"><h3>진짜 런처</h3><p>배틀넷·에픽·GOG는 <a href="https://www.codeweavers.com/crossover/source">CodeWeavers 소스</a>로 만든 Wine 엔진과 애플 D3DMetal을 같이 씁니다. 스팀은 D3D11 게임용 DXMT가 들어간 Wine 11 환경을 따로 씁니다.</p></div><div class="feature"><h3>라이브러리 하나</h3><p>모든 런처에 설치된 게임을 찾고, 스팀과 GOG에서 산 게임 목록을 가져옵니다.</p></div><div class="feature"><h3>스토어 검색</h3><p>스팀, GOG, 마이크로소프트 스토어를 지역 가격으로 검색합니다.</p></div><div class="feature"><h3>Xbox PC</h3><p>실험 기능입니다. 보유 게임과 게임 패스 게임을 가져와 Xodus 백엔드로 내려받습니다.</p></div></div><p>로그인, 구매, 게임 업데이트는 각 스토어가 그대로 맡습니다. 소주는 게임, 스토어 프로그램, 애플 게임 포팅 툴킷을 포함하지 않습니다.</p></section><section id="works" aria-labelledby="works-title"><h2 id="works-title">직접 실행해 본 게임</h2><p class="intro">M4 Pro 맥, macOS 26.5에서 확인했습니다. 다른 게임은 해 보기 전에는 모릅니다. <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">결과를 알려 주세요</a>.</p><div class="table-scroll" role="region" aria-label="실행한 게임" tabindex="0"><table><thead><tr><th scope="col">게임</th><th scope="col">스토어</th><th scope="col">결과</th></tr></thead><tbody><tr><th scope="row">디아블로 II: 레저렉션</th><td>배틀넷</td><td>온라인 플레이 됨. macOS 26.4 이상. <a href="../guides/ko/diablo-2-mac.html">가이드</a></td></tr><tr><th scope="row">호그와트 레거시</th><td>에픽</td><td>D3DMetal로 설치·플레이 됨</td></tr><tr><th scope="row">Guilt Free (Unity, D3D11)</th><td>스팀</td><td>DXMT 설정으로 플레이 됨</td></tr><tr><th scope="row">Retro Classics</th><td>Xbox PC</td><td>메인 화면까지 실행</td></tr><tr><th scope="row">GOG GALAXY</th><td>GOG</td><td>로그인·라이브러리 됨, 게임은 아직 조금만 시험</td></tr></tbody></table></div><p>커널 안티치트를 쓰는 게임은 실행되지 않습니다.</p></section><section id="store" aria-labelledby="store-title"><h2 id="store-title">Didim Labs 게임</h2><a class="game" href="../games/dont-sell-the-cat.html#ko"><img src="../store/dont-sell-the-cat-wide.jpg" alt="고양이는 팔지 마세요: 전당포 카운터 위의 노란 눈 검은 고양이" width="920" height="430" loading="lazy"/><span class="game-body"><b>고양이는 팔지 마세요</b><span class="game-meta">$6.99 · 맥·윈도우 · 약 2시간</span><span>1958년 전당포 야간 카운터에서 보내는 일곱 밤. 확대경, UV 램프, 저울, 가게 고양이로 물건을 확인하고, 뒷문 셔터는 열지 마세요.</span></span></a></section><section id="install" aria-labelledby="install-title"><h2 id="install-title">설치</h2><ol class="steps"><li><b>앱 받기</b><p><a href="https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip">Soju-1.10.6-macos-arm64.zip</a>을 받아 압축을 풀고 응용 프로그램 폴더로 옮깁니다.</p></li><li><b>런처 고르기</b><p>소주를 열고 Platforms에서 쓰는 런처를 고릅니다. 배틀넷·에픽·GOG는 애플 ID로 직접 받은 <a href="https://developer.apple.com/games/game-porting-toolkit/">게임 포팅 툴킷</a>도 필요합니다.</p></li><li><b>로그인하고 플레이</b><p>각 런처에서 평소처럼 로그인하면 설치된 게임이 라이브러리에 나타납니다.</p></li></ol><p>터미널이 편하면 설치 스크립트나 Homebrew를 쓰세요. Rosetta 2, Xcode Command Line Tools, Homebrew가 필요합니다.</p><pre><code>curl -fsSL https://didimlabs.com/install.sh | bash
# 또는
brew install BCD1210/soju/soju
diff --git a/docs/llms.txt b/docs/llms.txt
index b6c4d159fde..0e81afcab0f 100644
--- a/docs/llms.txt
+++ b/docs/llms.txt
@@ -5,7 +5,7 @@
## Soju
- [Soju home](https://didimlabs.com/): what Soju does, tested games, install steps, FAQ
- [Soju in Korean / 소주 한국어](https://didimlabs.com/ko/)
-- [Source code and releases](https://github.com/BCD1210/soju): GPL-3.0-or-later; current version 1.10.5
+- [Source code and releases](https://github.com/BCD1210/soju): GPL-3.0-or-later; current version 1.10.6
- Supported launchers: Steam, Battle.net, Epic Games, GOG GALAXY, Xbox PC (experimental). Needs an Apple Silicon Mac (M1 or newer) and macOS 14+; Steam games need macOS 26+; Diablo II: Resurrected needs macOS 26.4+.
- Tested on M4 Pro / macOS 26.5: Diablo II: Resurrected (Battle.net, online), Hogwarts Legacy (Epic, D3DMetal), Guilt Free (Steam, DXMT). Kernel anti-cheat games do not run.
- Install: `curl -fsSL https://didimlabs.com/install.sh | bash` or `brew install BCD1210/soju/soju`
diff --git a/site-worker/auth.js b/site-worker/auth.js
new file mode 100644
index 00000000000..04bdaa95815
--- /dev/null
+++ b/site-worker/auth.js
@@ -0,0 +1,131 @@
+// Sign in with Apple or Google so Soju can find what someone bought with that email.
+// GET /auth/start?provider=apple|google&state=<random from Soju> -> provider sign-in page
+// GET /auth/callback/google, POST /auth/callback/apple -> look up purchases, keep the result
+// GET /auth/poll/<state> -> Soju picks the result up once
+// GET /auth/providers -> which buttons Soju should show
+// The result (email and license keys) sits in the AUTH KV namespace for 10 minutes under the state
+// that only that Soju knows. Secrets: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, APPLE_SERVICES_ID,
+// APPLE_TEAM_ID, APPLE_KEY_ID, APPLE_PRIVATE_KEY (the .p8 text).
+const STATE = /^[A-Za-z0-9_-]{32,64}$/;
+const TTL = 600;
+
+const page = (title, text) => new Response(`<!doctype html><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
+<title>${title}</title><style>body{font:16px/1.5 -apple-system,system-ui,sans-serif;background:#121413;color:#e7e9e6;display:grid;place-items:center;min-height:90vh;margin:0 16px}
+main{max-width:440px;text-align:center}img{width:72px;height:72px}h1{font-size:22px;margin:12px 0 6px}p{color:#a6ada7}</style>
+<main><img src="/assets/soju-logo.png" alt=""><h1>${title}</h1><p>${text}</p></main>`, { headers: { "content-type": "text/html; charset=utf-8", "cache-control": "no-store" } });
+
+const b64url = (bytes) => btoa(String.fromCharCode(...new Uint8Array(bytes))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
+const b64urlText = (text) => b64url(new TextEncoder().encode(text));
+const claims = (jwt) => JSON.parse(new TextDecoder().decode(Uint8Array.from(atob(jwt.split(".")[1].replace(/-/g, "+").replace(/_/g, "/")), (c) => c.charCodeAt(0))));
+
+async function appleSecret(env) {
+ const pem = env.APPLE_PRIVATE_KEY.replace(/-----[^-]+-----/g, "").replace(/\s+/g, "");
+ const key = await crypto.subtle.importKey("pkcs8", Uint8Array.from(atob(pem), (c) => c.charCodeAt(0)),
+ { name: "ECDSA", namedCurve: "P-256" }, false, ["sign"]);
+ const now = Math.floor(Date.now() / 1000);
+ const head = b64urlText(JSON.stringify({ alg: "ES256", kid: env.APPLE_KEY_ID }));
+ const body = b64urlText(JSON.stringify({ iss: env.APPLE_TEAM_ID, iat: now, exp: now + 300, aud: "https://appleid.apple.com", sub: env.APPLE_SERVICES_ID }));
+ const sig = await crypto.subtle.sign({ name: "ECDSA", hash: "SHA-256" }, key, new TextEncoder().encode(head + "." + body));
+ return head + "." + body + "." + b64url(sig);
+}
+
+const providers = {
+ google: {
+ ready: (env) => env.GOOGLE_CLIENT_ID && env.GOOGLE_CLIENT_SECRET,
+ authorize: (env, state, redirect) => "https://accounts.google.com/o/oauth2/v2/auth?" + new URLSearchParams({
+ client_id: env.GOOGLE_CLIENT_ID, redirect_uri: redirect, response_type: "code", scope: "openid email",
+ state, prompt: "select_account",
+ }),
+ token: async (env, code, redirect) => fetch("https://oauth2.googleapis.com/token", {
+ method: "POST", headers: { "content-type": "application/x-www-form-urlencoded" },
+ body: new URLSearchParams({ code, client_id: env.GOOGLE_CLIENT_ID, client_secret: env.GOOGLE_CLIENT_SECRET, redirect_uri: redirect, grant_type: "authorization_code" }),
+ }),
+ clientId: (env) => env.GOOGLE_CLIENT_ID,
+ issuers: ["https://accounts.google.com", "accounts.google.com"],
+ },
+ apple: {
+ ready: (env) => env.APPLE_SERVICES_ID && env.APPLE_TEAM_ID && env.APPLE_KEY_ID && env.APPLE_PRIVATE_KEY,
+ authorize: (env, state, redirect) => "https://appleid.apple.com/auth/authorize?" + new URLSearchParams({
+ client_id: env.APPLE_SERVICES_ID, redirect_uri: redirect, response_type: "code", scope: "email",
+ response_mode: "form_post", state,
+ }),
+ token: async (env, code, redirect) => fetch("https://appleid.apple.com/auth/token", {
+ method: "POST", headers: { "content-type": "application/x-www-form-urlencoded" },
+ body: new URLSearchParams({ code, client_id: env.APPLE_SERVICES_ID, client_secret: await appleSecret(env), redirect_uri: redirect, grant_type: "authorization_code" }),
+ }),
+ clientId: (env) => env.APPLE_SERVICES_ID,
+ issuers: ["https://appleid.apple.com"],
+ },
+};
+
+// Every granted license key for the given games whose customer has this email.
+async function purchases(env, email, games, polar, org) {
+ const found = [];
+ for (const [id, game] of Object.entries(games)) {
+ for (let page = 1; page <= 50; page++) {
+ const res = await polar(env, `/license-keys/?organization_id=${org}&benefit_id=${game.license}&limit=100&page=${page}`);
+ if (!res.ok) throw new Error("license lookup failed");
+ const body = await res.json();
+ const mine = (body.items || []).find((k) => k.status === "granted" && String(k.customer?.email || "").toLowerCase() === email);
+ if (mine) { found.push({ game: id, key: mine.key }); break; }
+ if (page >= (body.pagination?.max_page || 1)) break;
+ }
+ }
+ return found;
+}
+
+export async function auth(request, env, url, { home, games, polar, org }) {
+ const json = (body, status = 200) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json", "cache-control": "no-store" } });
+ if (url.pathname === "/auth/providers") {
+ return json({ providers: env.AUTH ? Object.keys(providers).filter((name) => providers[name].ready(env)) : [] });
+ }
+ if (!env.AUTH) return page("Sign-in is not set up yet", "Please use the license key from your receipt email for now.");
+
+ if (url.pathname === "/auth/start") {
+ const name = url.searchParams.get("provider"), state = url.searchParams.get("state") || "";
+ const p = Object.hasOwn(providers, name) ? providers[name] : null;
+ if (!p || !STATE.test(state)) return page("That sign-in link is broken", "Start again from Soju.");
+ if (!p.ready(env)) return page("This sign-in is not available yet", "Please use the other sign-in button or your license key.");
+ await env.AUTH.put("s:" + state, JSON.stringify({ status: "pending", provider: name }), { expirationTtl: TTL });
+ return Response.redirect(p.authorize(env, state, `https://${home}/auth/callback/${name}`), 302);
+ }
+
+ const cb = url.pathname.match(/^\/auth\/callback\/(apple|google)$/);
+ if (cb) {
+ const name = cb[1], p = providers[name];
+ const params = request.method === "POST" ? new URLSearchParams(await request.text()) : url.searchParams;
+ const state = params.get("state") || "", code = params.get("code") || "";
+ if (!STATE.test(state)) return page("That sign-in link is broken", "Start again from Soju.");
+ const saved = await env.AUTH.get("s:" + state, "json");
+ if (!saved || saved.status !== "pending" || saved.provider !== name) return page("This sign-in has expired", "Start again from Soju.");
+ const fail = async (title, text, reason) => {
+ await env.AUTH.put("s:" + state, JSON.stringify({ status: "failed", error: reason }), { expirationTtl: TTL });
+ return page(title, text);
+ };
+ if (!code) return fail("Sign-in was cancelled", "You can close this tab.", "Sign-in was cancelled.");
+ const res = await p.token(env, code, `https://${home}/auth/callback/${name}`);
+ if (!res.ok) return fail("Sign-in didn't work", "Close this tab and try again from Soju.", "The sign-in could not be confirmed.");
+ const token = await res.json();
+ let c;
+ try { c = claims(token.id_token); } catch { return fail("Sign-in didn't work", "Close this tab and try again from Soju.", "The sign-in could not be confirmed."); }
+ const verified = c.email_verified === true || c.email_verified === "true";
+ if (c.aud !== p.clientId(env) || !p.issuers.includes(c.iss) || !c.email || !verified || c.exp * 1000 < Date.now()) {
+ return fail("Sign-in didn't work", "Close this tab and try again from Soju.", "That account has no confirmed email.");
+ }
+ const email = String(c.email).toLowerCase();
+ let owned;
+ try { owned = await purchases(env, email, games, polar, org); }
+ catch { return fail("The store is busy", "Close this tab and try again from Soju in a minute.", "The store could not look up purchases."); }
+ await env.AUTH.put("s:" + state, JSON.stringify({ status: "done", email, private: c.is_private_email === true || c.is_private_email === "true", owned }), { expirationTtl: TTL });
+ return page("You're signed in", "Go back to Soju. You can close this tab.");
+ }
+
+ const poll = url.pathname.match(/^\/auth\/poll\/([A-Za-z0-9_-]{32,64})$/);
+ if (poll) {
+ const saved = await env.AUTH.get("s:" + poll[1], "json");
+ if (!saved) return json({ status: "expired" });
+ if (saved.status === "done" || saved.status === "failed") await env.AUTH.delete("s:" + poll[1]);
+ return json(saved);
+ }
+ return json({ error: "Not found." }, 404);
+}
diff --git a/site-worker/worker.js b/site-worker/worker.js
index 40c48d714b7..2e4621aef02 100644
--- a/site-worker/worker.js
+++ b/site-worker/worker.js
@@ -14,6 +14,7 @@
// POST /api/sponsor/inquiry (form fields name, email, company, message) mails an advertising inquiry
// through the MAILER send_email binding to the SPONSOR_TO secret (a verified Email Routing address).
import { EmailMessage } from "cloudflare:email";
+import { auth } from "./auth.js";
const HOME = "didimlabs.com";
const POLAR = "https://api.polar.sh/v1";
const ORG = "e7dd3a2e-a0ac-4b52-ad53-b7c7d7064420";
@@ -176,6 +177,7 @@ export default {
return Response.redirect("https://" + HOME + url.pathname + url.search, 301);
}
if (url.pathname === "/api/didim/download") return download(request, env);
+ if (url.pathname.startsWith("/auth/")) return auth(request, env, url, { home: HOME, games: GAMES, polar, org: ORG });
if (url.pathname === "/api/didim/checkout") return startCheckout(request, env);
const checkoutPath = url.pathname.match(/^\/api\/didim\/checkout\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/);
if (checkoutPath) return request.method === "GET" ? checkoutStatus(env, checkoutPath[1]) : json({ error: "Use GET." }, 405);
diff --git a/site-worker/wrangler.didimlabs.toml b/site-worker/wrangler.didimlabs.toml
index 1c3f73ceb41..861877949d6 100644
--- a/site-worker/wrangler.didimlabs.toml
+++ b/site-worker/wrangler.didimlabs.toml
@@ -14,3 +14,7 @@ custom_domain = true
# Sponsor inquiries. The recipient is the SPONSOR_TO secret and must be a verified Email Routing address.
[[send_email]]
name = "MAILER"
+
+# Sign-in results (see auth.js). Wrangler creates the namespace on first deploy.
+[[kv_namespaces]]
+binding = "AUTH"
diff --git a/site/content/index.json b/site/content/index.json
index 1a79eee32fe..dd00c492559 100644
--- a/site/content/index.json
+++ b/site/content/index.json
@@ -90,8 +90,8 @@
"@id": "https://didimlabs.com/#soju",
"name": "Soju",
"url": "https://didimlabs.com/",
- "downloadUrl": "https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip",
- "softwareVersion": "1.10.5",
+ "downloadUrl": "https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip",
+ "softwareVersion": "1.10.6",
"description": "Free, open-source Mac app that installs the official Windows launchers for Steam, Battle.net, Epic Games, GOG GALAXY and Xbox PC on Apple Silicon and shows every installed game in one library.",
"applicationCategory": "GameApplication",
"operatingSystem": "macOS 14 or later, Apple Silicon (M1 or newer)",
@@ -120,8 +120,8 @@
"lead": "A free Mac app for playing Windows games on Apple Silicon. It installs the real Steam, Battle.net, Epic, GOG GALAXY and Xbox PC launchers, keeps each in its own Wine setup, and lists every installed game in one library.",
"actions": [
{
- "label": "Download Soju 1.10.5",
- "href": "https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip",
+ "label": "Download Soju 1.10.6",
+ "href": "https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip",
"primary": true
}
],
@@ -274,7 +274,7 @@
"items": [
{
"title": "Download the app",
- "text": "[Soju-1.10.5-macos-arm64.zip](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip). Unzip it and move Soju to Applications. [Signing notes](https://github.com/BCD1210/soju/blob/main/docs/DESKTOP.md)."
+ "text": "[Soju-1.10.6-macos-arm64.zip](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip). Unzip it and move Soju to Applications. [Signing notes](https://github.com/BCD1210/soju/blob/main/docs/DESKTOP.md)."
},
{
"title": "Pick launchers",
diff --git a/site/content/ko.json b/site/content/ko.json
index ebc5b3b6e93..d98eaea0855 100644
--- a/site/content/ko.json
+++ b/site/content/ko.json
@@ -64,8 +64,8 @@
"lead": "애플 실리콘 맥에서 윈도우 게임을 하기 위한 무료 맥 앱입니다. 진짜 스팀, 배틀넷, 에픽, GOG GALAXY, Xbox PC 런처를 각각 따로 된 Wine 환경에 설치하고, 설치된 게임을 한 라이브러리에 모아 보여 줍니다.",
"actions": [
{
- "label": "소주 1.10.5 다운로드",
- "href": "https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip",
+ "label": "소주 1.10.6 다운로드",
+ "href": "https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip",
"primary": true
}
],
@@ -208,7 +208,7 @@
"items": [
{
"title": "앱 받기",
- "text": "[Soju-1.10.5-macos-arm64.zip](https://github.com/BCD1210/soju/releases/download/v1.10.5/Soju-1.10.5-macos-arm64.zip)을 받아 압축을 풀고 응용 프로그램 폴더로 옮깁니다."
+ "text": "[Soju-1.10.6-macos-arm64.zip](https://github.com/BCD1210/soju/releases/download/v1.10.6/Soju-1.10.6-macos-arm64.zip)을 받아 압축을 풀고 응용 프로그램 폴더로 옮깁니다."
},
{
"title": "런처 고르기",