default host

pull/330/merge
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
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ func (v *FreedomConfig) Build() (*serial.TypedMessage, error) {
if err != nil {
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{
Server: &protocol.ServerEndpoint{
Address: v2net.NewIPOrDomain(v2net.ParseAddress(host)),