Skip to content
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

Validate relay address #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

1440000bytes
Copy link

Fixes #8


// Validate if it's a valid "wss://" URL
if let Ok(parsed_url) = Url::parse(&url) {
if parsed_url.scheme() != "wss" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we must accept ws at least for regtest/testnet/signet

@pythcoiner
Copy link
Owner

it now need a rebase

@1440000bytes
Copy link
Author

I don't know how to fix this error because url is already added in Cargo.toml:

error[E0432]: unresolved import `url`
  --> rust/joinstr/src/joinstr/mod.rs:28:5
   |
28 | use url::Url;
   |     ^^^ use of undeclared crate or module `url`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `joinstr` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `joinstr` (lib test) due to 1 previous error
Error: Process completed with exit code 101.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify relay address is valid url or ip
2 participants