Skip to content

Commit eed161c

Browse files
authored
Allow non-local connections.
Allow non-local connections. Adding the .withAllowLocalOnly(false) call configures this proxy server to be more similar to the prior v0_5 configuration. That is it: 1) No longer listens only on 127.0.0.1, required for this test to pass on machines that are IPv6-only 2) Allows connections from a another machine where localhost would otherwise resolve to the browser machine rather than the machine the proxy server runs on (required for running the proxy server on the host and the browser under test on a VM).
1 parent 88e08c8 commit eed161c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/client/test/org/openqa/selenium/testing/ProxyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ProxyServer() {
4646
String address = new NetworkUtils().getPrivateLocalAddress();
4747
baseUrl = String.format("%s:%d", address, port);
4848

49-
proxyServer = DefaultHttpProxyServer.bootstrap().withPort(port)
49+
proxyServer = DefaultHttpProxyServer.bootstrap().withAllowLocalOnly(false).withPort(port)
5050
.withFiltersSource(new HttpFiltersSourceAdapter() {
5151
public HttpFilters filterRequest(HttpRequest originalRequest, ChannelHandlerContext ctx) {
5252
return new HttpFiltersAdapter(originalRequest) {

0 commit comments

Comments
 (0)