• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Serialize Shadowsocks configuration data to and from SIP002 and legacy URI formats.

ShadowsocksConfig

Build Status

TypeScript library to store Shadowsocks configuration data as well as (de)serialize it to/from SIP002 and legacy base64 URIs. Node.js- and browser-friendly.

References

Fields, validation, and sanitization

Some fields are validated, normalized, and/or sanitized, but not all:

  • host
    • May be an IPv4, IPv6, or hostname.
    • Unicode hostnames are converted to punycode.
    • Hostnames must begin with a character in the set [A-z0-9].
  • port
    • Must be an integer from 0 to 65535.
  • method
    • One of the values specified in shadowsocks_config.ts#METHODS.
  • tag *
    • Only URI encoded/decoded.
  • password *
  • extra *
    • Any additional configuration (e.g. timeout, SIP003 plugin, etc.) may be stored here.

* No sanitization is performed for these fields. Client code is responsible for sanitizing these values when received from untrusted input.

Usage

Please see test/unit/shadowsocks_config.spec.ts for example usage.

Development

First install yarn.

Then, install dependencies using yarn:

yarn

Then, build with the included script:

yarn run build

Unit Tests

yarn run test

Linting (tslint and commit formatting)

yarn run precommit

More Repositories

1

outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
TypeScript
8,301
star
2

outline-server

Outline Server, developed by Jigsaw. The Outline Server is a proxy server that runs a Shadowsocks instance and provides a REST API for access key management.
TypeScript
5,726
star
3

Intra

An experimental tool that allows you to test new DNS-over-HTTPS services on Android
Java
1,349
star
4

outline-releases

Shell
493
star
5

outline-go-tun2socks

Go
192
star
6

net-analysis

Tools, libraries and applications to analyze network measurements and detect interference.
Jupyter Notebook
93
star
7

outline-sdk

SDK to build network tools based on Outline components.
Go
75
star
8

choir

Go library for privacy-preserving error reporting using DNS
Go
29
star
9

outline-i18n

TypeScript
25
star
10

utls

Fork of the Go standard library with unsafe extensions, for expert clients with unusual needs.
Go
19
star
11

rids

Remote Intrusion Detection System
Python
10
star
12

Content-Distribution

Learn to protect your site with static mirroring
8
star
13

getsni

Single-purpose library for reading the SNI out of the TLS ClientHello
Go
8
star
14

censoredplanet-analysis

Pipeline for Analysing CensoredPlanet Data.
Python
5
star
15

eml

An experimental concurrent, hierarchical, event-based state machine programming language intended for implementing distributed management systems and modeling complex protocols.
TeX
5
star
16

dox-detector

PureBasic
2
star
17

outline-brand

1
star