fix: force http for yacd enable link

This commit is contained in:
divocat
2025-10-09 18:20:48 +03:00
parent 9bc2b5ffef
commit 715a278af8
3 changed files with 12 additions and 1 deletions

View File

@@ -9,3 +9,9 @@ export function getClashWsUrl(): string {
return `ws://${hostname}:9090`; return `ws://${hostname}:9090`;
} }
export function getClashUIUrl(): string {
const { hostname } = window.location;
return `http://${hostname}:9090/ui`;
}

View File

@@ -12,7 +12,7 @@ function createAdditionalSection(mainSection) {
form.Flag, form.Flag,
'yacd', 'yacd',
_('Yacd enable'), _('Yacd enable'),
`<a href="${main.getBaseUrl()}:9090/ui" target="_blank">${main.getBaseUrl()}:9090/ui</a>`, `<a href="${main.getClashUIUrl()}" target="_blank">${main.getClashUIUrl()}</a>`,
); );
o.default = '0'; o.default = '0';
o.rmempty = false; o.rmempty = false;

View File

@@ -784,6 +784,10 @@ function getClashWsUrl() {
const { hostname } = window.location; const { hostname } = window.location;
return `ws://${hostname}:9090`; return `ws://${hostname}:9090`;
} }
function getClashUIUrl() {
const { hostname } = window.location;
return `http://${hostname}:9090/ui`;
}
// src/helpers/splitProxyString.ts // src/helpers/splitProxyString.ts
function splitProxyString(str) { function splitProxyString(str) {
@@ -1966,6 +1970,7 @@ return baseclass.extend({
getClashConfig, getClashConfig,
getClashGroupDelay, getClashGroupDelay,
getClashProxies, getClashProxies,
getClashUIUrl,
getClashVersion, getClashVersion,
getClashWsUrl, getClashWsUrl,
getConfigSections, getConfigSections,