New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mercuryworkshop/epoxy-transport

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mercuryworkshop/epoxy-transport - npm Package Compare versions

Comparing version 2.1.19 to 2.1.20

4

package.json
{
"name": "@mercuryworkshop/epoxy-transport",
"version": "2.1.19",
"version": "2.1.20",
"description": "a bare transport that implements end-to-end encryption with epoxy-tls and wisp",

@@ -15,3 +15,3 @@ "main": "./dist/index.mjs",

"dependencies": {
"@mercuryworkshop/epoxy-tls": "2.1.10-1"
"@mercuryworkshop/epoxy-tls": "2.1.11-1"
},

@@ -18,0 +18,0 @@ "devDependencies": {

import type { BareHeaders, TransferrableResponse, BareTransport } from "@mercuryworkshop/bare-mux";
import initEpoxy, { EpoxyClient, EpoxyClientOptions, EpoxyHandlers, info } from "@mercuryworkshop/epoxy-tls";
import initEpoxy, { EpoxyClient, EpoxyClientOptions, EpoxyHandlers, info as epoxyInfo } from "@mercuryworkshop/epoxy-tls";
export { info as epoxyInfo };
export { epoxyInfo };
export type EpoxyOptions = {
wisp_v2?: boolean,
udp_extension_required?: boolean,
title_case_headers?: boolean,
ws_title_case_headers?: boolean,
wisp_ws_protocols?: string[],
redirect_limit?: number,
header_limit?: number,
buffer_size?: number,
}
const opts = [
"wisp_v2",
"udp_extension_required",
"title_case_headers",
"ws_title_case_headers",
"wisp_ws_protocols",
"redirect_limit",
"header_limit",
"buffer_size"
];
export default class EpoxyTransport implements BareTransport {

@@ -10,15 +34,19 @@ canstart = true;

client_version: typeof epoxyInfo;
client: EpoxyClient = null!;
wisp: string;
wisp_v2: boolean;
udp_extension_required: boolean;
title_case_headers: boolean;
opts: EpoxyOptions;
constructor({ wisp, wisp_v2, udp_extension_required, title_case_headers }) {
this.wisp = wisp;
this.wisp_v2 = wisp_v2 || false;
this.udp_extension_required = udp_extension_required || false;
this.title_case_headers = title_case_headers || true;
constructor(opts: EpoxyOptions & { wisp: string }) {
this.wisp = opts.wisp;
this.opts = opts;
this.client_version = epoxyInfo;
}
setopt(opts: EpoxyClientOptions, opt: string) {
// == allows both null and undefined
if (this.opts[opt] != null) opts[opt] = this.opts[opt];
}
async init() {

@@ -29,5 +57,3 @@ await initEpoxy();

options.user_agent = navigator.userAgent;
options.udp_extension_required = this.udp_extension_required;
options.wisp_v2 = this.wisp_v2;
options.title_case_headers = this.title_case_headers;
opts.forEach(x => this.setopt(options, x))
this.client = new EpoxyClient(this.wisp, options);

@@ -37,2 +63,3 @@

}
async meta() { }

@@ -80,2 +107,3 @@

);
let ws = this.client.connect_websocket(

@@ -82,0 +110,0 @@ handlers,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc