aboutsummaryrefslogtreecommitdiffstats
path: root/docker/git-proxy
blob: 6a6a52692b241a8970de29f069ceba1d95921798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# This simple proxy script (for git) resides at /opt/bin in the layersapp
# container. If you use it, uncomment the appropriate line in .gitproxy
# this method has been tested using a socks proxy
PROXY=your.proxy.server
PORT=portnumber

case $1 in
    ## NO_PROXY
    )
        METHOD="-X connect"
        ;;
    *)
        METHOD="-X 5 -x ${PROXY}:${PORT}"
        ;;
esac

# BSD netcat is used to connect
/bin/nc $METHOD $*