Browse Source

sorta working

update/libraries
dskvr 2 years ago
parent
commit
04cbab6f32
  1. 2
      package.json
  2. 52
      relays.yaml
  3. 33
      src/components/BaseRelays.vue

2
package.json

@ -21,7 +21,7 @@
"leaflet": "1.9.3",
"node-emoji": "1.11.0",
"node-polyfill-webpack-plugin": "2.0.1",
"nostr": "0.2.4",
"nostr": "0.2.5",
"nostr-tools": "0.24.1",
"onion-regex": "2.0.8",
"requests": "0.3.0",

52
relays.yaml

@ -1,28 +1,28 @@
relays:
- 'wss://rsslay.fiatjaf.com'
- 'wss://freedom-relay.herokuapp.com/ws'
- 'wss://nostr-relay.freeberty.net'
- 'wss://nostr.bitcoiner.social'
- 'wss://nostr-relay.wlvs.space'
- 'wss://nostr.onsats.org'
- 'wss://nostr-relay.untethr.me'
- 'wss://nostr.unknown.place'
- 'wss://nostr.semisol.dev'
- 'wss://nostr-pub.semisol.dev'
- 'wss://nostr-verified.wellorder.net'
- 'wss://nostr.drss.io'
- 'wss://relay.damus.io'
- 'wss://nostr.openchain.fr'
- 'wss://nostr.delo.software'
- 'wss://relay.nostr.info'
- 'wss://relay.minds.com/nostr/v1/ws'
- 'wss://nostr.zaprite.io'
- 'wss://nostr.oxtr.dev'
- 'wss://nostr.ono.re'
- 'wss://relay.grunch.dev'
- 'wss://relay.cynsar.foundation'
- 'wss://nostr-pub.wellorder.net'
- 'wss://relayer.fiatjaf.com'
- 'wss://nostr.rocks'
- 'wss://none.sandwich.farm'
# - 'wss://rsslay.fiatjaf.com'
# - 'wss://freedom-relay.herokuapp.com/ws'
# - 'wss://nostr-relay.freeberty.net'
# - 'wss://nostr.bitcoiner.social'
# - 'wss://nostr-relay.wlvs.space'
# - 'wss://nostr.onsats.org'
# - 'wss://nostr-relay.untethr.me'
# - 'wss://nostr.unknown.place'
# - 'wss://nostr.semisol.dev'
# - 'wss://nostr-pub.semisol.dev'
# - 'wss://nostr-verified.wellorder.net'
# - 'wss://nostr.drss.io'
# - 'wss://relay.damus.io'
# - 'wss://nostr.openchain.fr'
# - 'wss://nostr.delo.software'
# - 'wss://relay.nostr.info'
# - 'wss://relay.minds.com/nostr/v1/ws'
# - 'wss://nostr.zaprite.io'
# - 'wss://nostr.oxtr.dev'
# - 'wss://nostr.ono.re'
# - 'wss://relay.grunch.dev'
# - 'wss://relay.cynsar.foundation'
# - 'wss://nostr-pub.wellorder.net'
# - 'wss://relayer.fiatjaf.com'
# - 'wss://nostr.rocks'
# - 'wss://none.sandwich.farm'
- 'wss://nostr.sandwich.farm'

33
src/components/BaseRelays.vue

@ -142,6 +142,8 @@ import emoji from 'node-emoji'
import { relays } from '../../relays.yaml'
import { messages as RELAY_MESSAGES, codes as RELAY_CODES } from '../../codes.yaml'
import { Inspector, Observation } from '../../../nostr-relay-inspector'
import crypto from "crypto"
const refreshMillis = 3*60*1000
@ -169,22 +171,25 @@ export default defineComponent({
},
mounted() {
this.relays.forEach(async url => {
this.status[url] = {}
await this.testRelay(url)
this.relays.forEach(async relay => {
this.status[relay] = {}
const inspect = new Inspector(relay)
console.dir(inspect)
inspect.run()
// await this.testRelay(url)
})
let latencyIntVal
let counterIntVal
// eslint-disable-next-line
let latencyTimeout = setTimeout(() => {
this.testRelayLatency()
// eslint-disable-next-line
latencyIntVal = setInterval(() => { this.testRelayLatency() }, refreshMillis)
// eslint-disable-next-line
latencyIntVal = setInterval(() => { this.nextPing = Math.round((this.lastPing + refreshMillis - Date.now())/1000)}, 1000)
}, 10000)
// let latencyIntVal
// let counterIntVal
//
// // eslint-disable-next-line
// let latencyTimeout = setTimeout(() => {
// this.testRelayLatency()
// // eslint-disable-next-line
// latencyIntVal = setInterval(() => { this.testRelayLatency() }, refreshMillis)
// // eslint-disable-next-line
// latencyIntVal = setInterval(() => { this.nextPing = Math.round((this.lastPing + refreshMillis - Date.now())/1000)}, 1000)
// }, 10000)
},
methods: {

Loading…
Cancel
Save