change ua
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run

This commit is contained in:
pompurin404 2024-08-21 20:23:30 +08:00
parent b18dbbf770
commit 552fa3757d
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
} as IProfileItem
switch (newItem.type) {
case 'remote': {
const { userAgent = 'clash-meta' } = await getAppConfig()
const { userAgent } = await getAppConfig()
const { 'mixed-port': mixedPort = 7890 } = await getControledMihomoConfig()
if (!item.url) throw new Error('Empty URL')
const res = await axios.get(item.url, {
@ -120,7 +120,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
}
: false,
headers: {
'User-Agent': userAgent
'User-Agent': userAgent || 'clash.meta'
}
})
const data = res.data

View File

@ -31,7 +31,7 @@ const MihomoConfig: React.FC = () => {
size="sm"
className="w-[60%]"
value={ua}
placeholder="默认 clash-meta"
placeholder="默认 clash.meta"
onValueChange={(v) => {
setUa(v)
setUaDebounce(v)