blinksocks icon indicating copy to clipboard operation
blinksocks copied to clipboard

Adding support for "in-project" usage...

Open aeroxy opened this issue 5 years ago • 0 comments

Should be able to use as such:

const blinksocks = require('blinksocks');

blinksocks.run('h2').listen(8080);

AND

const http2 = require('http2');
const blinksocks = require('blinksocks');

const server = http2.createServer().listen(8080);

server.on('stream', (stream, headers) => {
  if (headers[':path'] === 'xxx') {
    stream.pipe(blinksocks.run('h2'));
  }
});

aeroxy avatar Aug 10 '20 13:08 aeroxy