mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
Compare commits
2 Commits
b2a1080fcd
...
bcecca7ab7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcecca7ab7 | ||
|
|
6d337818d0 |
@ -14,7 +14,7 @@ install=$_pkgname.install
|
||||
source=("${_pkgname}.sh")
|
||||
source_x86_64=("${_pkgname}-${pkgver}-x86_64.deb::${url}/releases/download/v${pkgver}/clash-party-linux-${pkgver}-amd64.deb")
|
||||
source_aarch64=("${_pkgname}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/clash-party-linux-${pkgver}-arm64.deb")
|
||||
sha256sums=('f8049c1f26d5a92fbcebd7bebbdedbb3eab53422b21cf6127418251ccd061282')
|
||||
sha256sums=('242609b1259e999e944b7187f4c03aacba8134a7671ff3a50e2e246b4c4eff48')
|
||||
sha256sums_x86_64=('b8d166f1134573336aaae1866d25262284b0cbabbf393684226aca0fd8d1bd83')
|
||||
sha256sums_aarch64=('8cd7398b8fc1cd70d41e386af9995cbddc1043d9018391c29f056f1435712a10')
|
||||
|
||||
|
||||
@ -9,4 +9,4 @@ if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec /opt/mihomo-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
exec /opt/clash-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
|
||||
@ -16,7 +16,7 @@ source_x86_64=("${_pkgname}-${pkgver}-x86_64.deb::${url}/releases/download/v${pk
|
||||
source_aarch64=("${_pkgname}-${pkgver}-aarch64.deb::${url}/releases/download/v${pkgver}/clash-party-linux-${pkgver}-arm64.deb")
|
||||
sha256sums=(
|
||||
"96a6250f67517493f839f964c024434dbcf784b25a73f074bb505f1521f52844"
|
||||
"560733f0e5bd9b47ff50c849301c8a22ae17a5df26830d8c97033dfcbd392382"
|
||||
"87fddbcd4a4cc7bda22ec4cadff0040e54395bb13184ee4688b58788c1fa7180"
|
||||
)
|
||||
sha256sums_x86_64=("43f8b9a5818a722cdb8e5044d2a90993274860b0da96961e1a2652169539ce39")
|
||||
sha256sums_aarch64=("18574fdeb01877a629aa52ac0175335ce27c83103db4fcb2f1ad69e3e42ee10f")
|
||||
|
||||
@ -9,4 +9,4 @@ if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec electron /opt/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
exec electron /opt/clash-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
|
||||
@ -18,7 +18,7 @@ source=(
|
||||
)
|
||||
sha256sums=("52d761e9432e17477acb8adb5744676df946476e0eb5210fee2b6d45f497f218"
|
||||
"96a6250f67517493f839f964c024434dbcf784b25a73f074bb505f1521f52844"
|
||||
"560733f0e5bd9b47ff50c849301c8a22ae17a5df26830d8c97033dfcbd392382"
|
||||
"87fddbcd4a4cc7bda22ec4cadff0040e54395bb13184ee4688b58788c1fa7180"
|
||||
)
|
||||
options=('!lto')
|
||||
|
||||
|
||||
@ -9,4 +9,4 @@ if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec electron /opt/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
exec electron /opt/clash-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
|
||||
@ -12,7 +12,7 @@ optdepends=('libappindicator-gtk3: Allow mihomo-party to extend a menu via Ayata
|
||||
makedepends=('nodejs' 'pnpm' 'jq' 'libxcrypt-compat')
|
||||
install=$_pkgname.install
|
||||
source=("${_pkgname}.sh" "git+$url.git")
|
||||
sha256sums=("f8049c1f26d5a92fbcebd7bebbdedbb3eab53422b21cf6127418251ccd061282" "SKIP")
|
||||
sha256sums=("242609b1259e999e944b7187f4c03aacba8134a7671ff3a50e2e246b4c4eff48" "SKIP")
|
||||
options=('!lto')
|
||||
|
||||
pkgver() {
|
||||
|
||||
@ -9,4 +9,4 @@ if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec /opt/mihomo-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
exec /opt/clash-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
|
||||
@ -15,7 +15,7 @@ source=(
|
||||
"${pkgname}.sh"
|
||||
)
|
||||
sha256sums=("52d761e9432e17477acb8adb5744676df946476e0eb5210fee2b6d45f497f218"
|
||||
"f8049c1f26d5a92fbcebd7bebbdedbb3eab53422b21cf6127418251ccd061282")
|
||||
"242609b1259e999e944b7187f4c03aacba8134a7671ff3a50e2e246b4c4eff48")
|
||||
options=('!lto')
|
||||
|
||||
prepare(){
|
||||
|
||||
@ -9,4 +9,4 @@ if [[ -f "${XDG_CONFIG_HOME}/mihomo-party-flags.conf" ]]; then
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec /opt/mihomo-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
exec /opt/clash-party/mihomo-party ${MIHOMO_PARTY_USER_FLAGS[@]} "$@"
|
||||
|
||||
@ -129,7 +129,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
|
||||
} as IProfileItem
|
||||
switch (newItem.type) {
|
||||
case 'remote': {
|
||||
const { userAgent } = await getAppConfig()
|
||||
const { userAgent, subscriptionTimeout = 30000 } = await getAppConfig()
|
||||
const { 'mixed-port': mixedPort = 7890 } = await getControledMihomoConfig()
|
||||
if (!item.url) throw new Error('Empty URL')
|
||||
let res: AxiosResponse
|
||||
@ -146,7 +146,8 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
|
||||
headers: {
|
||||
'User-Agent': userAgent || `mihomo.party/v${app.getVersion()} (clash.meta)`
|
||||
},
|
||||
responseType: 'text'
|
||||
responseType: 'text',
|
||||
timeout: subscriptionTimeout
|
||||
})
|
||||
} else {
|
||||
res = await axios.get(item.url, {
|
||||
@ -160,7 +161,8 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
|
||||
headers: {
|
||||
'User-Agent': userAgent || `mihomo.party/v${app.getVersion()} (clash.meta)`
|
||||
},
|
||||
responseType: 'text'
|
||||
responseType: 'text',
|
||||
timeout: subscriptionTimeout
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ export const defaultConfig: IAppConfig = {
|
||||
proxyDisplayOrder: 'default',
|
||||
autoCheckUpdate: true,
|
||||
autoCloseConnection: true,
|
||||
subscriptionTimeout: 30000,
|
||||
useNameserverPolicy: false,
|
||||
controlDns: true,
|
||||
controlSniff: true,
|
||||
|
||||
@ -23,6 +23,7 @@ const MihomoConfig: React.FC = () => {
|
||||
pauseSSID = [],
|
||||
delayTestUrl,
|
||||
userAgent,
|
||||
subscriptionTimeout = 30000,
|
||||
mihomoCpuPriority = 'PRIORITY_NORMAL',
|
||||
proxyCols = 'auto'
|
||||
} = appConfig || {}
|
||||
@ -49,6 +50,27 @@ const MihomoConfig: React.FC = () => {
|
||||
}}
|
||||
></Input>
|
||||
</SettingItem>
|
||||
<SettingItem title={t('settings.subscriptionTimeout')} divider>
|
||||
<div className="flex items-center gap-2">
|
||||
<Input
|
||||
size="sm"
|
||||
className="w-[100px]"
|
||||
type="number"
|
||||
value={(subscriptionTimeout / 1000)?.toString()}
|
||||
onValueChange={async (v: string) => {
|
||||
let num = parseInt(v)
|
||||
await patchAppConfig({ subscriptionTimeout: num * 1000 })
|
||||
}}
|
||||
onBlur={async (e) => {
|
||||
let num = parseInt(e.target.value)
|
||||
if (isNaN(num)) num = 30
|
||||
if (num < 30) num = 30
|
||||
await patchAppConfig({ subscriptionTimeout: num * 1000 })
|
||||
}}
|
||||
/>
|
||||
<span className="text-default-500">{t('common.seconds')}</span>
|
||||
</div>
|
||||
</SettingItem>
|
||||
<SettingItem title={t('mihomo.delayTest.url')} divider>
|
||||
<Input
|
||||
size="sm"
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
"settings.silentStart": "Silent Start",
|
||||
"settings.autoQuitWithoutCore": "Auto Enable Light Mode",
|
||||
"settings.autoQuitWithoutCoreTooltip": "Automatically enter light mode after closing window for specified time",
|
||||
"settings.subscriptionTimeout": "Subscription Timeout",
|
||||
"settings.autoQuitWithoutCoreDelay": "Light Mode Auto Enable Delay",
|
||||
"settings.envType": "Environment Variable Type",
|
||||
"settings.showFloatingWindow": "Show Floating Window",
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
"settings.silentStart": "اجرای بیصدا",
|
||||
"settings.autoQuitWithoutCore": "ورود خودکار به حالت سبک",
|
||||
"settings.autoQuitWithoutCoreTooltip": "ورود خودکار به حالت سبک پس از بستن پنجره برای زمان مشخص",
|
||||
"settings.subscriptionTimeout": "زمان انتظار اشتراک",
|
||||
"settings.autoQuitWithoutCoreDelay": "تاخیر فعالسازی خودکار حالت سبک",
|
||||
"settings.envType": "نوع متغیر محیطی",
|
||||
"settings.showFloatingWindow": "نمایش پنجره شناور",
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
"settings.silentStart": "Тихий запуск",
|
||||
"settings.autoQuitWithoutCore": "Автоматический облегчённый режим",
|
||||
"settings.autoQuitWithoutCoreTooltip": "Автоматически переходить в облегчённый режим после закрытия окна",
|
||||
"settings.subscriptionTimeout": "Таймаут подписки",
|
||||
"settings.autoQuitWithoutCoreDelay": "Задержка включения облегчённого режима",
|
||||
"settings.envType": "Тип переменных окружения",
|
||||
"settings.showFloatingWindow": "Показывать плавающее окно",
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
"settings.silentStart": "静默启动",
|
||||
"settings.autoQuitWithoutCore": "自动进入轻量模式",
|
||||
"settings.autoQuitWithoutCoreTooltip": "关闭窗口后指定时间自动进入轻量模式",
|
||||
"settings.subscriptionTimeout": "订阅超时时间",
|
||||
"settings.autoQuitWithoutCoreDelay": "轻量模式自动启用延迟",
|
||||
"settings.envType": "环境变量类型",
|
||||
"settings.showFloatingWindow": "显示悬浮窗",
|
||||
|
||||
1
src/shared/types.d.ts
vendored
1
src/shared/types.d.ts
vendored
@ -282,6 +282,7 @@ interface IAppConfig {
|
||||
delayTestConcurrency?: number
|
||||
delayTestUrl?: string
|
||||
delayTestTimeout?: number
|
||||
subscriptionTimeout?: number
|
||||
encryptedPassword?: number[]
|
||||
controlDns?: boolean
|
||||
controlSniff?: boolean
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user