From: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
To: <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: [RFC 0/3] imap-send curl tunnelling support
Date: Wed, 9 Aug 2017 16:43:26 +0200 [thread overview]
Message-ID: <ab866314-608b-eaca-b335-12cffe165526@morey-chaisemartin.com> (raw)
From 7.21.5, curl can be tricked into using an open fd.
This series uses this to allow using curl over a tunnel.
I have a few doubt on patch #2:
- is socketpair working on all git supported system (windows ?)
- should socketpair always be used or limited to the curl over tunnel case ?
I don't think there is too much different between an unname pipe and a socketpair but I'm not sure either :)
This series also shows a "bug" in curl.
When trying out the tunnel example fro imap-send documentation, this happends:
Starting tunnel 'ssh -q -C localhost /usr/sbin/imapd ./Maildir'... ok
sending 3 messages
16:38:54.055221 http.c:639 == Info: Hostname was NOT found in DNS cache
16:38:54.059505 http.c:639 == Info: Trying ::1...
16:38:54.059545 http.c:639 == Info: Connected to localhost () port 143 (#0)
16:38:54.354379 http.c:586 <= Recv header, 0000000332 bytes (0x0000014c)
16:38:54.354405 http.c:598 <= Recv header: * PREAUTH [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] Pre-authenticated user nmorey portia.home.nicolas.morey-chaisemartin.com IMAP4rev1 2007e.404 at Wed, 9 Aug 2017 16:38:54 +0200 (CEST)
16:38:54.354425 http.c:639 == Info: Bad tagged response
16:38:54.354448 http.c:639 == Info: Closing connection 0
curl_easy_perform() failed: FTP: weird server reply
It appears curl do not support the PREAUTH tag.
However a test with "nc imap.server.ext 143" is working fine.
Nicolas Morey-Chaisemartin (3):
imap-send: move tunnel setup to its own function
imap-send: use a socketpair instead of pipe to communicate with the
tunnel
imap_send: add support for curl over tunnel
Documentation/git-imap-send.txt | 4 +-
imap-send.c | 91 +++++++++++++++++++++++++++++++----------
2 files changed, 72 insertions(+), 23 deletions(-)
next reply other threads:[~2017-08-09 14:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 14:43 Nicolas Morey-Chaisemartin [this message]
2017-08-09 14:46 ` [RFC 1/3] imap-send: move tunnel setup to its own function Nicolas Morey-Chaisemartin
2017-08-09 14:46 ` [RFC 2/3] imap-send: use a socketpair instead of pipe to communicate with the tunnel Nicolas Morey-Chaisemartin
2017-08-09 14:46 ` [RFC 3/3] imap_send: add support for curl over tunnel Nicolas Morey-Chaisemartin
2017-08-15 17:49 ` [RFC 0/3] imap-send curl tunnelling support Nicolas Morey-Chaisemartin
2017-08-15 18:18 ` Stefan Beller
2017-08-16 12:30 ` Johannes Schindelin
2017-08-21 7:27 ` Nicolas Morey-Chaisemartin
2017-08-22 17:10 ` Johannes Sixt
2017-08-22 18:22 ` Nicolas Morey-Chaisemartin
2017-08-23 22:35 ` Johannes Schindelin
2017-08-16 8:34 ` Jeff King
2017-08-21 7:34 ` Nicolas Morey-Chaisemartin
2017-08-23 21:43 ` Jeff King
2017-08-24 8:00 ` Nicolas Morey-Chaisemartin
2017-08-24 13:53 ` Jeff King
2017-08-24 14:02 ` Daniel Stenberg
2017-08-24 14:30 ` Jeff King
2017-08-24 21:22 ` Daniel Stenberg
2017-08-24 14:15 ` Nicolas Morey-Chaisemartin
2017-08-24 14:28 ` Jeff King
[not found] ` <7ee8331d-e154-7539-e000-4087406f39fa@suse.de>
2017-08-16 8:39 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab866314-608b-eaca-b335-12cffe165526@morey-chaisemartin.com \
--to=nicolas@morey-chaisemartin.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).