mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
change ua
This commit is contained in:
parent
b18dbbf770
commit
552fa3757d
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user