mirror of
https://github.com/taixingyiji/openit.git
synced 2025-11-03 04:32:35 +00:00
14 lines
294 B
JavaScript
14 lines
294 B
JavaScript
const Clash = require('..');
|
|
|
|
const clash = Clash({
|
|
secret: 'song940@163.com',
|
|
api: 'http://lsong.me:9090'
|
|
});
|
|
|
|
clash.traffic(({ up, down }) => {
|
|
console.log('traffic: up: %i; down: %i', up, down);
|
|
});
|
|
|
|
clash.logs('debug', ({ type, payload }) => {
|
|
console.log('log', type, payload);
|
|
}); |