mirror of
https://github.com/bol-van/zapret.git
synced 2025-06-29 18:21:16 +00:00
Support curl compiled without IPv6 support.
modified: blockcheck.sh
This commit is contained in:
parent
09c07f6d21
commit
643fc0c456
@ -635,7 +635,11 @@ curl_with_subst_ip()
|
|||||||
# $2 - port
|
# $2 - port
|
||||||
# $3 - ip
|
# $3 - ip
|
||||||
# $4+ - curl params
|
# $4+ - curl params
|
||||||
local connect_to="--connect-to $1::[$3]${2:+:$2}" arg
|
local ip="$3"
|
||||||
|
case "$ip" in
|
||||||
|
*:*) ip="[$ip]" ;;
|
||||||
|
esac
|
||||||
|
local connect_to="--connect-to $1::$ip${2:+:$2}" arg
|
||||||
shift ; shift ; shift
|
shift ; shift ; shift
|
||||||
[ "$CURL_VERBOSE" = 1 ] && arg="-v"
|
[ "$CURL_VERBOSE" = 1 ] && arg="-v"
|
||||||
[ "$CURL_CMD" = 1 ] && echo $CURL ${arg:+$arg }$connect_to "$@"
|
[ "$CURL_CMD" = 1 ] && echo $CURL ${arg:+$arg }$connect_to "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user