easy-claude 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +9 -6
- package/README.zh-CN.md +9 -6
- package/native/Overlay.swift +27 -1
- package/native/build/EasyClaudeOverlay.app/Contents/Info.plist +1 -1
- package/native/build/EasyClaudeOverlay.app/Contents/MacOS/EasyClaudeOverlay +0 -0
- package/package.json +3 -2
- package/src/public-ip.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# 更新记录
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
- Shorten public IP connection/total timeouts to 3/5 seconds (7-second process limit), allowing faster ipinfo-to-ipify fallback. Preserve proxy routing, TLS/IP checks and unknown fallback city/time zone.
|
|
6
|
+
- Cover timeout, network failure, HTTP 429 and invalid response fallback; protection still checks the fallback IP against the allowlist.
|
|
7
|
+
|
|
8
|
+
- Show the running app version beside More settings / Less settings, including the collapsed panel.
|
|
9
|
+
|
|
10
|
+
## 1.3.0
|
|
11
|
+
|
|
12
|
+
- Add a persistent, editable Subscription day (1–31 or Not set) below automatic usage refresh, visible with settings collapsed.
|
|
13
|
+
|
|
3
14
|
## 1.2.0
|
|
4
15
|
|
|
5
16
|
- Add Start Claude proxy (green) and Stop Claude proxy (yellow) below the local proxy address. Save and restore previous proxy fields; require explicit default restoration for legacy settings without a saved baseline. Never restart Claude automatically.
|
package/README.md
CHANGED
|
@@ -18,14 +18,13 @@ Below Local proxy, click green Start Claude proxy to back up and configure Deskt
|
|
|
18
18
|
|
|
19
19
|
[Setup, proxy configuration and removal](docs/exit-ip-protection.md) · [Development verification](docs/版本/出口IP保护开发管理.md)
|
|
20
20
|
|
|
21
|
-
## v1.
|
|
21
|
+
## v1.3.1 release notes
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Keep protection heartbeats alive during menus and confirmations. Updates only inspect settings; they never silently configure proxies or restart Claude.
|
|
23
|
+
- Reduce each public IP query timeout to 5 seconds (3-second connection timeout), then try ipify if ipinfo fails.
|
|
24
|
+
- Show the running version beside More settings / Less settings.
|
|
25
|
+
- Query intervals are unchanged: geography every 300 seconds; protection defaults to 60 seconds.
|
|
27
26
|
|
|
28
|
-
[Release history](CHANGELOG.md) · [1.
|
|
27
|
+
[Release history](CHANGELOG.md) · [1.3.1 verification](docs/版本/1.3.1开发管理.md)
|
|
29
28
|
|
|
30
29
|
## Install and run
|
|
31
30
|
|
|
@@ -119,3 +118,7 @@ CLI login can expire while the desktop remains signed in. Official service respo
|
|
|
119
118
|
[Version management](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/README.md)
|
|
120
119
|
|
|
121
120
|
The Network & protection section groups the current exit, allowlist and protection status. With protection on, the displayed exit follows the protection check immediately; failures show unknown instead of an old IP. Expand More settings to edit the allowlist and interval.
|
|
121
|
+
|
|
122
|
+
## Subscription day
|
|
123
|
+
|
|
124
|
+
A Subscription day row below Automatic usage refresh stays visible with settings collapsed. Choose day 1–31 or Not set; each tool saves its own value. This is a personal note, not a billing lookup or usage reset.
|
package/README.zh-CN.md
CHANGED
|
@@ -20,14 +20,13 @@ Claude App 与 Claude Code CLI 共用固定本机代理 **http://127.0.0.1:18197
|
|
|
20
20
|
|
|
21
21
|
[安装、代理配置、关闭与卸载](docs/出口IP保护.md) · [开发验证记录](docs/版本/出口IP保护开发管理.md)
|
|
22
22
|
|
|
23
|
-
## v1.
|
|
23
|
+
## v1.3.1 更新说明
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- 菜单或确认框期间保持保护心跳。安装/更新只检查代理,不静默配置、不自动重开Claude。
|
|
25
|
+
- 公网IP单源查询超时缩短为5秒(连接3秒),ipinfo失败后切换ipify。
|
|
26
|
+
- “更多设置/收起设置”旁常驻显示当前版本号。
|
|
27
|
+
- 查询周期不变:地理查询300秒,保护默认60秒。
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
历史见[CHANGELOG](CHANGELOG.md),本版见[开发与发布记录](docs/版本/1.3.1开发管理.md)。
|
|
31
30
|
|
|
32
31
|
## 安装与使用
|
|
33
32
|
|
|
@@ -151,3 +150,7 @@ IP地理库的城市与时区可能存在偏差或互相不一致;显示接口
|
|
|
151
150
|
额度自动刷新默认关闭,开启后每5分钟查询,重置/提醒到点每分钟确认,关闭后仅手动。服务返回429后先等待10分钟、后最长15分钟,手动刷新遵守冷却,成功后清零。网络与保护合为一个分区,保护开启时当前出口与保护检测同步更新;失败显示未知,白名单和复查周期在更多设置中修改。关闭保护时IP/城市查询每5分钟刷新。
|
|
152
151
|
|
|
153
152
|
[版本管理](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/README.md)
|
|
153
|
+
|
|
154
|
+
## 订阅日期
|
|
155
|
+
|
|
156
|
+
控制面板在“额度自动刷新”下方新增“订阅日期”,收起设置时也显示。可选每月1–31日(如“3日”)或“未设置”,各工具独立保存;只作个人记录,不查询账单、不改变额度重置。
|
package/native/Overlay.swift
CHANGED
|
@@ -653,6 +653,7 @@ struct ControlPanelView: View {
|
|
|
653
653
|
}
|
|
654
654
|
Divider()
|
|
655
655
|
setting(L("额度自动刷新", "Automatic usage refresh"), value: owner.automaticUsageRefresh) { owner.toggleAutomaticUsageRefresh() }
|
|
656
|
+
subscription
|
|
656
657
|
Divider()
|
|
657
658
|
HStack(spacing: 7) {
|
|
658
659
|
Image(systemName: "clock").foregroundStyle(.secondary)
|
|
@@ -676,6 +677,8 @@ struct ControlPanelView: View {
|
|
|
676
677
|
Label(owner.controlsExpanded ? L("收起设置", "Less settings") : L("更多设置", "More settings"), systemImage: "gearshape")
|
|
677
678
|
}
|
|
678
679
|
.buttonStyle(.plain).accessibilityIdentifier("moreSettings")
|
|
680
|
+
Text("v\(owner.appVersion)").font(.system(size: 11)).foregroundStyle(.secondary)
|
|
681
|
+
.accessibilityIdentifier("appVersion")
|
|
679
682
|
Spacer()
|
|
680
683
|
Button { owner.launchClaudeApp() } label: { Label(L("启动 Claude", "Launch Claude"), systemImage: "play") }
|
|
681
684
|
.buttonStyle(.plain).accessibilityIdentifier("launchClaudeApp")
|
|
@@ -688,6 +691,19 @@ struct ControlPanelView: View {
|
|
|
688
691
|
.preferredColorScheme(.dark)
|
|
689
692
|
.lineSpacing(2)
|
|
690
693
|
}
|
|
694
|
+
var subscription: some View {
|
|
695
|
+
HStack {
|
|
696
|
+
Text(L("订阅日期", "Subscription day")).font(.system(size: 12))
|
|
697
|
+
Spacer()
|
|
698
|
+
Picker(L("订阅日期", "Subscription day"), selection: Binding(
|
|
699
|
+
get: { owner.subscriptionDay }, set: { owner.setSubscriptionDay($0) })) {
|
|
700
|
+
Text(L("未设置", "Not set")).tag(0)
|
|
701
|
+
ForEach(1...31, id: \.self) { day in Text(L("\(day)日", "Day \(day)")).tag(day) }
|
|
702
|
+
}
|
|
703
|
+
.labelsHidden().frame(width: 110).controlSize(.small)
|
|
704
|
+
.accessibilityIdentifier("subscriptionDay")
|
|
705
|
+
}.frame(minHeight: 20)
|
|
706
|
+
}
|
|
691
707
|
func iconButton(_ label: String, _ image: String, action: @escaping () -> Void) -> some View {
|
|
692
708
|
Button(action: action) { Image(systemName: image).frame(width: 20, height: 20) }
|
|
693
709
|
.buttonStyle(.plain).help(label).accessibilityLabel(label)
|
|
@@ -987,6 +1003,11 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
|
|
|
987
1003
|
var ipClockCity: String?
|
|
988
1004
|
var manualClockZone = TimeZone(identifier: "America/Los_Angeles")!
|
|
989
1005
|
var manualClockCity = "硅谷"
|
|
1006
|
+
// 仅记录用户指定的每月日期,不读取账号账单或据此推算额度重置。
|
|
1007
|
+
@Published var subscriptionDay: Int = {
|
|
1008
|
+
let day = UserDefaults.standard.integer(forKey: "subscriptionDay")
|
|
1009
|
+
return (1...31).contains(day) ? day : 0
|
|
1010
|
+
}()
|
|
990
1011
|
@Published var controlRevision = 0
|
|
991
1012
|
let controlPopover = NSPopover()
|
|
992
1013
|
var controlsExpanded = false
|
|
@@ -994,7 +1015,7 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
|
|
|
994
1015
|
var controlHeight: CGFloat {
|
|
995
1016
|
let state = currentControlState()
|
|
996
1017
|
let quotaHeight: CGFloat = state.login ? 155 : CGFloat(max(1, state.quotas.count)) * 62 + (state.mode == "ready" ? 0 : 65)
|
|
997
|
-
let total = quotaHeight +
|
|
1018
|
+
let total = quotaHeight + 342 + (controlsExpanded ? (followIPTimeZone ? 455 : 520) : 0)
|
|
998
1019
|
return min(total, max(280, (status?.button?.window?.screen?.visibleFrame.height ?? NSScreen.main?.visibleFrame.height ?? 900) - 65))
|
|
999
1020
|
}
|
|
1000
1021
|
var status: NSStatusItem?
|
|
@@ -1224,6 +1245,11 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
|
|
|
1224
1245
|
status?.button?.setAccessibilityLabel("Easy \(controlProduct) \(state.headline) \(state.text)")
|
|
1225
1246
|
if controlPopover.isShown { resizeControls() }
|
|
1226
1247
|
}
|
|
1248
|
+
func setSubscriptionDay(_ day: Int) {
|
|
1249
|
+
guard (0...31).contains(day) else { return }
|
|
1250
|
+
subscriptionDay = day
|
|
1251
|
+
UserDefaults.standard.set(day, forKey: "subscriptionDay")
|
|
1252
|
+
}
|
|
1227
1253
|
func setLanguage(_ value: String) {
|
|
1228
1254
|
guard AppLanguage(rawValue: value) != nil else { return }
|
|
1229
1255
|
UserDefaults.standard.set(value, forKey: "interfaceLanguage")
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<key>CFBundleIdentifier</key><string>com.unionschool.easy-claude.overlay</string>
|
|
6
6
|
<key>CFBundleName</key><string>Easy Claude Overlay</string>
|
|
7
7
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
8
|
-
<key>CFBundleShortVersionString</key><string>1.
|
|
8
|
+
<key>CFBundleShortVersionString</key><string>1.3.1</string>
|
|
9
9
|
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
|
10
10
|
<key>CFBundleLocalizations</key><array><string>en</string><string>zh-Hans</string><string>zh-Hant</string></array>
|
|
11
11
|
<key>LSUIElement</key><true/>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-claude",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Claude Code quota rings and transparent world clock for Claude desktop",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"test:protection": "node --test --test-timeout=15000 scripts/ip-guard-proof/verify.mjs scripts/ip-guard-proof/service-check.mjs",
|
|
32
32
|
"test:protection-ui": "python3 scripts/test-protection-ui.py",
|
|
33
33
|
"test:focus": "python3 scripts/test-focus.py",
|
|
34
|
-
"test:polling": "python3 scripts/test-polling.py"
|
|
34
|
+
"test:polling": "python3 scripts/test-polling.py",
|
|
35
|
+
"test:subscription": "python3 scripts/test-subscription.py"
|
|
35
36
|
},
|
|
36
37
|
"license": "MIT",
|
|
37
38
|
"author": "UnionSchool",
|
package/src/public-ip.js
CHANGED
|
@@ -10,10 +10,11 @@ export async function readPublicIP({ run = promisify(execFile), env = process.en
|
|
|
10
10
|
const { stdout } = await run('/usr/sbin/scutil', ['--proxy'], { timeout: 2000, maxBuffer: 65536 });
|
|
11
11
|
proxy = systemProxy(stdout);
|
|
12
12
|
}
|
|
13
|
+
// 限制主源等待,让备用仍有机会及时返回,不在同一源反复重试。
|
|
13
14
|
const request = async url => {
|
|
14
15
|
const { stdout } = await run('/usr/bin/curl', ['-q', '--silent', '--show-error', '--fail', '--proto', '=https',
|
|
15
|
-
'--connect-timeout', '
|
|
16
|
-
timeout:
|
|
16
|
+
'--connect-timeout', '3', '--max-time', '5', '--max-redirs', '0', url], {
|
|
17
|
+
timeout: 7000, maxBuffer: 8192, env: proxy ? { ...env, https_proxy: proxy } : env
|
|
17
18
|
});
|
|
18
19
|
return stdout;
|
|
19
20
|
};
|