mirror of https://github.com/OpenVidu/openvidu.git
deployment: Try to autodiscover Public IP via HTTP if DNS outgoing traffic is not enabled
parent
e6b4f23fcf
commit
3a59b7b921
|
@ -2,7 +2,7 @@ FROM coturn/coturn:4.5.2-alpine
|
|||
|
||||
USER root
|
||||
|
||||
RUN apk add --no-cache bind-tools grep
|
||||
RUN apk add --no-cache bind-tools grep curl
|
||||
|
||||
# Override detect-external-ip.sh script
|
||||
COPY ./detect-external-ip.sh /usr/local/bin/detect-external-ip.sh
|
||||
|
|
|
@ -85,7 +85,8 @@ if [ "$CFG_IPV4" = "true" ]; then
|
|||
COMMANDS='dig @resolver1.opendns.com myip.opendns.com A -4 +short
|
||||
dig @ns1.google.com o-o.myaddr.l.google.com TXT -4 +short | tr -d \"
|
||||
dig @1.1.1.1 whoami.cloudflare TXT CH -4 +short | tr -d \"
|
||||
dig @ns1-1.akamaitech.net whoami.akamai.net A -4 +short'
|
||||
dig @ns1-1.akamaitech.net whoami.akamai.net A -4 +short
|
||||
curl -4 ifconfig.co'
|
||||
|
||||
is_valid_ip() {
|
||||
# Check if the input looks like an IPv4 address.
|
||||
|
@ -95,7 +96,8 @@ if [ "$CFG_IPV4" = "true" ]; then
|
|||
else
|
||||
COMMANDS='dig @resolver1.opendns.com myip.opendns.com AAAA -6 +short
|
||||
dig @ns1.google.com o-o.myaddr.l.google.com TXT -6 +short | tr -d \"
|
||||
dig @2606:4700:4700::1111 whoami.cloudflare TXT CH -6 +short | tr -d \"'
|
||||
dig @2606:4700:4700::1111 whoami.cloudflare TXT CH -6 +short | tr -d \"
|
||||
curl -6 ifconfig.co'
|
||||
|
||||
is_valid_ip() {
|
||||
# Check if the input looks like an IPv6 address.
|
||||
|
|
|
@ -83,6 +83,7 @@ if [[ "$CFG_IPV4" == "true" ]]; then
|
|||
'dig @ns1.google.com o-o.myaddr.l.google.com TXT -4 +short | tr -d \"'
|
||||
'dig @1.1.1.1 whoami.cloudflare TXT CH -4 +short | tr -d \"'
|
||||
'dig @ns1-1.akamaitech.net whoami.akamai.net A -4 +short'
|
||||
'curl -4 ifconfig.co'
|
||||
)
|
||||
|
||||
function is_valid_ip() {
|
||||
|
@ -95,6 +96,7 @@ elif [[ "$CFG_IPV6" == "true" ]]; then
|
|||
'dig @resolver1.opendns.com myip.opendns.com AAAA -6 +short'
|
||||
'dig @ns1.google.com o-o.myaddr.l.google.com TXT -6 +short | tr -d \"'
|
||||
'dig @2606:4700:4700::1111 whoami.cloudflare TXT CH -6 +short | tr -d \"'
|
||||
'curl -6 ifconfig.co'
|
||||
)
|
||||
|
||||
function is_valid_ip() {
|
||||
|
@ -113,4 +115,4 @@ for COMMAND in "${COMMANDS[@]}"; do
|
|||
done
|
||||
|
||||
echo "[getmyip] All providers failed" >&2
|
||||
exit 1
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue