List of public WSS Circuit Relays?

Is anyone aware of a list of publicly accessible Circuit Relay nodes with WSS (secure websockets) enabled?

I have one set up, and I wouldn’t mind sharing it for other people to use. If such a list of maintained, publicly accessible circuit relays doesn’t exist, I’d like to start one. But I don’t want to reinvent the wheel if such a list already exists.

Also, is anyone aware of a way to scan IPFS nodes to determine if they have circuit relay turned on and are accessible over wss? If it’s possible to scan the network for such nodes, I could write the software to do this and generate a list.

I dont think such list exists.

You can scan DHT.

That’s an interesting idea. Any tips on how to go about scanning the DHT with js-ipfs?

I assume I’d be looking for nodes with a multiaddr with wss in it, as that’s what a web browser needs to connect to a Circuit Relay.

But how would I access the DHT in the first place? How would I get a list of all the nodes and their multiaddrs?

js-ipfs cant do DHT yet. You need to do traditional approach every minute run ipfs swarm addrs and parse result, merge data with previously saved ones. If you write simple script not requiring SQL database and runs on nodejs in Oracle Linux 7 (RHEL) I can run it on my nodes to help you collect data.
I expect you will publish final result in CSV format.

So it looks like js-ipfs does implement the DHT now. However, I can’t figure out how to ‘scan’ the DHT.

After looking through the API documentation and the DHT tutorial, the closest thing I can come up with would be to use findPeer(). But I’d have to iterate from 0 to 2^255 of addresses.

However, I’m not sure how to convert a number like 15 into a Qm... peer ID.

Is this even the right approach?

I figured out pretty quickly that converting numbers into peer IDs was NOT the right approach.

It took me a while to figure out how to interact with the DHT. I captured my lessons in this GitHub Gist. It’s a script that starts a JS IPFS node and scans the DHT for peers with wss in their multiaddr.

This is just the first part. The second part would be verifying that websocket-enabled peers were could successfully complete a circuit relay.

I’ll probably turn this script into an npm library under the PSF for this kind of thing.

If there are other JS devs who are interested in work like this, I invite you to join the Permissionless Software Foundation (PSF). We’re building a lot of freedom-enhancing software that combines blockchains and IPFS.