fix(user-secret): 青果只用 Authkey/Authpwd,链接由前端拼并上报服务端
青果没有可填的提取链接(10-30 口径),但商标检测在服务端只认 proxy_url, 保存时又主动清空服务端记录 ⇒ 用户填了账密仍被判「未配置代理」。 - 新增 qingguo-link.ts(零依赖):由账密拼 overseas.proxy.qg.net/get 链接, Authkey/Authpwd 走 userinfo(隧道 Basic 认证没有第二个通道) - 保存时本地与服务端都用这条链接;已存账密的旧配置刷新后仍能读回 - 4 例纯函数用例钉住拼装规则与空 key 语义
This commit is contained in:
@@ -148,7 +148,9 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="proxy-plan-hint">
|
||||
青果用 Authkey / Authpwd 直连隧道代理,无需提取链接;账密只存在本机,不上报服务端。
|
||||
青果没有可填的提取链接:保存时用 Authkey / Authpwd 自动拼出
|
||||
<code>overseas.proxy.qg.net/get?key=…&format=json</code>(Basic 认证也带在同一条链接里),
|
||||
本地与后台密钥各存一份。服务端的商标检测用的就是这条链接,不填账密它会按「未配置代理」拦下任务。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -278,7 +280,12 @@ import {
|
||||
deleteMyApiSecret,
|
||||
putMyApiSecret,
|
||||
} from '@/shared/api/types/modules/user-secret'
|
||||
import { proxyUserId, readUserProxy, userProxyPatch } from '@/shared/utils/api-secret-proxy-config'
|
||||
import {
|
||||
composeQingguoLink,
|
||||
proxyUserId,
|
||||
readUserProxy,
|
||||
userProxyPatch,
|
||||
} from '@/shared/utils/api-secret-proxy-config'
|
||||
import { useProxyBalance, useProxyPlan } from '@/shared/composables/useProxyPlan'
|
||||
import { createModuleView, type ModuleState } from '@/shared/utils/api-secret-module-view'
|
||||
|
||||
@@ -605,7 +612,12 @@ async function saveAll(options: { requireAll?: boolean } = {}): Promise<boolean>
|
||||
if (!api?.save_config) throw new Error('当前客户端未提供代理配置保存能力')
|
||||
// 青果走账密直连隧道,不保存提取链接;切回极客时输入框里的旧值仍在
|
||||
const tunnelMode = proxyProvider.value === 'qingguo'
|
||||
const nextProxyUrl = tunnelMode ? '' : proxyUrl.value.trim()
|
||||
// 青果没有提取链接可填:由 Authkey/Authpwd 拼出来(2026-10-31 用户拍板)。
|
||||
// 本地与服务端用同一条链接——服务端商标检测(16890)只收得到 proxy_url,
|
||||
// 拼空串等于用户填了账密却仍被判「未配置代理」。
|
||||
const nextProxyUrl = tunnelMode
|
||||
? composeQingguoLink(proxyAccount.value, proxyPassword.value)
|
||||
: proxyUrl.value.trim()
|
||||
const nextProxyMode = tunnelMode ? 2 : proxyMode.value
|
||||
await api.save_config(
|
||||
userProxyPatch(nextProxyUrl, nextProxyMode, proxyProvider.value, proxyAccount.value, proxyPassword.value) as DesktopConfigUpdate,
|
||||
|
||||
Reference in New Issue
Block a user