diff --git a/CHANGELOG.md b/CHANGELOG.md index 1026aa5..c43c3ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Libcurl.js Changelog: +## v0.6.12 (7/28/24): +- The APIs from [wisp-client-js](https://github.com/MercuryWorkshop/wisp-client-js) are now exposed at `libcurl.wisp` + ## v0.6.11 (7/18/24): - Add support for SOCKS5, SOCKS4, and HTTP proxies diff --git a/README.md b/README.md index f29373e..796a554 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ This is an experimental port of [libcurl](https://curl.se/libcurl/) to WebAssemb * [Getting Error Strings](#getting-error-strings) * [Getting Version Info](#getting-version-info) * [Getting the CA Certificates Bundle](#getting-the-ca-certificates-bundle) + * [Using the Wisp Client](#using-the-wisp-client) - [Proxy Server](#proxy-server) - [Project Structure](#project-structure) - [Copyright](#copyright) @@ -266,6 +267,9 @@ You can get version information from the `libcurl.version` object. This object w ### Getting the CA Certificates Bundle: You can get the CA cert bundle that libcurl uses by calling `libcurl.get_cacert`. The function will return a string with the certificates in PEM format. The cert bundle comes from the [official curl website](https://curl.se/docs/caextract.html), which is extracted from the Mozilla Firefox source code. +### Using the Wisp Client +The `libcurl.wisp` object exposes all of the APIs from [wisp-client-js](https://github.com/MercuryWorkshop/wisp-client-js). This API is not guarenteed to be reliable. + ## Proxy Server: The proxy server consists of a standard [Wisp](https://github.com/MercuryWorkshop/wisp-protocol) server, allowing multiple TCP connections to share the same websocket. diff --git a/client/javascript/main.js b/client/javascript/main.js index b8ab599..8f2f779 100644 --- a/client/javascript/main.js +++ b/client/javascript/main.js @@ -102,8 +102,12 @@ api = { get_cacert: get_cacert, get_error_string: get_error_str, - wisp_connections: _wisp_connections, - WispConnection: WispConnection, + wisp: { + wisp_connections: _wisp_connections, + WispConnection: WispConnection, + WispWebSocket: WispWebSocket + }, + transport: "wisp", WebSocket: FakeWebSocket, diff --git a/client/javascript/tls_socket.js b/client/javascript/tls_socket.js index e18315e..af953af 100644 --- a/client/javascript/tls_socket.js +++ b/client/javascript/tls_socket.js @@ -1,5 +1,3 @@ -//currently broken - class TLSSocket extends CurlSession { constructor(hostname, port, options={}) { super(); diff --git a/client/package.json b/client/package.json index 0f16d6d..46115c2 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "libcurl.js", - "version": "0.6.11", + "version": "0.6.12", "description": "An experimental port of libcurl to WebAssembly for use in the browser.", "main": "libcurl.mjs", "exports": {