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

Not able to use https to establish tunnel #34

Open
gdesmott opened this issue Jul 21, 2024 · 0 comments
Open

Not able to use https to establish tunnel #34

gdesmott opened this issue Jul 21, 2024 · 0 comments

Comments

@gdesmott
Copy link
Contributor

  • Server is running using localtunnel server --domain $DOMAIN --port 3000 --proxy-port 3001 --secure
  • Client is running using client --host http://$DOMAIN:3000 --subdomain badger --port 1848
  • It returns https://badger.$DOMAIN which works fine and has a valid certificate.

But establishing the tunnel using https with client --host https://$DOMAIN:3000 --subdomain badger --port 1848 does not work:

[2024-07-21T14:59:16Z INFO  localtunnel] Run localtunnel CLI!
[2024-07-21T14:59:16Z INFO  localtunnel_client] Request for assign domain: https://DOMAIN.org:3000/badger
[2024-07-21T14:59:16Z TRACE hyper_util::client::legacy::pool] checkout waiting for idle connection: ("https", DOMAIN:3000)
[2024-07-21T14:59:16Z DEBUG reqwest::connect] starting new connection: https://DOMAIN:3000/
[2024-07-21T14:59:16Z TRACE hyper_util::client::legacy::connect::http] Http::connect; scheme=Some("https"), host=Some("DOMAIN"), port=Some(Port(3000))
[2024-07-21T14:59:16Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="DOMAIN"
[2024-07-21T14:59:16Z DEBUG hyper_util::client::legacy::connect::http] connecting to 5.39.84.21:3000
[2024-07-21T14:59:16Z TRACE mio::poll] registering event source with poller: token=Token(94103213250048), interests=READABLE | WRITABLE
[2024-07-21T14:59:16Z DEBUG hyper_util::client::legacy::connect::http] connected to 5.39.84.21:3000
[2024-07-21T14:59:16Z TRACE mio::poll] deregistering event source from poller
[2024-07-21T14:59:16Z TRACE hyper_util::client::legacy::pool] checkout dropped for ("https", DOMAIN:3000)
Error: error sending request for url (https://DOMAIN:3000/badger)

Caused by:
    0: client error (Connect)
    1: error:0A0000C6:SSL routines:tls_get_more_records:packet length too long:ssl/record/methods/tls_common.c:654:, error:0A000139:SSL routines::record layer failure:ssl/record/rec_layer_s3.c:645:
    2: error:0A0000C6:SSL routines:tls_get_more_records:packet length too long:ssl/record/methods/tls_common.c:654:, error:0A000139:SSL routines::record layer failure:ssl/record/rec_layer_s3.c:645:

It's unclear to me how https is supposed to be used here. Shouldn't we pass the keys to localtunnel server?

I guess this is supported somehow as the README example use https to establish the tunnel.

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