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

httpclient can't connect to IP with HTTPS #386

Open
hugosenari opened this issue May 12, 2023 · 0 comments
Open

httpclient can't connect to IP with HTTPS #386

hugosenari opened this issue May 12, 2023 · 0 comments

Comments

@hugosenari
Copy link

I was following example of #345
Basically changed https://api.ipify.org by https://1.1.1.1 but it fails

httpcommon.nim:86        raiseHttpConnectionError
asyncfutures2.nim:509    internalCheckComplete
???                      acquireConnection
asyncfutures2.nim:509    internalCheckComplete
httpclient.nim:1127      send
???                      send
asyncfutures2.nim:509    internalCheckComplete
httpclient.nim:1425      fetch
???                      fetch
asyncfutures2.nim:509    internalCheckComplete
Error: unhandled exception: Could not connect to remote host [HttpConnectionError]

It works with http://1.1.1.1 (we got the 301/redirect)
It works with https://one.one.one.one

I tried to be verbose and create address with fake hostname

HttpAddress(
      addresses: @[initTAddress("10.200.10.200", 9200)],
      id       : "10.200.10.200:9200",
      hostname : "babalu.aye",
      port     : 9200.uint16,
      path     : "/mys-elasticsearch-index/_search",
      query    : "",
      anchor   : "",
      username : "",
      password : "",
      scheme   : Secure,
    )

But got the same error, not sure if because the certificate (self signed) or same issue as 1.1.1.1

My real use case is connect to https in some internal server.

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

No branches or pull requests

1 participant