-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API for updating bootnodes and getting default ones from chainspecs #1294
Conversation
|
||
const checkMultiAddr = (addr: string) => { | ||
const ws = | ||
/\/(ip4|ip6|dns4|dns6|dns)\/([a-zA-z0-9.-]{3,})\/tcp\/[0-9]{0,5}\/(ws|wss|tls\/ws)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/\/(ip4|ip6|dns4|dns6|dns)\/([a-zA-z0-9.-]{3,})\/tcp\/[0-9]{0,5}\/(ws|wss|tls\/ws)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i | |
/\/(ip4|ip6|dns4|dns6|dns)\/(.?)\/tcp\/[0-9]{0,5}\/(ws|wss|tls\/ws)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i |
Domain names are surprisingly complicated
Aside from this, I'm not super sure that the peer ID is always 52 characters long, but I'm too lazy to check this
/\/(ip4|ip6|dns4|dns6|dns)\/([a-zA-z0-9.-]{3,})\/tcp\/[0-9]{0,5}\/(ws|wss|tls\/ws)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i | ||
|
||
const webrtc = | ||
/\/(ip4|ip6)\/([a-zA-z0-9.-]{3,})\/udp\/(.?)\/webrtc\/certhash\/(.*?)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/\/(ip4|ip6)\/([a-zA-z0-9.-]{3,})\/udp\/(.?)\/webrtc\/certhash\/(.*?)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i | |
/\/(ip4|ip6)\/(.?)\/udp\/(.?)\/webrtc\/certhash\/(.*?)\/p2p\/[a-zA-Z1-9^Il0O]{52}/i |
…ik-bootnodes-new-version
…strate-connect into nik-bootnodes-new-version
Fixes #981 #982
Replaces #1128