@@ -38,6 +38,7 @@ public sealed class InternetExplorerDriverService : DriverService
3838 private string host = string . Empty ;
3939 private string logFile = string . Empty ;
4040 private string libraryExtractionPath = string . Empty ;
41+ private string whitelistedIpAddresses = string . Empty ;
4142
4243 /// <summary>
4344 /// Initializes a new instance of the <see cref="InternetExplorerDriverService"/> class.
@@ -101,6 +102,17 @@ public string LibraryExtractionPath
101102 set { this . libraryExtractionPath = value ; }
102103 }
103104
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+
104116 /// <summary>
105117 /// Gets the command-line arguments for the driver service.
106118 /// </summary>
@@ -134,6 +146,11 @@ protected override string CommandLineArguments
134146 argsBuilder . Append ( string . Format ( CultureInfo . InvariantCulture , " -implementation={0}" , this . engineImplementation . ToString ( ) . ToUpperInvariant ( ) ) ) ;
135147 }
136148
149+ if ( ! string . IsNullOrEmpty ( this . whitelistedIpAddresses ) )
150+ {
151+ argsBuilder . Append ( string . Format ( CultureInfo . InvariantCulture , " -whitelisted-ips={0}" , this . whitelistedIpAddresses ) ) ;
152+ }
153+
137154 if ( this . SuppressInitialDiagnosticInformation )
138155 {
139156 argsBuilder . Append ( " -silent" ) ;
0 commit comments