documentation: Fix missing hosts DNS server

This commit is contained in:
世界
2025-02-24 18:17:11 +08:00
parent 9b5d9588ab
commit e16c021308
3 changed files with 74 additions and 1 deletions

View File

@@ -2,12 +2,14 @@ package hosts
import (
"context"
"os"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/dns"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/service/filemanager"
mDNS "github.com/miekg/dns"
)
@@ -29,7 +31,7 @@ func NewTransport(ctx context.Context, logger log.ContextLogger, tag string, opt
files = append(files, NewFile(DefaultPath))
} else {
for _, path := range options.Path {
files = append(files, NewFile(path))
files = append(files, NewFile(filemanager.BasePath(ctx, os.ExpandEnv(path))))
}
}
return &Transport{