Lines Matching +full:host +full:- +full:port

3 # oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat
6 # protocol, and port.
8 # hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24). It
17 # SPDX-License-Identifier: GPL-2.0-only
23 set -f
25 if [ $# -lt 2 -o "$1" = '--help' -o "$1" = '-h' ] ; then
26 echo 'oe-git-proxy: error: the following arguments are required: host port'
27 echo 'Usage: oe-git-proxy host port'
29 echo 'OpenEmbedded git-proxy - a simple tool to be used via GIT_PROXY_COMMAND.'
31 echo 'It uses ALL_PROXY to determine the proxy server, protocol, and port.'
33 echo 'of hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24).'
37 echo ' host proxy host to use'
38 echo ' port proxy port to use'
41 echo ' -h, --help show this help message and exit'
47 if [ -z "$SOCAT" ]; then
49 if [ $? -ne 0 ]; then
58 …$1 | egrep -q "^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]…
69 SHIFT=$(($SHIFT-8))
79 if [ -z "${IP%%$CIDR}" ]; then
86 if [ -z "$BITS" ]; then
94 for i in $(seq 0 $((32-$BITS))); do
99 if [ $IPVAL -eq $IP2VAL ]; then
105 # Test to see if GLOB matches HOST
107 HOST=$1
110 if [ -z "${HOST%%*$GLOB}" ]; then
116 for HOST_IP in $(getent ahostsv4 $HOST | grep ' STREAM ' | cut -d ' ' -f 1) ; do
119 if [ $? -eq 0 ]; then
132 [ -z "${ALL_PROXY}" ] && ALL_PROXY=$all_proxy
133 [ -z "${ALL_PROXY}" ] && ALL_PROXY=$http_proxy
135 if [ -z "$ALL_PROXY" ]; then
146 # Proxy is necessary, determine protocol, server, and port
151 # extract host & port parts:
156 # 3) extract optional port
157 PORT=${PROXY##*:}
158 if [ "$PORT" = "$PROXY" ]; then
159 PORT=""
161 # 4) remove port
167 [ -n "${PROXYAUTH}" ] && PROXYAUTH=",proxyauth=${PROXYAUTH}"
170 if [ -z "$PORT" ]; then
171 PORT="1080"
173 METHOD="SOCKS4A:$PROXY:$1:$2,socksport=$PORT"
175 if [ -z "$PORT" ]; then
176 PORT="1080"
178 METHOD="SOCKS4:$PROXY:$1:$2,socksport=$PORT"
181 if [ -z "$PORT" ]; then
182 PORT="8080"
184 METHOD="PROXY:$PROXY:$1:$2,proxyport=${PORT}${PROXYAUTH}"