wisp-server-node
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -37,3 +37,2 @@ "use strict"; | ||
const promises_1 = __importDefault(require("node:dns/promises")); | ||
console.warn("wisp-server-node is now no longer maintained."); | ||
const wss = new ws_1.default.Server({ noServer: true }); | ||
@@ -125,2 +124,3 @@ const defaultOptions = { logging: true }; | ||
const client = node_dgram_1.default.createSocket(iplevel === 6 ? "udp6" : "udp4"); | ||
client.connect(connectFrame.port, host); | ||
//@ts-expect-error stupid workaround | ||
@@ -153,3 +153,2 @@ client.connected = false; | ||
buffer: 127, | ||
connectFrame: connectFrame, // Store the connectFrame object | ||
}); | ||
@@ -169,4 +168,3 @@ } | ||
else if (stream && stream.client instanceof node_dgram_1.default.Socket) { | ||
const connectFrame = stream.connectFrame; // Retrieve the connectFrame object | ||
stream.client.send(wispFrame.payload, connectFrame.port, connectFrame.hostname, (err) => { | ||
stream.client.send(wispFrame.payload, undefined, undefined, (err) => { | ||
if (err) { | ||
@@ -173,0 +171,0 @@ if (options.logging) { |
@@ -8,3 +8,3 @@ "use strict"; | ||
const node_http_1 = __importDefault(require("node:http")); | ||
const httpServer = node_http_1.default.createServer().listen(3000); | ||
const httpServer = node_http_1.default.createServer().listen(process.env.PORT || 3000); | ||
httpServer.on("upgrade", (req, socket, head) => { | ||
@@ -11,0 +11,0 @@ ConnectionHandler_1.default.routeRequest(req, socket, head); |
{ | ||
"name": "wisp-server-node", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"type": "commonjs", | ||
"description": "", | ||
"scripts": { | ||
"start": "node dist/createServer.js", | ||
"build": "tsc", | ||
"dev": "tsc --watch", | ||
"pretty": "npx prettier -w *" | ||
"pretty": "npx prettier -w *", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -11,0 +13,0 @@ "main": "dist/ConnectionHandler.js", |
# wisp-server-node | ||
> [!WARNING] | ||
> Wisp server node is now no longer maintained, please switch to wisp-js when it is available | ||
A [wisp protocol](https://github.com/MercuryWorkshop/wisp-protocol) server implementation, written in NodeJS. | ||
@@ -7,0 +4,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66533
405
42
1