mirror of
https://github.com/Kizuren/statusPage.git
synced 2025-12-21 21:16:09 +01:00
Added optional onionIP for onion service checks
This commit is contained in:
parent
df871a95f1
commit
4ef82b6a18
2 changed files with 6 additions and 6 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
import { SocksProxyAgent } from 'socks-proxy-agent';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
interval : 1440, // Interval in minutes between each pulse; 1 day (24 * 60)
|
interval : 1440, // Interval in minutes between each pulse; 1 day (24 * 60)
|
||||||
nDataPoints : 90, // Number of datapoints to display on the dashboard
|
nDataPoints : 90, // Number of datapoints to display on the dashboard
|
||||||
|
|
@ -52,10 +50,11 @@ export default {
|
||||||
validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299]
|
validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id : 'btcnd-onion-POWERFUL', // optional
|
id : 'btcnd-onion', // optional
|
||||||
name : 'Bitcoin Node (Onion)', // optional
|
name : 'Bitcoin Node (Onion)', // optional
|
||||||
link : 'http://erkuzp5gzrcjqtrcuiku5whcjnioalwskgo3hjg5oq2mmailml7k7jad.onion:8333', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false
|
link : 'http://erkuzp5gzrcjqtrcuiku5whcjnioalwskgo3hjg5oq2mmailml7k7jad.onion:8333', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false
|
||||||
url : 'http://erkuzp5gzrcjqtrcuiku5whcjnioalwskgo3hjg5oq2mmailml7k7jad.onion:8333', // required
|
url : 'http://erkuzp5gzrcjqtrcuiku5whcjnioalwskgo3hjg5oq2mmailml7k7jad.onion:8333', // required
|
||||||
|
onionIP : '192.168.0.105', // optional, IP to use for onion service check
|
||||||
customCheck : async (content, response)=>{return true;},
|
customCheck : async (content, response)=>{return true;},
|
||||||
validStatus : ['SOCKET'], // optional, Which http status should be considered non errors [defaults to 200-299]
|
validStatus : ['SOCKET'], // optional, Which http status should be considered non errors [defaults to 200-299]
|
||||||
},
|
},
|
||||||
|
|
@ -138,10 +137,11 @@ export default {
|
||||||
validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299]
|
validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id : 'xmrnd-onion-POWERFUL', // optional
|
id : 'xmrnd-onion', // optional
|
||||||
name : 'Monero Node (Onion)', // optional
|
name : 'Monero Node (Onion)', // optional
|
||||||
link : 'bto4zcx3tbss5f6mhbc4guumv66og2udpg3n26254f2sbkdvhnr2bwyd.onion:18081', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false
|
link : 'bto4zcx3tbss5f6mhbc4guumv66og2udpg3n26254f2sbkdvhnr2bwyd.onion:18081', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false
|
||||||
url : 'bto4zcx3tbss5f6mhbc4guumv66og2udpg3n26254f2sbkdvhnr2bwyd.onion:18081', // required
|
url : 'bto4zcx3tbss5f6mhbc4guumv66og2udpg3n26254f2sbkdvhnr2bwyd.onion:18081', // required
|
||||||
|
onionIP : '192.168.0.105', // optional, IP to use for onion service check
|
||||||
request : null,
|
request : null,
|
||||||
customCheck : async (content, response)=>{return true;},
|
customCheck : async (content, response)=>{return true;},
|
||||||
validStatus : ['SOCKET'], // optional, Which http status should be considered non errors [defaults to 200-299]
|
validStatus : ['SOCKET'], // optional, Which http status should be considered non errors [defaults to 200-299]
|
||||||
|
|
|
||||||
|
|
@ -224,8 +224,8 @@ while(true) {
|
||||||
try {
|
try {
|
||||||
if (endpoint.url.includes('.onion')) {
|
if (endpoint.url.includes('.onion')) {
|
||||||
let [host, port] = endpoint.url.replace('http://', '').split(':');
|
let [host, port] = endpoint.url.replace('http://', '').split(':');
|
||||||
host = endpoint.id.includes('-POWERFUL') ? '192.168.0.105' : '127.0.0.1';
|
host = endpoint.onionIP || '127.0.0.1';
|
||||||
const result = await checkOnionService(host, port || 8333);
|
const result = await checkOnionService(host, port || 80);
|
||||||
|
|
||||||
endpointStatus.t = Date.now();
|
endpointStatus.t = Date.now();
|
||||||
endpointStatus.dur = 0;
|
endpointStatus.dur = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue