Skip to content

Commit 6535ef1

Browse files
rename *_ADDRESS_PROVIDER -> *_ADDRESS_URL
1 parent d7ecd9c commit 6535ef1

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

config.dist.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@
2828
// define('HOST', 'server');
2929

3030

31-
// Set a URL to use to determine the public IPv4 address. It must
31+
// Enter a URL to use to determine the public IPv4 address. It must
3232
// only return an IPv4 address in plain text, otherwise the script will fail.
33-
define('IPV4_ADDRESS_PROVIDER', 'https://api.ipify.org');
33+
define('IPV4_ADDRESS_URL', 'https://api.ipify.org');
3434

35-
// Set a URL to use as fallback to determine the public IPv4
35+
// Enter a URL to use as fallback to determine the public IPv4
3636
// address. It must only return an IPv4 address in plain text, otherwise the
3737
// script will fail.
38-
define('IPV4_ADDRESS_PROVIDER_FALLBACK', 'https://ipv4.seeip.org');
38+
define('IPV4_ADDRESS_URL_FALLBACK', 'https://ipv4.seeip.org');
3939

40-
// Set a URL to use to determine the public IPv6 address. It must
40+
// Enter a URL to use to determine the public IPv6 address. It must
4141
// only return an IPv6 address in plain text, otherwise the script will fail.
42-
define('IPV6_ADDRESS_PROVIDER', 'https://ipv6.seeip.org');
42+
define('IPV6_ADDRESS_URL', 'https://ipv6.seeip.org');
4343

44-
// Set a URL to use as fallback to determine the public IPv6
44+
// Enter a URL to use as fallback to determine the public IPv6
4545
// address. It must only return an IPv6 address in plain text, otherwise the
4646
// script will fail.
47-
define('IPV6_ADDRESS_PROVIDER_FALLBACK', 'https://v6.ident.me/');
47+
define('IPV6_ADDRESS_URL_FALLBACK', 'https://v6.ident.me/');
4848

4949

5050
// If set to true, the script will check for your public IPv4 address and add it as an A-Record / change an existing A-Record for the host.

functions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ function getCurrentPublicIPv4()
277277
return $providedIPv4;
278278
}
279279

280-
outputStdout('Getting IPv4 address from ' . IPV4_ADDRESS_PROVIDER . '.');
280+
outputStdout('Getting IPv4 address from ' . IPV4_ADDRESS_URL . '.');
281281

282-
$url = IPV4_ADDRESS_PROVIDER;
282+
$url = IPV4_ADDRESS_URL;
283283
$ch = initializeCurlHandlerGetIP($url);
284284
$publicIP = trim(curl_exec($ch));
285285

@@ -292,8 +292,8 @@ function getCurrentPublicIPv4()
292292
}
293293

294294
if (!isIPV4Valid($publicIP) || $publicIP === false) {
295-
outputWarning(IPV4_ADDRESS_PROVIDER . " didn't return a valid IPv4 address (Try $retryCount / $retryLimit). Trying fallback " . IPV4_ADDRESS_PROVIDER_FALLBACK);
296-
$url = IPV4_ADDRESS_PROVIDER_FALLBACK;
295+
outputWarning(IPV4_ADDRESS_URL . " didn't return a valid IPv4 address (Try $retryCount / $retryLimit). Trying fallback " . IPV4_ADDRESS_URL_FALLBACK);
296+
$url = IPV4_ADDRESS_URL_FALLBACK;
297297
$ch = initializeCurlHandlerGetIP($url);
298298
$publicIP = trim(curl_exec($ch));
299299
if (!wasCurlSuccessful($ch) || !isIPV4Valid($publicIP)) {
@@ -324,9 +324,9 @@ function getCurrentPublicIPv6()
324324
return $providedIPv6;
325325
}
326326

327-
outputStdout('Getting IPv6 address from ' . IPV6_ADDRESS_PROVIDER. '.');
327+
outputStdout('Getting IPv6 address from ' . IPV6_ADDRESS_URL. '.');
328328

329-
$url = IPV6_ADDRESS_PROVIDER;
329+
$url = IPV6_ADDRESS_URL;
330330
$ch = initializeCurlHandlerGetIP($url);
331331
$publicIP = trim(curl_exec($ch));
332332

@@ -339,8 +339,8 @@ function getCurrentPublicIPv6()
339339
}
340340

341341
if (!isIPV6Valid($publicIP) || $publicIP === false) {
342-
outputWarning(IPV6_ADDRESS_PROVIDER . " didn't return a valid IPv6 address (Try $retryCount / $retryLimit). Trying fallback " . IPV6_ADDRESS_PROVIDER_FALLBACK);
343-
$url = IPV6_ADDRESS_PROVIDER_FALLBACK;
342+
outputWarning(IPV6_ADDRESS_URL . " didn't return a valid IPv6 address (Try $retryCount / $retryLimit). Trying fallback " . IPV6_ADDRESS_URL_FALLBACK);
343+
$url = IPV6_ADDRESS_URL_FALLBACK;
344344
$ch = initializeCurlHandlerGetIP($url);
345345
$publicIP = trim(curl_exec($ch));
346346
if (!wasCurlSuccessful($ch) || !isIPV6Valid($publicIP)) {

update.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@
2424
exit(1);
2525
}
2626

27-
if (!defined('IPV4_ADDRESS_PROVIDER')) {
28-
define('IPV4_ADDRESS_PROVIDER', 'https://api.ipify.org');
27+
if (!defined('IPV4_ADDRESS_URL')) {
28+
define('IPV4_ADDRESS_URL', 'https://api.ipify.org');
2929
}
3030

31-
if (!defined('IPV4_ADDRESS_PROVIDER_FALLBACK')) {
32-
define('IPV4_ADDRESS_PROVIDER_FALLBACK', 'https://ipv4.seeip.org');
31+
if (!defined('IPV4_ADDRESS_URL_FALLBACK')) {
32+
define('IPV4_ADDRESS_URL_FALLBACK', 'https://ipv4.seeip.org');
3333
}
3434

35-
if (!defined('IPV6_ADDRESS_PROVIDER')) {
36-
define('IPV6_ADDRESS_PROVIDER', 'https://ipv6.seeip.org');
35+
if (!defined('IPV6_ADDRESS_URL')) {
36+
define('IPV6_ADDRESS_URL', 'https://ipv6.seeip.org');
3737
}
3838

39-
if (!defined('IPV6_ADDRESS_PROVIDER_FALLBACK')) {
40-
define('IPV6_ADDRESS_PROVIDER_FALLBACK', 'https://v6.ident.me/');
39+
if (!defined('IPV6_ADDRESS_URL_FALLBACK')) {
40+
define('IPV6_ADDRESS_URL_FALLBACK', 'https://v6.ident.me/');
4141
}
4242

4343
if (USE_IPV4 === true) {

0 commit comments

Comments
 (0)