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

libsql:// defaults to HTTPS #53

Open
lypanov opened this issue Nov 1, 2023 · 2 comments
Open

libsql:// defaults to HTTPS #53

lypanov opened this issue Nov 1, 2023 · 2 comments

Comments

@lypanov
Copy link

lypanov commented Nov 1, 2023

Unlike http:// libsql:// defaults to HTTPS. This doesn't seem quite right honestly and made for a poor first impression during my getting started tutorial.

@NFuller721
Copy link

NFuller721 commented Feb 19, 2024

I had this same issue. I am using the extensions that were provided via "libsql", and I couldn't use it over "http". I solved it by forking "libsql-client-rs" and changing "https://" to "http://" on line 296 in "src/client.rs". There are of course better ways to write this, but this will work for local development. I also had to spin my own sqld server which was quite simple actually.

I ran the commands:

brew tap libsql/sqld
brew install sqld

Then copied sqlean's uuid and math precompiled binaries, and added the "sha256sum" of both to a file called trusted.lst in a folder called "extensions" that also included those binaries. Then I ran the command:

sqld -e ~/path/to/extensions

And that should be it!

@NFuller721
Copy link

I would like to revise my answer and say that you do not have to fork "libsql-client-rs". You can just set your LIBSQL_CLIENT_URL to http instead of libsql. I may be wrong about this, but from the way I understand the code in client.rs it just takes "libsql://" and replaces it with "https://" and does nothing special.

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

2 participants