chore: modify some fields

This commit is contained in:
xishang0128 2023-11-30 21:12:30 +08:00
parent 8f61b0e180
commit 78ae8815c2
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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 选择记录