# multiserver-scopes

> multiserver-scopes ---

Latest version **2.0.0** (published 2022-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install multiserver-scopes
pnpm add multiserver-scopes
yarn add multiserver-scopes
bun add multiserver-scopes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-01-25 |
| First published | 2018-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jan Bölsche |
| Maintainers | staltz, regular, cryp7ix |

## Links

- npm: https://www.npmjs.com/package/multiserver-scopes
- npm.io page: https://npm.io/package/multiserver-scopes

## Dependencies (1)

- [non-private-ip](https://npm.io/package/non-private-ip.md) ^2.0.0

## Recent versions

- 2.0.0 (latest) — 2022-01-25
- 1.0.0 — 2018-10-25

## README

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)

---
_Source: https://npm.io/package/multiserver-scopes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
