1
0
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:
Darien Raymond 2017-01-26 23:09:46 +01:00
parent 9462f710a5
commit b2683a8bf0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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)),