mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 13:14:46 +02:00

* We need a SOCKS proxy to support fetching from git:// or ssh:// URLs within the container, so add an option to specify it * It's possible for the http and https proxy settings to be the same, so set one from the other if only one of them is set. * If we want to be able to fetch from internal servers inside the proxy then we also need a "no-proxy" list, so add support for that. * It's not unlikely that machines within networks requiring use of a proxy for external network access will have all of the proxy settings set in the environment, so we can try to pick up the defaults from there. * Ensure that we can switch from proxy to no proxy (when reinstalling) which means we always need to edit the config files and ensure the proxy options get commented out if we don't want them set. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
21 lines
439 B
Bash
Executable File
21 lines
439 B
Bash
Executable File
#!/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 $*
|