This commit is contained in:
xishang0128 2025-01-01 01:20:06 +08:00
parent 8147f3800e
commit 7ab3810457
4 changed files with 12 additions and 8 deletions

View File

@ -86,7 +86,8 @@ jobs:
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: |
dist/mihomo-party-*
dist/mihomo-party*
!dist/mihomo-party*blockmap
latest.yml
changelog.md

View File

@ -37,14 +37,15 @@ export async function patchControledMihomoConfig(patch: Partial<IMihomoConfig>):
controledMihomoConfig.sniffer = defaultControledMihomoConfig.sniffer
}
}
if (patch.hosts) {
controledMihomoConfig.hosts = patch.hosts
}
if (patch.dns?.['nameserver-policy']) {
controledMihomoConfig.dns = controledMihomoConfig.dns || {}
controledMihomoConfig.dns['nameserver-policy'] = patch.dns['nameserver-policy']
}
controledMihomoConfig = deepMerge(controledMihomoConfig, patch)
if (patch.hosts && patch.dns?.['use-hosts']) {
delete controledMihomoConfig.hosts
controledMihomoConfig.hosts = patch.hosts
}
if (!useNameserverPolicy) {
delete controledMihomoConfig?.dns?.['nameserver-policy']
}

View File

@ -44,7 +44,9 @@ const ConnectionItem: React.FC<Props> = (props) => {
{info.metadata.type}({info.metadata.network.toUpperCase()})
</Chip>
<div className="text-ellipsis whitespace-nowrap overflow-hidden">
{info.metadata.process || info.metadata.sourceIP}
{(!info.metadata.process || info.metadata.process === 'mihomo' || !info.metadata.sourceIP)
? 'mihomo-core'
: info.metadata.process || info.metadata.sourceIP}
{' -> '}
{info.metadata.host ||
info.metadata.sniffHost ||

View File

@ -140,9 +140,9 @@ const DNS: React.FC = () => {
className="app-nodrag"
color="primary"
onPress={() => {
const hostsObject = Object.fromEntries(
values.hosts.map(({ domain, value }) => [domain, value])
)
const hostsObject = values.useHosts
? Object.fromEntries(values.hosts.map(({ domain, value }) => [domain, value]))
: undefined
const dnsConfig = {
ipv6: values.ipv6,
'fake-ip-range': values.fakeIPRange,