expose wisp-client-js apis

This commit is contained in:
ading2210 2024-07-29 00:21:08 -04:00
parent 4d64b27a82
commit 88f2249e4e
5 changed files with 14 additions and 5 deletions

View file

@ -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

View file

@ -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.

View file

@ -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,

View file

@ -1,5 +1,3 @@
//currently broken
class TLSSocket extends CurlSession {
constructor(hostname, port, options={}) {
super();

View file

@ -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": {