Skip to content

Commit

Permalink
chore: add vpn servers to node status
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev authored Sep 18, 2023
1 parent 97bd9ed commit f606d7f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
12 changes: 10 additions & 2 deletions bot/discord/serverStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,16 @@ let nstatus = {

"VPN Servers": [
{
name: "France 1",
data: "france1",
name: "AU 1",
data: "au1",
},
{
name: "FR 1",
data: "fr1",
},
{
name: "US 1",
data: "us1",
},
],
};
Expand Down
30 changes: 23 additions & 7 deletions nodestatsChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,33 +187,49 @@ if (enabled.nodestatsChecker === true) {
}, 2000);
}

//Germany 1 VPN Server
// AU 1 VPN Server
ping2
.ping("51.89.32.64", 22)
.ping("139.99.171.195", 22)
.then(() =>
nodeStatus.set("germany1", {
nodeStatus.set("au1", {
timestamp: Date.now(),
status: true,
})
)
.catch((e) =>
nodeStatus.set("germany1", {
nodeStatus.set("au1", {
timestamp: Date.now(),
status: false,
})
);

//France 1 VPN Server
// FR 1 VPN Server
ping2
.ping("176.31.125.135", 22)
.then(() =>
nodeStatus.set("france1", {
nodeStatus.set("fr1", {
timestamp: Date.now(),
status: true,
})
)
.catch((e) =>
nodeStatus.set("france1", {
nodeStatus.set("fr1", {
timestamp: Date.now(),
status: false,
})
);

// US 1 VPN Server
ping2
.ping("69.197.129.206", 22)
.then(() =>
nodeStatus.set("us1", {
timestamp: Date.now(),
status: true,
})
)
.catch((e) =>
nodeStatus.set("us1", {
timestamp: Date.now(),
status: false,
})
Expand Down

0 comments on commit f606d7f

Please sign in to comment.