]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-git-proxy: Allow socks4 as protocol in $ALL_PROXY
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 18 Sep 2015 10:46:06 +0000 (12:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Sep 2015 14:20:10 +0000 (15:20 +0100)
The current default is to use SOCKS4a when socks is specified as
protocol in $ALL_PROXY. However, not all socks servers support
SOCKS4a. By allowing socks4 as an additional protocol, this script
will happily work with SOCKS4 only servers.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-git-proxy

index b971c88ec51713ef27419d783f47c42dbd81ff20..d2e9f925b79b96e20d10e9b568a01cfef76a4cf8 100755 (executable)
@@ -120,11 +120,16 @@ if [ "$PORT" = "$ALL_PROXY" ]; then
        PORT=""
 fi
 
-if [ "$PROTO" = "socks" ]; then
+if [ "$PROTO" = "socks" ] || [ "$PROTO" = "socks4a" ]; then
        if [ -z "$PORT" ]; then
                PORT="1080"
        fi
        METHOD="SOCKS4A:$PROXY:$1:$2,socksport=$PORT"
+elif [ "$PROTO" = "socks4" ]; then
+       if [ -z "$PORT" ]; then
+               PORT="1080"
+       fi
+       METHOD="SOCKS4:$PROXY:$1:$2,socksport=$PORT"
 else
        # Assume PROXY (http, https, etc)
        if [ -z "$PORT" ]; then