Skip to content

Commit de072ef

Browse files
committed
add proxy auth #fix 6
1 parent fc5a8a6 commit de072ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rootfs/bin/check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#ret=$(curl -s http://ip-api.com/json | jq '.countryCode' | tr '[:upper:]' '[:lower:]' | tr -d '"'| grep "$COUNTRY" | wc -l)
3-
ret=$(curl -s --proxy localhost:8888 https://ifconfig.io/country_code | tr '[:upper:]' '[:lower:]' | tr -d '"'| grep "$COUNTRY" | wc -l)
3+
ret=$(curl --proxy-anyauth --proxy-user "$PROXY_USER:$PROXY_PASS" -s --proxy localhost:8888 https://ifconfig.io/country_code | tr '[:upper:]' '[:lower:]' | tr -d '"'| grep "$COUNTRY" | wc -l)
44
if [ $ret -eq 1 ]; then
55
exit 0
66
else

0 commit comments

Comments
 (0)