sysinfo: add interface to get IPv6 address
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
exports = module.exports = {
|
||||
getServerIp,
|
||||
getServerIPv4,
|
||||
getServerIPv6,
|
||||
testConfig,
|
||||
|
||||
hasIPv6
|
||||
@@ -21,10 +22,16 @@ function api(provider) {
|
||||
}
|
||||
}
|
||||
|
||||
async function getServerIp() {
|
||||
async function getServerIPv4() {
|
||||
const config = await settings.getSysinfoConfig();
|
||||
|
||||
return await api(config.provider).getServerIp(config);
|
||||
return await api(config.provider).getServerIPv4(config);
|
||||
}
|
||||
|
||||
async function getServerIPv6() {
|
||||
const config = await settings.getSysinfoConfig();
|
||||
|
||||
return await api(config.provider).getServerIPv4(config);
|
||||
}
|
||||
|
||||
function hasIPv6() {
|
||||
|
||||
Reference in New Issue
Block a user