@@ -38,6 +38,7 @@ public sealed class InternetExplorerDriverService : DriverService
38
38
private string host = string . Empty ;
39
39
private string logFile = string . Empty ;
40
40
private string libraryExtractionPath = string . Empty ;
41
+ private string whitelistedIpAddresses = string . Empty ;
41
42
42
43
/// <summary>
43
44
/// Initializes a new instance of the <see cref="InternetExplorerDriverService"/> class.
@@ -101,6 +102,17 @@ public string LibraryExtractionPath
101
102
set { this . libraryExtractionPath = value ; }
102
103
}
103
104
105
+ /// <summary>
106
+ /// Gets or sets the comma-delimited list of IP addresses that are approved to
107
+ /// connect to this instance of the IEDriverServer. Defaults to an empty string,
108
+ /// which means only the local loopback address can connect.
109
+ /// </summary>
110
+ public string WhitelistedIPAddresses
111
+ {
112
+ get { return this . whitelistedIpAddresses ; }
113
+ set { this . whitelistedIpAddresses = value ; }
114
+ }
115
+
104
116
/// <summary>
105
117
/// Gets the command-line arguments for the driver service.
106
118
/// </summary>
@@ -134,6 +146,11 @@ protected override string CommandLineArguments
134
146
argsBuilder . Append ( string . Format ( CultureInfo . InvariantCulture , " -implementation={0}" , this . engineImplementation . ToString ( ) . ToUpperInvariant ( ) ) ) ;
135
147
}
136
148
149
+ if ( ! string . IsNullOrEmpty ( this . whitelistedIpAddresses ) )
150
+ {
151
+ argsBuilder . Append ( string . Format ( CultureInfo . InvariantCulture , " -whitelisted-ips={0}" , this . whitelistedIpAddresses ) ) ;
152
+ }
153
+
137
154
if ( this . SuppressInitialDiagnosticInformation )
138
155
{
139
156
argsBuilder . Append ( " -silent" ) ;
0 commit comments