🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

multiserver

Package Overview
Dependencies
Maintainers
11
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiserver - npm Package Compare versions

Comparing version

to
1.13.3

12

index.js

@@ -39,6 +39,10 @@ var compose = require('./compose')

if (!scope) scope = 'public'
return plugs.map(function (plug) {
if (plug.scope() == scope || (plug.scope() == 'public' && scope == 'private'))
return plug.stringify(scope)
}).filter(Boolean).join(';')
return plugs
.filter(function (plug) {
return plug.scope() === scope ||
(plug.scope() === 'public' && scope === 'private')
})
.map(function (plug) { return plug.stringify(scope) })
.filter(Boolean)
.join(';')
},

@@ -45,0 +49,0 @@ //parse doesn't really make sense here...

{
"name": "multiserver",
"description": "write a server which works over many protocols at once, or connect to the same",
"version": "1.13.2",
"version": "1.13.3",
"homepage": "https://github.com/dominictarr/multiserver",

@@ -6,0 +6,0 @@ "repository": {

@@ -19,3 +19,3 @@ var net

name: 'net',
scope: function() { return opts.scope },
scope: function() { return opts.scope || 'public' },
server: function (onConnection) {

@@ -68,3 +68,3 @@ var server = net.createServer(opts, function (stream) {

var host = opts.external || opts.host || 'localhost'
if (scope == 'private')
if (scope === 'private')
host = opts.host || 'localhost'

@@ -71,0 +71,0 @@ return ['net', host, opts.port].join(':')

@@ -7,3 +7,3 @@ var socks = require('socks').SocksClient;

console.warn('onion dialing through socks proxy not supported in browser setting')
return
return
}

@@ -20,3 +20,3 @@

name: 'onion',
scope: function() { return opts.scope },
scope: function() { return opts.scope || 'public' },
server: function (onConnection) {

@@ -23,0 +23,0 @@ if(!opts.server) return

@@ -12,7 +12,7 @@ var toPull = require('stream-to-pull-stream')

const addr = 'unix:' + socket
opts = opts || {}
return {
name: 'unix',
scope: function() { return opts.scope },
scope: function() { return opts.scope || 'public' },
server: function (onConnection) {

@@ -30,3 +30,3 @@ if(started) return

clientSocket.on('error', function(e) {
if (e.code == 'ECONNREFUSED') {
if (e.code == 'ECONNREFUSED') {
fs.unlinkSync(socket)

@@ -36,4 +36,4 @@ server.listen(socket)

})
clientSocket.connect({ path: socket }, function() {
clientSocket.connect({ path: socket }, function() {
console.log("someone else is listening on socket!")

@@ -43,7 +43,7 @@ })

})
fs.chmodSync(socket, 0600)
started = true
return function () {

@@ -50,0 +50,0 @@ server.close()

@@ -12,3 +12,3 @@ var WS = require('pull-ws')

name: 'ws',
scope: function() { return opts.scope },
scope: function() { return opts.scope || 'public' },
server: function (onConnect) {

@@ -15,0 +15,0 @@ if(!WS.createServer) return