{"id":13775878,"url":"https://github.com/shangxinbo/cardinal","last_synced_at":"2025-08-16T16:34:10.062Z","repository":{"id":100726124,"uuid":"67388445","full_name":"shangxinbo/cardinal","owner":"shangxinbo","description":"A socks and http proxy by nodejs for you to  over GWF","archived":false,"fork":false,"pushed_at":"2017-09-28T05:38:39.000Z","size":3138,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T06:31:39.898Z","etag":null,"topics":["cardinal","geoip","http-proxy","pac","shadowsocks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shangxinbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-05T04:38:21.000Z","updated_at":"2020-09-14T12:44:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"610be771-28e3-4353-a702-7e8e43cda5c7","html_url":"https://github.com/shangxinbo/cardinal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shangxinbo%2Fcardinal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shangxinbo%2Fcardinal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shangxinbo%2Fcardinal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shangxinbo%2Fcardinal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shangxinbo","download_url":"https://codeload.github.com/shangxinbo/cardinal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238937490,"owners_count":19555376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cardinal","geoip","http-proxy","pac","shadowsocks"],"created_at":"2024-08-03T17:01:53.383Z","updated_at":"2025-02-15T02:31:41.292Z","avatar_url":"https://github.com/shangxinbo.png","language":"JavaScript","funding_links":[],"categories":["\u003ca id=\"d03d494700077f6a65092985c06bf8e8\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"57b8e953d394bbed52df2a6976d98dfa\"\u003e\u003c/a\u003eSocks"],"readme":"# cardinal\n[![npm](https://img.shields.io/npm/v/cardinalis.svg?style=flat-square)](https://www.npmjs.com/package/cardinalis)\n[![Travis](https://img.shields.io/travis/shangxinbo/cardinal.svg?style=flat-square)](https://travis-ci.org/shangxinbo/cardinal)\n[![Codecov branch](https://img.shields.io/codecov/c/github/shangxinbo/cardinal/master.svg?style=flat-square)](https://codecov.io/gh/shangxinbo/cardinal/branch/3.0)\n\nA shadowsocks client by nodejs, include socks proxy and http proxy\n\n## why another \n@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. \n* [shadowsocks-nodejs](https://github.com/shadowsocks/shadowsocks-nodejs) stop update\n* [shadowsocks-js](https://github.com/oyyd/shadowsocks-js) no http proxy,and no high availability\n* [shadowsocks-windows](https://github.com/shadowsocks/shadowsocks-windows) can't auto config and can't meet me\n* surport Windows(win7+),MacOS\n\n## model\n![model pic](https://raw.githubusercontent.com/shangxinbo/cardinal/master/model.png)\n\n## dependent\n* [node \u003e v4](https://nodejs.org/en/)\n\n## achieve\n* [jet](https://github.com/m31271n/jet)\n\n* use GeoIp to pac file not use gfwlist\n\n* encrypt type filter by shadowsocks and node surport \n\n    \u003e|method | size and length|\n    \u003e|-------|----------------|\n    \u003e|aes-128-ctr | [16, 16]  |\n    \u003e|aes-192-ctr | [24, 16]  |\n    \u003e|aes-192-ctr | [24, 16]  |\n    \u003e|aes-256-ctr | [32, 16]  |\n    \u003e|aes-128-cfb | [16, 16]  |\n    \u003e|aes-192-cfb | [24, 16]  |\n    \u003e|aes-256-cfb | [32, 16]  |\n    \u003e|bf-cfb      | [16, 8]   |\n    \u003e|camellia-128-cfb | [16, 16]|\n    \u003e|camellia-192-cfb | [24, 16]|\n    \u003e|camellia-256-cfb | [32, 16]|\n    \u003e|cast5-cfb   | [16, 8]   |\n    \u003e|des-cfb     | [8, 8]    |\n    \u003e|idea-cfb    | [16, 8]   |\n    \u003e|rc2-cfb     | [16, 8]   |\n    \u003e|salsa20     | [32, 8]   |\n    \u003e|seed-cfb    | [16, 16]  |\n    \n\n## install  \n```\nnpm install -g cardinalis\n```\n## CLI\nUse cardinal to start in CLI\n### options\n* upip\n* sc\n\n### examples\ndefault start\n```\n$ cardinal\n``` \nstart with update GeoIp-CN(IPs in china)\n``` \n$ cardinal ip\n```\n\n## configs\n### normal\n* config/GeoIP-CN    ------   IPs in china \n* config/local.json  ------   host and port config\n  * host\n  * proxyPortCeil  ----   socks port min\n  * httpPort\n  * pacPort\n  * allowDelay     ----   optimal timeout\n* config/pac.js      ------   pac file functions\n* config/server.json ------   shadowsocks server and password,types\n\n### spider rules\nIn 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.\n* url spider webpage url.\n* deXml DOM analyse function, param is a buffer,return a array/null.\n\nexample like this:\n```\n{\n    url: 'https://freessr.xyz/',\n    deXml: function (body) {\n        try {\n            let $ = cheerio.load(body);\n            let list = $('.col-md-6.text-center');\n            let arr = [];\n            for (let i = 0; i \u003c list.length - 1; i++) {\n                if (ciphers[$(list[i]).find('h4').eq('3').html().split(':')[1]]) {\n                    arr.push({\n                        \"host\": $(list[i]).find('h4').eq('0').html().split(':')[1],\n                        \"port\": $(list[i]).find('h4').eq('1').html().split(':')[1],\n                        \"password\": $(list[i]).find('h4').eq('2').html().split(':')[1],\n                        \"method\": $(list[i]).find('h4').eq('3').html().split(':')[1],\n                        \"remarks\": \"frss\",\n                        \"auth\": false\n                    });\n                }\n            }\n            return arr;\n        } catch (e) {\n            return null;\n        }\n    }\n}\n```\n\n## license\n* [GPL](LICENSE)\n\n## other\n* [shadowsocks](https://github.com/shadowsocks)\n* [WPAD 的原理及实现](https://www.ibm.com/developerworks/cn/linux/1309_quwei_wpad/)\n* [PAC Functions](http://findproxyforurl.com/pac-functions/)\n* [Windows上利用Python自动切换代理IP的终极方案！](https://segmentfault.com/a/1190000004315166)\n* [In Windows 7, how to change proxy settings from command line?](https://superuser.com/questions/419696/in-windows-7-how-to-change-proxy-settings-from-command-line)\n* [shadowsocks cipher](http://shadowsocks.org/en/spec/cipher.html)\n* [SOCKS Protocol Version 5](https://www.ietf.org/rfc/rfc1928.txt)\n* [电子前哨基金会](https://www.eff.org/)\n* [Tor](https://www.torproject.org/index.html)\n* [mocha](https://github.com/mochajs/mocha)\n* [chai](https://github.com/chaijs/chai)\n* [HTTP 代理原理及实现](https://imququ.com/post/web-proxy.html)\n* [SSR的讨论](https://github.com/shadowsocks/shadowsocks-windows/issues/293)\n* [SSR的讨论](https://github.com/breakwa11/shadowsocks-rss/issues/28)\n* [纪念ss,向一个伟大的创造告别](https://www.starduster.me/2015/08/21/say-goodbye-to-ss/)\n* [Shadowsocks 的前世后生](http://chinadigitaltimes.net/chinese/2016/08/gfw-blog%EF%BD%9Cshadowsocks-%E7%9A%84%E5%89%8D%E4%B8%96%E5%90%8E%E7%94%9F/)\n* [MacOS set pac](https://support.apple.com/kb/PH18553?locale=zh_CN)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshangxinbo%2Fcardinal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshangxinbo%2Fcardinal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshangxinbo%2Fcardinal/lists"}