--- old/src/java.net.http/share/classes/jdk/internal/net/http/HttpConnection.java 2021-04-20 09:54:34.190783078 +0200 +++ new/src/java.net.http/share/classes/jdk/internal/net/http/HttpConnection.java 2021-04-20 09:54:34.094780910 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -136,6 +136,14 @@ */ abstract boolean isProxied(); + /** + * Returns the address of the proxy used by this connection. + * Returns the proxy address for tunnel connections, or + * clear connection to any host through proxy. + * Returns {@code null} otherwise. + */ + abstract InetSocketAddress proxy(); + /** Tells whether, or not, this connection is open. */ final boolean isOpen() { return channel().isOpen() &&