1.1.0 • Published 1 year ago

@digitize/with-outline v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

with-outline

Rationale

This tool has been created to resolve one very specific problem: occasionally connect to Outline VPNto be able to access resources behind it from Amazon or other Cloud providers from NodeJS application running on Ubuntu server.

N.B. Tested only with Ubuntu. Might not work for you. Feel free to raise an issues and contribute PRs to add support for more.

Also note that it requires sudo for some commands to run

Usage

This package exports the only function - withOutline:

async function withOutline<T>(token: string, remoteAddr: string, callback: () => Promise<T>): Promise<T>

When invoked, it does the following:

  1. Runs a Shadowsocks client that connects to Outline server using token provided as the first argument.
  2. Routes all traffic to the remoteAddr via Shadowsocks local proxy (thanks to badvpn-tun2socks).
  3. Invokes the callback as async function ("awaits" for the result).
  4. Restores routing
  5. Shuts down Shadowsocks client
  6. Returns the result of callback execution

License: MIT

1.1.0

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago