UNPKG

shadowsocks-single

Version:

Yet another shadowsocks implementation for nodejs to help you bypass firewalls.

29 lines (25 loc) 542 B
const startSSLocal = require('../lib/cli').startSSLocal; const config = { proxyOptions: { serverAddr: '10.10.10.10', serverPort: 8989, localAddr: '127.0.0.1', localPort: 1081, password: 'hello', timeout: 600, method: 'aes-256-cfb', level: 'debug' } } async function run() { try{ let {port, server} = await startSSLocal(config) console.log('startSSLocal on port', port) setTimeout(()=>{ server.close() }, 2000) } catch(e) { console.log('startSSLocal failed', e) } } run()