libcurl.js

libcurl.js is a port of the popular libcurl C library to WASM for use on the web. It allows you send encrypted HTTPS requests from the browser, without the proxy server being able to read the contents.

See the Github repository for more information.

Features:

Live Demo:


Waiting for libcurl.js to load...

Request Content: Network Traffic:

        
Libcurl Output:

        

Explanation:

libcurl.js works by proxying TCP sockets, rather than HTTP requests. The Wisp protocol is used to multiplex the TCP connections over a single websocket for minimal latency. The libcurl C library is used as an HTTP client, and Mbed TLS is used to facilitate encryption.

If the destination server supports HTTPS, the connection will be end-to-end encrypted using TLS. Only the encrypted TLS traffic is carried over the websocket, so the proxy server knows nothing about your requests except for the hostname.

This avoids the privacy issues of a traditional CORS proxy which can steal your credentials and private information. With libcurl.js and Wisp, you don't need to trust the proxy server to keep your requests secure.

Javascript API:

Including libcurl.js in your web pages is as simple as loading the JS bundle using a script tag.

<script src="https://cdn.jsdelivr.net/npm/libcurl.js@latest/libcurl_full.js" defer></script>

Then, after setting the Websocket proxy URL, you can use the API to its full potential.

document.addEventListener("libcurl_load", ()=>{
  libcurl.set_websocket(`wss://wisp.mercurywork.shop/`);
  console.log("libcurl.js ready!");
});

More documentation and examples are available on the project README.

License:

This project was written by ading2210 and it is licensed under the GNU LGPL v3.

This license is mainly applied to libraries. You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL, but applications that use the library don't have to be.

- From tldrlegal.com