<reponame>lelik004/DRF_TODO<filename>TODOnotes/node_modules/npx/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/examples/bind.js<gh_stars>0var Socks = require('../index.js');

var options = {
    proxy: {
        ipaddress: "192.168.3.11",
        port: 1080,
        type: 5,
        command: 'bind'
    },

    target: {
        host: "0.0.0.0",
        port: 0
    }
};

Socks.createConnection(options, function(err, socket, info) {
    if (err)
        console.log(err);
    else {
        console.log("Connected");

        // BIND request completed, now a tcp client should connect to this endpoint:
        console.log(info);
        // { port: 3334, host: '192.168.3.11' }

        // Resume! You need to!
        socket.resume();
    }
});