mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-06 13:27:37 +03:00
Fix create UDP DNS transport from plain IPv6 address
This commit is contained in:
parent
044f9c5d4f
commit
23a35b3c06
3 changed files with 26 additions and 26 deletions
route
|
@ -175,11 +175,11 @@ func NewRouter(ctx context.Context, logFactory log.Factory, options option.Route
|
|||
switch server.Address {
|
||||
case "local", "rcode":
|
||||
default:
|
||||
serverURL, err := url.Parse(server.Address)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
serverURL, _ := url.Parse(server.Address)
|
||||
var serverAddress string
|
||||
if serverURL != nil {
|
||||
serverAddress = serverURL.Hostname()
|
||||
}
|
||||
serverAddress := serverURL.Hostname()
|
||||
if serverAddress == "" {
|
||||
serverAddress = server.Address
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue