Verified Commit 4b4d8e18 authored by Clara Engler's avatar Clara Engler
Browse files

Expand the test for HTTP proxies

parent e39d884b
Loading
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@ set -o xtrace
# Check environment variables.
test "$(${ONIUX} bash -c 'echo $ALL_PROXY')" = "socks5h://localhost:9050"
test "$(${ONIUX} --proxy socks5 bash -c 'echo $ALL_PROXY')" = "socks5h://localhost:9050"
test "$(${ONIUX} --proxy http bash -c 'echo $ALL_PROXY')" = "http://localhost:9050"
test "$(${ONIUX} --proxy-port 8080 bash -c 'echo $ALL_PROXY')" = "socks5h://localhost:8080"
test "$(${ONIUX} --proxy socks5 --proxy-port 8080 bash -c 'echo $ALL_PROXY')" = "socks5h://localhost:8080"
test "$(${ONIUX} --proxy http --proxy-port 8080 bash -c 'echo $ALL_PROXY')" = "http://localhost:8080"
test "$(${ONIUX} --proxy none bash -c 'echo $ALL_PROXY')" = ""
test "$(${ONIUX} --proxy none --proxy-port 8080 bash -c 'echo $ALL_PROXY')" = ""

@@ -49,5 +51,15 @@ curl -sSf6 "https://check.torproject.org/api/ip" | jq -e ".IsTor == true"
curl -sSf4 "http://${TPO_ONION}" | wc -c
curl -sSf6 "http://${TPO_ONION}" | wc -c
:
${ONIUX} --proxy http bash <<:
set -euo pipefail
set -o xtrace
curl -sSf "https://check.torproject.org/api/ip" | jq -e ".IsTor == true"
curl -sSf "http://${TPO_ONION}" | wc -c
curl -sSf4 "https://check.torproject.org/api/ip" | jq -e ".IsTor == true"
curl -sSf6 "https://check.torproject.org/api/ip" | jq -e ".IsTor == true"
curl -sSf4 "http://${TPO_ONION}" | wc -c
curl -sSf6 "http://${TPO_ONION}" | wc -c
:
${ONIUX} --proxy none curl -sSf4 "https://check.torproject.org/api/ip" | jq -e ".IsTor == true"
${ONIUX} --proxy-port 0 curl -sSf "http://${TPO_ONION}" | wc -c