Kixunil / tonic_lnd

Rust implementation of LND RPC client using async GRPC library `tonic`
31 stars 44 forks source link

Unable to connect to LND using IP address #17

Open yzernik opened 2 years ago

yzernik commented 2 years ago

I get an error when I try to connect to my local LND using http://127.0.0.1:10002:

ConnectError { internal: Connect { address: \\\"http://127.0.0.1:10002\\\", error: tonic::transport::Error(Transport, hyper::Error(Connect, InvalidDNSNameError)) }

But it works when I use http://localhost:10002.

yzernik commented 2 years ago

This appears to be an issue in the rustls library: https://github.com/rustls/rustls/issues/184

yzernik commented 2 years ago

I created a fork of this repo using openssl instead of rustls as the TLS library: https://github.com/yzernik/tonic_openssl_lnd

My fork allows me to connect to an LND instance even when the host is an IP address.

I published it as a crate if anyone else wants to use it: https://crates.io/crates/tonic_openssl_lnd

grunch commented 2 years ago

Hi, why don't you make PR instead? I think it's better for all the tonic_lnd users

Kixunil commented 2 years ago

This actually looks like missing s, should've been https://, not http.

And sorry for replying this late, I saw the message but couldn't reply right way and it fell out of my notifications. :(

grunch commented 2 years ago

Oh he did the PR, let's review it I need this to be merged 🥺

Kixunil commented 2 years ago

It's quite large, I will need more time to review. :(