chore: modify some fields
This commit is contained in:
parent
8f61b0e180
commit
78ae8815c2
2 changed files with 3 additions and 3 deletions
|
@ -927,9 +927,9 @@ func parseHosts(cfg *RawConfig) (*trie.DomainTrie[resolver.HostValue], error) {
|
||||||
|
|
||||||
if len(cfg.Hosts) != 0 {
|
if len(cfg.Hosts) != 0 {
|
||||||
for domain, anyValue := range cfg.Hosts {
|
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 {
|
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 {
|
} else {
|
||||||
ips := make([]netip.Addr, 0)
|
ips := make([]netip.Addr, 0)
|
||||||
for _, addr := range addrs {
|
for _, addr := range addrs {
|
||||||
|
|
|
@ -78,7 +78,7 @@ hosts:
|
||||||
# '.dev': 127.0.0.1
|
# '.dev': 127.0.0.1
|
||||||
# 'alpha.mihomo.dev': '::1'
|
# 'alpha.mihomo.dev': '::1'
|
||||||
# test.com: [1.1.1.1, 2.2.2.2]
|
# test.com: [1.1.1.1, 2.2.2.2]
|
||||||
# mihomo.lan: mihomo # mihomo 为特别字段,将加入本地所有网卡的地址
|
# home.lan: lan # lan 为特别字段,将加入本地所有网卡的地址
|
||||||
# baidu.com: google.com # 只允许配置一个别名
|
# baidu.com: google.com # 只允许配置一个别名
|
||||||
|
|
||||||
profile: # 存储 select 选择记录
|
profile: # 存储 select 选择记录
|
||||||
|
|
Loading…
Reference in a new issue