Socket
Socket
Sign inDemoInstall

multiserver-scopes

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiserver-scopes

multiserver-scopes ---


Version published
Weekly downloads
123
increased by11.82%
Maintainers
3
Weekly downloads
 
Created
Source

multiserver-scopes

Currently a simple wrapper around non-private-ip. The idea is that this is the canonical place to get a default host for a connection given a scope. The scenario is: there is a scope but no host specified for an incoming connection and sbot must pick a host.

This module should become the definition of what scopes mean in ssb.

API

host(scope)

returns default host for a given scope

  • device -> 'localhost'
  • local -> private/non-routable IP (e.g. 192.168 ...)
  • private -> same as local
  • public -> public IP (routable IP)

more ideas

compare(scope_a, scope_b) for use with sort. Sort scopes in ascending order of size: device < local <= private < public. Unknown scopes sort before everyting (because they include nothing)

FAQs

Package last updated on 25 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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