@yanglaofish/dsh-proxy-pro 2.0.1 → 2.0.2

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/lib/client.js CHANGED
@@ -388,8 +388,10 @@ window.__ModuleLoader__.load({
388
388
  // Address is configuration-driven: custom mode shows the custom URL
389
389
  // immediately (no stale host snapshot), system mode shows the URL the
390
390
  // host read from Windows.
391
+ // 配置输入框保留原始认证信息;状态文字不展示用户名或密码。
392
+ var publicCustomUrl = (value.customUrl || "").replace(/^(https?:\/\/)[^/?#]*@/i, "$1");
391
393
  var shownUrl = modeNow === "custom"
392
- ? (value.customUrl || "—")
394
+ ? (publicCustomUrl || "—")
393
395
  : ((status && status.url) || "—");
394
396
  var statusLine = cfgActive
395
397
  ? "代理生效中 · " + shownUrl
@@ -397,7 +399,7 @@ window.__ModuleLoader__.load({
397
399
  var subLine = "";
398
400
  if (cfgActive) {
399
401
  if (modeNow === "custom") {
400
- subLine = "自定义地址(立即生效)" + (status && status.url && status.url !== value.customUrl ? " · 已应用: " + status.url : "");
402
+ subLine = "自定义地址(立即生效)" + (status && status.url && status.url !== publicCustomUrl ? " · 已应用: " + status.url : "");
401
403
  } else if (status !== null && status !== undefined) {
402
404
  subLine = status.active === true
403
405
  ? "跟随 Windows 系统代理(自动刷新)"
@@ -621,4 +623,4 @@ window.__ModuleLoader__.load({
621
623
  ];
622
624
  return module.exports;
623
625
  },
624
- });
626
+ });