@goodandready/dsh-subscriptions 0.7.40 → 0.7.41

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.
@@ -168,6 +168,7 @@ export async function createAccountsView({ live, store, fetch, pmL, pmE, concurr
168
168
  availableModels: info.availableModels || null,
169
169
  poolEnabled: slot.poolEnabled !== false,
170
170
  isDefault: !!slot.isDefault,
171
+ proxyBypass: Array.isArray(slot.proxyBypass) ? slot.proxyBypass : [],
171
172
  ...(Array.isArray(slot.poolModels) ? { poolModels: slot.poolModels } : {}),
172
173
  credentialError: info.credentialError || null,
173
174
  duplicateOf: info.duplicateOf || null,
package/lib/accounts.js CHANGED
@@ -74,6 +74,7 @@ export function normalizeSlots(slots) {
74
74
  ...(slot.proxyUrl ? { proxyUrl: String(slot.proxyUrl) } : {}),
75
75
  ...(slot.expiresAt ? { expiresAt: Number(slot.expiresAt) } : {}),
76
76
  ...(slot.maxConcurrency !== undefined ? { maxConcurrency: Number(slot.maxConcurrency) } : {}),
77
+ ...(Array.isArray(slot.proxyBypass) ? { proxyBypass: slot.proxyBypass.map((host) => String(host).trim()).filter(Boolean) } : {}),
77
78
  ...(slot.poolEnabled === false ? { poolEnabled: false } : {}),
78
79
  ...(slot.isDefault ? { isDefault: true } : {}),
79
80
  ...(Array.isArray(slot.poolModels)
@@ -427,6 +428,7 @@ export function createAccountStore({ credentials, getConfig, fetchImpl, fetchFor
427
428
  isPro: !!slot.isPro,
428
429
  poolEnabled: slot.poolEnabled !== false,
429
430
  isDefault: !!slot.isDefault,
431
+ proxyBypass: Array.isArray(slot.proxyBypass) ? slot.proxyBypass : [],
430
432
  ...(Array.isArray(slot.poolModels) ? { poolModels: slot.poolModels } : {}),
431
433
  credentialError: info.credentialError || null,
432
434
  lastUsedAt: lastUsedAt.get(slot.ref) || 0,
package/lib/client.js CHANGED
@@ -264,6 +264,7 @@ window.__ModuleLoader__.load({
264
264
  "pastePlaceholder": "Paste redirected URL or code",
265
265
  "submitCode": "Submit code",
266
266
  "proxyPlaceholder": "Per-account proxy (http://, https://, socks5://) - optional",
267
+ "proxyBypassPlaceholder": "Proxy bypass hosts (comma-separated)",
267
268
  "proxyCheck": "Check proxy",
268
269
  "proxyOk": "proxy ok",
269
270
  "proxyFail": "proxy fail",
@@ -670,6 +671,7 @@ window.__ModuleLoader__.load({
670
671
  "pastePlaceholder": "粘贴重定向 URL 或授权代码",
671
672
  "submitCode": "提交授权代码",
672
673
  "proxyPlaceholder": "单账户独立代理 (http://, https://, socks5://) - 可选",
674
+ "proxyBypassPlaceholder": "代理绕过主机(逗号分隔)",
673
675
  "proxyCheck": "测试代理",
674
676
  "proxyOk": "代理连接成功",
675
677
  "proxyFail": "代理连接失败",
@@ -3222,6 +3224,16 @@ h('div', { className: 'dsub-row' },
3222
3224
  updateSlot(row.slot.provider, row.slot.index, { proxyUrl: e.target.value })
3223
3225
  },
3224
3226
  }),
3227
+ h('input', {
3228
+ className: 'dsub-grow',
3229
+ value: (Array.isArray(row.slot.proxyBypass) ? row.slot.proxyBypass : []).join(','),
3230
+ placeholder: t('proxyBypassPlaceholder'),
3231
+ onChange: (e) => {
3232
+ updateSlot(row.slot.provider, row.slot.index, {
3233
+ proxyBypass: e.target.value.split(',').map((host) => host.trim()).filter(Boolean),
3234
+ })
3235
+ },
3236
+ }),
3225
3237
  h('button', {
3226
3238
  type: 'button', className: 'dsub-mini',
3227
3239
  disabled: checking['proxy:' + key],
package/lib/index.js CHANGED
@@ -23,6 +23,7 @@ import { OllamaAdapter, ollamaAlive, ollamaModels, ollamaBase } from './ollama.j
23
23
  import { createResetCreditService } from './reset-credits.js'
24
24
  import { maskEmail, maskLabel } from './mask.js'
25
25
  import { proxyFetch } from './proxy.js'
26
+ import { shouldBypassProxy } from './feature-helpers.js'
26
27
  import { HistoryStore, resolveHistoryDir } from './history.js'
27
28
  import { createDiagnosticsReport } from './diagnostics.js'
28
29
  import { createAccountsView } from './accounts-view.js'
@@ -238,7 +239,11 @@ export function apply(ctx, rawConfig) {
238
239
  if (!parsed) return null
239
240
  const slot = normalizeSlots(live().slots).find((s) => s.provider === parsed.provider && s.index === parsed.index)
240
241
  if (!slot || !slot.proxyUrl) return null
241
- return proxyFetch(slot.proxyUrl)
242
+ const proxied = proxyFetch(slot.proxyUrl)
243
+ if (!proxied) return null
244
+ const bypass = Array.isArray(slot.proxyBypass) ? slot.proxyBypass : []
245
+ if (!bypass.length) return proxied
246
+ return (url, init) => shouldBypassProxy(bypass, String(url)) ? fetch(url, init) : proxied(url, init)
242
247
  }
243
248
 
244
249
  function redirectFor(provider, ref, reqOrigin) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-subscriptions",
3
- "version": "0.7.40",
3
+ "version": "0.7.41",
4
4
  "description": "Use ChatGPT Codex, Claude, Grok, Antigravity, Kimi, GLM, Cursor, Kiro, Copilot, Qwen, ERNIE, Spark, JetBrains, Perplexity, Replit, and Cody subscriptions as DeepSeek Harness LLM providers via OAuth.",
5
5
  "license": "MIT",
6
6
  "type": "module",