-
Right now we can do |
Beta Was this translation helpful? Give feedback.
Answered by
titanism
Dec 9, 2023
Replies: 3 comments
-
Okay from first glance it looks like the easiest way would be to do this: +const dns = require('node:dns');
+const { isIP, isIPv6 } = require('node:net');
// ...
+ const url = replaceEnvironmentVariables(site.url);
+ let address;
+ if (isIP(url)) {
+ if (site.ipv6 && !isIPv6(url)) throw new Error('Site URL must be IPv6 for ipv6 check');
+ address = url;
+ } else {
+ if (site.ipv6) address = (await dns.promises.resolve6(url))[0];
+ else address = (await dns.promises.resolve4(url))[0];
+ if (!isIP(address)) throw new Error('Site IP address could not be resolved');
+ }
const tcpResult = await ping({
- address: replaceEnvironmentVariables(site.url),
+ address,
attempts: 5,
port: Number(replaceEnvironmentVariables(site.port ? String(site.port) : "")),
}); Then in your config change it so you do: - name: smtp.forwardemail.net (25)
url: smtp.forwardemail.net
icon: https://raw.githubusercontent.com/forwardemail/forwardemail.net/master/assets/img/favicon.ico
port: 443
check: "tcp-ping"
+ ipv6: true |
Beta Was this translation helpful? Give feedback.
0 replies
-
We are submitting a pull request now 🎉 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@pabio-escobar @AnandChowdhary can you please merge upptime/uptime-monitor#231? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
titanism
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@pabio-escobar @AnandChowdhary can you please merge upptime/uptime-monitor#231?