mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10:30 +08:00
adjust
This commit is contained in:
parent
8147f3800e
commit
7ab3810457
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -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
|
||||
|
||||
|
||||
@ -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']
|
||||
}
|
||||
|
||||
@ -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 ||
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user