3.2.4 • Published 7 years ago

cardinalis v3.2.4

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
7 years ago

cardinal

npm Travis Codecov branch

A shadowsocks client by nodejs, include socks proxy and http proxy

why another

@clowwindy was asked to delete all the shadowsocks code,and shadowsocks-R's cribbing, and lantern start charging a fee. Because of that, I made it.

model

model pic

dependent

achieve

install

npm install -g cardinalis

CLI

Use cardinal to start in CLI

options

  • upip
  • sc

examples

default start

$ cardinal

start with update GeoIp-CN(IPs in china)

$ cardinal ip

configs

normal

  • config/GeoIP-CN ------ IPs in china
  • config/local.json ------ host and port config
    • host
    • proxyPortCeil ---- socks port min
    • httpPort
    • pacPort
    • allowDelay ---- optimal timeout
  • config/pac.js ------ pac file functions
  • config/server.json ------ shadowsocks server and password,types

spider rules

In spider/source.js, all shadowsocks server nodes item list.You can add/edit/delete them.cardinal use this to make tunnel.if you have a shadowsocks server,you can use sc start option.

  • url spider webpage url.
  • deXml DOM analyse function, param is a buffer,return a array/null.

example like this:

{
    url: 'https://freessr.xyz/',
    deXml: function (body) {
        try {
            let $ = cheerio.load(body);
            let list = $('.col-md-6.text-center');
            let arr = [];
            for (let i = 0; i < list.length - 1; i++) {
                if (ciphers[$(list[i]).find('h4').eq('3').html().split(':')[1]]) {
                    arr.push({
                        "host": $(list[i]).find('h4').eq('0').html().split(':')[1],
                        "port": $(list[i]).find('h4').eq('1').html().split(':')[1],
                        "password": $(list[i]).find('h4').eq('2').html().split(':')[1],
                        "method": $(list[i]).find('h4').eq('3').html().split(':')[1],
                        "remarks": "frss",
                        "auth": false
                    });
                }
            }
            return arr;
        } catch (e) {
            return null;
        }
    }
}

license

other

3.2.4

7 years ago

3.2.3

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.9

7 years ago

3.1.8

7 years ago

3.1.7

7 years ago

3.1.6

7 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago