mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 07:26:24 -05:00
parse vnext address as ip
This commit is contained in:
parent
b9475730fd
commit
29dcb433cf
@ -2,6 +2,7 @@ package vmess
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"net"
|
||||||
|
|
||||||
"github.com/v2ray/v2ray-core"
|
"github.com/v2ray/v2ray-core"
|
||||||
"github.com/v2ray/v2ray-core/log"
|
"github.com/v2ray/v2ray-core/log"
|
||||||
@ -43,8 +44,12 @@ func (config VNextConfig) ToVNextServer() VNextServer {
|
|||||||
}
|
}
|
||||||
users = append(users, vuser)
|
users = append(users, vuser)
|
||||||
}
|
}
|
||||||
|
ip := net.ParseIP(config.Address)
|
||||||
|
if ip == nil {
|
||||||
|
panic(log.Error("Unable to parse VNext IP: %s", config.Address))
|
||||||
|
}
|
||||||
return VNextServer{
|
return VNextServer{
|
||||||
v2net.DomainAddress(config.Address, config.Port),
|
v2net.IPAddress(ip, config.Port),
|
||||||
users}
|
users}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user