From issues-return-66099-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Jan 26 23:30: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 C8ABF180657 for ; Fri, 26 Jan 2018 23:30:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B897E160C50; Fri, 26 Jan 2018 22:30: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 097AC160C2E for ; Fri, 26 Jan 2018 23:30:03 +0100 (CET) Received: (qmail 58309 invoked by uid 500); 26 Jan 2018 22:30:03 -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 58297 invoked by uid 99); 26 Jan 2018 22:30:03 -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; Fri, 26 Jan 2018 22:30:03 +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 8EF0018019E for ; Fri, 26 Jan 2018 22:30:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 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, 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 FWgJwA4VkwIO for ; Fri, 26 Jan 2018 22:30: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 2703860D3A for ; Fri, 26 Jan 2018 22:30:01 +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 A0D98E00B5 for ; Fri, 26 Jan 2018 22:30: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 36A61240F2 for ; Fri, 26 Jan 2018 22:30:00 +0000 (UTC) Date: Fri, 26 Jan 2018 22:30: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: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-650?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1634170= 6#comment-16341706 ]=20 Matthew McGillis commented on NET-650: -------------------------------------- This would be an outline of a test case you might want to setup up or figur= e out how to build in to a regression test: 1. Consider two hosts A and B 2. Setup the host file on A so it only knows host B=C2=A0as say: test.doma= in.com 3. Setup the host file on B so it only knows it self as say: proxy.domain.= com 4. Confirm ping proxy.domain.com from A fails on host lookup 5. From A ssh to B creating a socks proxy {code:java} $ ssh -D localhost:16000 test.domain.com {code} 6. now run the socketproxy.java on A {code:java} $ java -DsocksProxyHost=3Dlocalhost -DsocksProxyPort=3D16000 socketproxy pr= oxy.domain.com {code} As socketproxy is currently written you would need something listening on t= he imap port of host B so it returns something when connected to so you can= see that the above works. But you can replace the port number in socketpro= xy to anything that will respond. In the above since ssh is on B to support= the socks proxy you could use the ssh port which when you connect should r= eturn something like: $ nc localhost 22 SSH-2.0-OpenSSH_7.6 > 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 DN= S names through the proxy. > See attached sample code, if I use it with: > {noformat} > $ java -DsocksProxyHost=3Dlocalhost -DsocksProxyPort=3D16003 -cp .:./comm= ons-net-3.6.jar imapproxy imap.server.test.com user1 userpass > connect error: java.net.UnknownHostException: imap.server.test.com: unkno= wn error > {noformat} > vs if I use it with the appropriate IP: > {noformat} > $ java -DsocksProxyHost=3Dlocalhost -DsocksProxyPort=3D16003 -cp .:./comm= ons-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 ENAB= LE ESEARCH ESORT I18NLEVEL=3D1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ L= OGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=3Dektx SASL-IR SE= ARCHRES SORT THREAD=3DORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN c= ompleted > 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)