Commit 4ce06678 authored by Dominika Liberda's avatar Dominika Liberda 💽
Browse files

* proxying now uses curl instead of ncat

parent 46e77541
Pipeline #400 failed with stage
in 14 seconds
......@@ -9,20 +9,16 @@ host="$(sed -E 's@http(s|)://@@;s@/.*@@' <<< "$url")"
headers="$(tr '\r' '\n' <<< "${r[req_headers]}")"
headers+=$'\n'
while read line; do
if [[ "$line" == "GET"* ]]; then
if [[ "$url" == *"$host" ]]; then
echo "GET / HTTP/1.1"
else
echo "GET /$(sed -E 's@http(s|)://@@;s@/@��Lun4_iS_CuTe�@;s@.*��Lun4_iS_CuTe�@@' <<< "$url") HTTP/1.1"
fi
elif [[ "$line" == *"Host"* ]]; then
echo "Host: $url" | sed -E 's@http(s|)://@@;s@/.*@@'
else
echo "$line"
if [[ "$line" != "GET"* && "$line" != "Host:"* && "$line" != '' ]]; then
params+="-H '$line' "
fi
done <<< "$headers" | if [[ "$url" == "https"* ]]; then
nc $host 443 --ssl -C -i 0.1 --no-shutdown
else
nc $host 80 -C -i 0.1 --no-shutdown
fi
done <<< "$headers"
curl -v --http1.1 "$url" "$params" -D /dev/stdout | grep -aiv "Transfer-Encoding: chunked"
#if [[ "$url" == "https"* ]]; then
#nc $host 443 --ssl -C -i 0.1 --no-shutdown
#else
#nc $host 80 -C -i 0.1 --no-shutdown
#fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment