Skip to content

Commit

Permalink
[dotnet] update parameter name to allowedIpAddresses and make whiteli…
Browse files Browse the repository at this point in the history
…stedIpAddresses obsolete
  • Loading branch information
titusfortner committed Jan 30, 2024
1 parent cea0a3c commit e7fb98b
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions dotnet/src/webdriver/Chromium/ChromiumDriverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class ChromiumDriverService : DriverService
private string logPath = string.Empty;
private string urlPathPrefix = string.Empty;
private string portServerAddress = string.Empty;
private string whitelistedIpAddresses = string.Empty;
private string allowedIpAddresses = string.Empty;
private int adbPort = -1;
private bool disableBuildCheck;
private bool enableVerboseLogging;
Expand Down Expand Up @@ -123,10 +123,22 @@ public bool EnableAppendLog
/// connect to this instance of the Chrome driver. Defaults to an empty string,
/// which means only the local loopback address can connect.
/// </summary>
public string WhitelistedIPAddresses
[Obsolete("Use AllowedIpAddresses")]
public string WhitelistedIpAddresses
{
get { return this.whitelistedIpAddresses; }
set { this.whitelistedIpAddresses = value; }
get { return this.allowedIpAddresses; }
set { this.allowedIpAddresses = value; }
}

/// <summary>
/// Gets or sets the comma-delimited list of IP addresses that are approved to
/// connect to this instance of the Chrome driver. Defaults to an empty string,
/// which means only the local loopback address can connect.
/// </summary>
public string AllowedIpAddresses
{
get { return this.allowedIpAddresses; }
set { this.allowedIpAddresses = value; }
}

/// <summary>
Expand Down Expand Up @@ -177,9 +189,9 @@ protected override string CommandLineArguments
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --port-server={0}", this.portServerAddress);
}

if (!string.IsNullOrEmpty(this.whitelistedIpAddresses))
if (!string.IsNullOrEmpty(this.allowedIpAddresses))
{
argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " -whitelisted-ips={0}", this.whitelistedIpAddresses));
argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " -allowed-ips={0}", this.allowedIpAddresses));
}

return argsBuilder.ToString();
Expand Down

0 comments on commit e7fb98b

Please sign in to comment.