mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
default host
This commit is contained in:
parent
9462f710a5
commit
b2683a8bf0
@ -34,6 +34,9 @@ func (v *FreedomConfig) Build() (*serial.TypedMessage, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Base(err).Message("Config: Invalid redirect port: ", v.Redirect, ": ", err)
|
return nil, errors.Base(err).Message("Config: Invalid redirect port: ", v.Redirect, ": ", err)
|
||||||
}
|
}
|
||||||
|
if len(host) == 0 {
|
||||||
|
host = "127.0.0.1"
|
||||||
|
}
|
||||||
config.DestinationOverride = &freedom.DestinationOverride{
|
config.DestinationOverride = &freedom.DestinationOverride{
|
||||||
Server: &protocol.ServerEndpoint{
|
Server: &protocol.ServerEndpoint{
|
||||||
Address: v2net.NewIPOrDomain(v2net.ParseAddress(host)),
|
Address: v2net.NewIPOrDomain(v2net.ParseAddress(host)),
|
||||||
|
Loading…
Reference in New Issue
Block a user