mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +08:00
add direct-nameserver setting
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 / windows7 (ia32) (push) Waiting to run
Build / windows7 (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 / macos10 (arm64) (push) Waiting to run
Build / macos10 (x64) (push) Waiting to run
Build / artifact-windows (push) Blocked by required conditions
Build / artifact-windows7 (push) Blocked by required conditions
Build / artifact-macos (push) Blocked by required conditions
Build / artifact-macos10 (push) Blocked by required conditions
Build / artifact-linux (push) Blocked by required conditions
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
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
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 / windows7 (ia32) (push) Waiting to run
Build / windows7 (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 / macos10 (arm64) (push) Waiting to run
Build / macos10 (x64) (push) Waiting to run
Build / artifact-windows (push) Blocked by required conditions
Build / artifact-windows7 (push) Blocked by required conditions
Build / artifact-macos (push) Blocked by required conditions
Build / artifact-macos10 (push) Blocked by required conditions
Build / artifact-linux (push) Blocked by required conditions
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
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
This commit is contained in:
parent
c043281b9f
commit
700c5d26b9
|
@ -74,7 +74,8 @@ export const defaultControledMihomoConfig: Partial<IMihomoConfig> = {
|
|||
'use-hosts': false,
|
||||
'use-system-hosts': false,
|
||||
nameserver: ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query'],
|
||||
'proxy-server-nameserver': ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query']
|
||||
'proxy-server-nameserver': ['https://120.53.53.53/dns-query', 'https://223.5.5.5/dns-query'],
|
||||
'direct-nameserver': []
|
||||
},
|
||||
sniffer: {
|
||||
enable: true,
|
||||
|
|
|
@ -32,7 +32,8 @@ const DNS: React.FC = () => {
|
|||
'proxy-server-nameserver': proxyServerNameserver = [
|
||||
'https://120.53.53.53/dns-query',
|
||||
'https://223.5.5.5/dns-query'
|
||||
]
|
||||
],
|
||||
'direct-nameserver': directNameserver = []
|
||||
} = dns || {}
|
||||
const [changed, setChanged] = useState(false)
|
||||
const [values, originSetValues] = useState({
|
||||
|
@ -45,6 +46,7 @@ const DNS: React.FC = () => {
|
|||
respectRules,
|
||||
nameserver,
|
||||
proxyServerNameserver,
|
||||
directNameserver,
|
||||
useNameserverPolicy,
|
||||
nameserverPolicy: Object.entries(nameserverPolicy || {}).map(([domain, value]) => ({
|
||||
domain,
|
||||
|
@ -149,6 +151,7 @@ const DNS: React.FC = () => {
|
|||
'respect-rules': values.respectRules,
|
||||
nameserver: values.nameserver,
|
||||
'proxy-server-nameserver': values.proxyServerNameserver,
|
||||
'direct-nameserver': values.directNameserver,
|
||||
fallback: [],
|
||||
'fallback-filter': {}
|
||||
}
|
||||
|
@ -209,7 +212,7 @@ const DNS: React.FC = () => {
|
|||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem title="连接遵守规则" divider>
|
||||
<SettingItem title="遵守规则" divider>
|
||||
<Switch
|
||||
size="sm"
|
||||
isSelected={values.respectRules}
|
||||
|
@ -220,7 +223,7 @@ const DNS: React.FC = () => {
|
|||
</SettingItem>
|
||||
|
||||
<div className="flex flex-col items-stretch">
|
||||
<h3>代理节点域名解析</h3>
|
||||
<h3>节点域名解析</h3>
|
||||
{renderListInputs('proxyServerNameserver', '例:tls://223.5.5.5')}
|
||||
</div>
|
||||
<Divider className="my-2" />
|
||||
|
@ -229,6 +232,11 @@ const DNS: React.FC = () => {
|
|||
{renderListInputs('nameserver', '例:tls://223.5.5.5')}
|
||||
</div>
|
||||
<Divider className="my-2" />
|
||||
<div className="flex flex-col items-stretch">
|
||||
<h3>直连 DNS 服务器</h3>
|
||||
{renderListInputs('directNameserver', '例:tls://223.5.5.5')}
|
||||
</div>
|
||||
<Divider className="my-2" />
|
||||
<SettingItem title="覆盖DNS策略" divider>
|
||||
<Switch
|
||||
size="sm"
|
||||
|
|
9
src/shared/types.d.ts
vendored
9
src/shared/types.d.ts
vendored
|
@ -27,6 +27,7 @@ type MihomoProxyType =
|
|||
type TunStack = 'gvisor' | 'mixed' | 'system'
|
||||
type FindProcessMode = 'off' | 'strict' | 'always'
|
||||
type DnsMode = 'normal' | 'fake-ip' | 'redir-host'
|
||||
type FilterMode = 'blacklist' | 'whitelist'
|
||||
type NetworkInterfaceInfo = os.NetworkInterfaceInfo
|
||||
|
||||
interface IAppVersion {
|
||||
|
@ -311,18 +312,26 @@ interface IMihomoTunConfig {
|
|||
}
|
||||
interface IMihomoDNSConfig {
|
||||
enable?: boolean
|
||||
listen?: string
|
||||
ipv6?: boolean
|
||||
'ipv6-timeout'?: number
|
||||
'prefer-h3'?: boolean
|
||||
'enhanced-mode'?: DnsMode
|
||||
'fake-ip-range'?: string
|
||||
'fake-ip-filter'?: string[]
|
||||
'fake-ip-filter-mode'?: FilterMode
|
||||
'use-hosts'?: boolean
|
||||
'use-system-hosts'?: boolean
|
||||
'respect-rules'?: boolean
|
||||
'default-nameserver'?: string[]
|
||||
nameserver?: string[]
|
||||
fallback?: string[]
|
||||
'fallback-filter'?: { [key: string]: boolean | string | string[] }
|
||||
'proxy-server-nameserver'?: string[]
|
||||
'direct-nameserver'?: string[]
|
||||
'direct-nameserver-follow-policy'?: boolean
|
||||
'nameserver-policy'?: { [key: string]: string | string[] }
|
||||
'cache-algorithm'?: string
|
||||
}
|
||||
|
||||
interface IMihomoSnifferConfig {
|
||||
|
|
Loading…
Reference in New Issue
Block a user