Allow binding to specific interface addresses

https://trello.com/c/aWazKGQc/404-allow-binding-to-specified-ip-address
This commit is contained in:
Mike 2014-10-01 14:34:10 -04:00 committed by Mark McDowall
parent 65c1e8852a
commit 5a8ce04bd5
6 changed files with 63 additions and 13 deletions

View file

@ -23,6 +23,7 @@ namespace NzbDrone.Core.Configuration
Dictionary<string, object> GetConfigDictionary();
void SaveConfigDictionary(Dictionary<string, object> configValues);
string BindAddress { get; }
int Port { get; }
int SslPort { get; }
bool EnableSsl { get; }
@ -110,6 +111,22 @@ namespace NzbDrone.Core.Configuration
_eventAggregator.PublishEvent(new ConfigFileSavedEvent());
}
public string BindAddress
{
get
{
const string defaultValue = "*";
string bindAddress = GetValue("BindAddress", defaultValue);
if (string.IsNullOrWhiteSpace(bindAddress))
{
return defaultValue;
}
return bindAddress;
}
}
public int Port
{
get { return GetValueInt("Port", 8989); }