From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Cc: "André Draszik" <adraszik@tycoint.com>
Subject: [PATCH 1/2] oe-git-proxy: also check all_proxy and http_proxy env variables
Date: Wed, 23 Mar 2016 10:47:04 +0100 [thread overview]
Message-ID: <1458726425-24672-2-git-send-email-git@andred.net> (raw)
In-Reply-To: <1458726425-24672-1-git-send-email-git@andred.net>
From: André Draszik <adraszik@tycoint.com>
Signed-off-by: André Draszik <adraszik@tycoint.com>
---
scripts/oe-git-proxy | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index d2e9f92..38ce7b6 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -1,10 +1,12 @@
#!/bin/bash
# oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat
-# to make SOCKS5 or HTTPS proxy connections. It uses ALL_PROXY to determine the
-# proxy server, protocol, and port. It uses NO_PROXY to skip using the proxy for
-# a comma delimited list of hosts, host globs (*.example.com), IPs, or CIDR
-# masks (192.168.1.0/24). It is known to work with both bash and dash shells.
+# to make SOCKS5 or HTTPS proxy connections.
+# It uses ALL_PROXY or all_proxy or http_proxy to determine the proxy server,
+# protocol, and port.
+# It uses NO_PROXY to skip using the proxy for a comma delimited list of
+# hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24). It
+# is known to work with both bash and dash shells.
#
# Example ALL_PROXY values:
# ALL_PROXY=socks://socks.example.com:1080
@@ -99,6 +101,9 @@ match_host() {
# If no proxy is set or needed, just connect directly
METHOD="TCP:$1:$2"
+[ -z "${ALL_PROXY}" ] && ALL_PROXY=$all_proxy
+[ -z "${ALL_PROXY}" ] && ALL_PROXY=$http_proxy
+
if [ -z "$ALL_PROXY" ]; then
exec $SOCAT STDIO $METHOD
fi
--
2.8.0.rc3
next prev parent reply other threads:[~2016-03-23 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 9:47 [PATCH 0/2] oe-git-proxy updates André Draszik
2016-03-23 9:47 ` André Draszik [this message]
2016-03-23 9:47 ` [PATCH 2/2] oe-git-proxy: support username / password in http proxy André Draszik
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=1458726425-24672-2-git-send-email-git@andred.net \
--to=git@andred.net \
--cc=adraszik@tycoint.com \
--cc=openembedded-core@lists.openembedded.org \
/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