mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
chore: modify some fields
This commit is contained in:
parent
8f61b0e180
commit
78ae8815c2
|
@ -927,9 +927,9 @@ func parseHosts(cfg *RawConfig) (*trie.DomainTrie[resolver.HostValue], error) {
|
|||
|
||||
if len(cfg.Hosts) != 0 {
|
||||
for domain, anyValue := range cfg.Hosts {
|
||||
if str, ok := anyValue.(string); ok && str == "mihomo" {
|
||||
if str, ok := anyValue.(string); ok && str == "lan" {
|
||||
if addrs, err := net.InterfaceAddrs(); err != nil {
|
||||
log.Errorln("insert mihomo to host error: %s", err)
|
||||
log.Errorln("insert lan to host error: %s", err)
|
||||
} else {
|
||||
ips := make([]netip.Addr, 0)
|
||||
for _, addr := range addrs {
|
||||
|
|
|
@ -78,7 +78,7 @@ hosts:
|
|||
# '.dev': 127.0.0.1
|
||||
# 'alpha.mihomo.dev': '::1'
|
||||
# test.com: [1.1.1.1, 2.2.2.2]
|
||||
# mihomo.lan: mihomo # mihomo 为特别字段,将加入本地所有网卡的地址
|
||||
# home.lan: lan # lan 为特别字段,将加入本地所有网卡的地址
|
||||
# baidu.com: google.com # 只允许配置一个别名
|
||||
|
||||
profile: # 存储 select 选择记录
|
||||
|
|
Loading…
Reference in New Issue
Block a user