IP detection only relies on duckduck.go
This commit is contained in:
@@ -20,11 +20,10 @@ RUN apk add -q --progress --no-cache --update openvpn unbound ca-certificates &&
|
||||
apk del -q --progress --purge build-dependencies && \
|
||||
rm -rf /*.zip /etc/unbound/unbound.conf /var/cache/apk/*
|
||||
COPY unbound.conf /etc/unbound/unbound.conf
|
||||
HEALTHCHECK --interval=10m --timeout=10s --start-period=10s --retries=2 \
|
||||
CMD VPNCITY=$(wget -qO- -T 2 https://ipinfo.io/city) && \
|
||||
VPNORGANIZATION=$(wget -qO- -T 2 https://ipinfo.io/org) && \
|
||||
echo "City: $VPNCITY | Organization: $VPNORGANIZATION" && \
|
||||
[ "$VPNCITY" != "$CITY" ] && [ "$VPNORGANIZATION" != "$ORGANIZATION" ] || exit 1
|
||||
HEALTHCHECK --interval=10m --timeout=10s --start-period=10s --retries=1 \
|
||||
CMD export OLD_VPN_IP="$NEW_VPN_IP" && \
|
||||
export NEW_VPN_IP=$(wget -qqO- 'https://duckduckgo.com/?q=what+is+my+ip' | grep -ow 'Your IP address is [0-9.]*[0-9]' | grep -ow '[0-9][0-9.]*') && \
|
||||
[ "$NEW_VPN_IP" != "$INITIAL_IP" ] && [ "$NEW_VPN_IP" != "$OLD_VPN_IP" ] || exit 1
|
||||
ENV ENCRYPTION=strong \
|
||||
PROTOCOL=tcp \
|
||||
REGION=Germany
|
||||
|
||||
Reference in New Issue
Block a user