From issues-return-66121-archive-asf-public=cust-asf.ponee.io@commons.apache.org Sat Jan 27 02:34:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 38DFA180657 for ; Sat, 27 Jan 2018 02:34:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 28D1E160C50; Sat, 27 Jan 2018 01:34:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7289B160C2E for ; Sat, 27 Jan 2018 02:34:03 +0100 (CET) Received: (qmail 52195 invoked by uid 500); 27 Jan 2018 01:34:02 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 52184 invoked by uid 99); 27 Jan 2018 01:34:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jan 2018 01:34:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EA883180224 for ; Sat, 27 Jan 2018 01:34:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.31 X-Spam-Level: X-Spam-Status: No, score=-110.31 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3wCiHgnx5T-X for ; Sat, 27 Jan 2018 01:34:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B5EB95F177 for ; Sat, 27 Jan 2018 01:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4830EE006D for ; Sat, 27 Jan 2018 01:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 077DA240EA for ; Sat, 27 Jan 2018 01:34:00 +0000 (UTC) Date: Sat, 27 Jan 2018 01:34:00 +0000 (UTC) From: "Matthew McGillis (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NET-650) IMAPClient over proxy doesn't properly resolve DNS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341887#comment-16341887 ] Matthew McGillis commented on NET-650: -------------------------------------- If InetSocketAddress acts as I have indicated then if someone wants to add the feature of using a local mapping over a remote mapping they can easily add it simply by passing the connect the locally mapped name. InetSocketAddress simply passes IP's through as does the proxy so its easy to do on top of a InetSocketAddress base. However without InetSocketAddress we have no way to get a remote name properly resolved. So I think this could be very close it would be interesting to see if just making this InetSocketAddress change in the Common-Net socket code passes all existing tests. If it does then it fixes this bug at no cost to any existing functionality. > IMAPClient over proxy doesn't properly resolve DNS > -------------------------------------------------- > > Key: NET-650 > URL: https://issues.apache.org/jira/browse/NET-650 > Project: Commons Net > Issue Type: Bug > Components: IMAP > Affects Versions: 3.6 > Reporter: Matthew McGillis > Priority: Major > Attachments: imapproxy.java, imapproxy2.java, socketproxy.java > > > IMAPClient when configured to use a socks proxy is not able to resolve DNS names through the proxy. > See attached sample code, if I use it with: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp .:./commons-net-3.6.jar imapproxy imap.server.test.com user1 userpass > connect error: java.net.UnknownHostException: imap.server.test.com: unknown error > {noformat} > vs if I use it with the appropriate IP: > {noformat} > $ java -DsocksProxyHost=localhost -DsocksProxyPort=16003 -cp .:./commons-net-3.6.jar imapproxy 10.250.3.127 user1 userpass > * OK IMAP4rev1 proxy server ready > IMAP: 10.250.3.127 143 > AAAA LOGIN ******* > AAAA OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed > AAAB LOGOUT > * BYE 10.250.3.127 Zimbra IMAP4rev1 server closing connection > AAAB OK LOGOUT completed > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)