diff options
Diffstat (limited to 'scripts/oe-git-proxy')
-rwxr-xr-x | scripts/oe-git-proxy | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy index d2e9f925b7..38ce7b66fd 100755 --- a/scripts/oe-git-proxy +++ b/scripts/oe-git-proxy | |||
@@ -1,10 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | # oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat | 3 | # oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat |
4 | # to make SOCKS5 or HTTPS proxy connections. It uses ALL_PROXY to determine the | 4 | # to make SOCKS5 or HTTPS proxy connections. |
5 | # proxy server, protocol, and port. It uses NO_PROXY to skip using the proxy for | 5 | # It uses ALL_PROXY or all_proxy or http_proxy to determine the proxy server, |
6 | # a comma delimited list of hosts, host globs (*.example.com), IPs, or CIDR | 6 | # protocol, and port. |
7 | # masks (192.168.1.0/24). It is known to work with both bash and dash shells. | 7 | # It uses NO_PROXY to skip using the proxy for a comma delimited list of |
8 | # hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24). It | ||
9 | # is known to work with both bash and dash shells. | ||
8 | # | 10 | # |
9 | # Example ALL_PROXY values: | 11 | # Example ALL_PROXY values: |
10 | # ALL_PROXY=socks://socks.example.com:1080 | 12 | # ALL_PROXY=socks://socks.example.com:1080 |
@@ -99,6 +101,9 @@ match_host() { | |||
99 | # If no proxy is set or needed, just connect directly | 101 | # If no proxy is set or needed, just connect directly |
100 | METHOD="TCP:$1:$2" | 102 | METHOD="TCP:$1:$2" |
101 | 103 | ||
104 | [ -z "${ALL_PROXY}" ] && ALL_PROXY=$all_proxy | ||
105 | [ -z "${ALL_PROXY}" ] && ALL_PROXY=$http_proxy | ||
106 | |||
102 | if [ -z "$ALL_PROXY" ]; then | 107 | if [ -z "$ALL_PROXY" ]; then |
103 | exec $SOCAT STDIO $METHOD | 108 | exec $SOCAT STDIO $METHOD |
104 | fi | 109 | fi |