diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples')
3 files changed, 0 insertions, 94 deletions
diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js deleted file mode 100644 index 82d6afa97b..0000000000 --- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/associate.js +++ /dev/null @@ -1,33 +0,0 @@ -var Socks = require('../index.js'); -var dgram = require('dgram'); - -var options = { - proxy: { - ipaddress: "202.101.228.108", - port: 1080, - type: 5, - command: 'associate' - }, - - target: { - host: "0.0.0.0", - port: 0 - } -}; - -Socks.createConnection(options, function(err, socket, info) { - if (err) - console.log(err); - else { - console.log("Connected"); - - // Associate request completed. - // Now we can send properly formed UDP packet frames to this endpoint for forwarding: - console.log(info); - // { port: 4381, host: '202.101.228.108' } - - var udp = new dgram.Socket('udp4'); - var packet = SocksClient.createUDPFrame({ host: "1.2.3.4", port: 5454}, new Buffer("Hello")); - udp.send(packet, 0, packet.length, info.port, info.host); - } -});
\ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js deleted file mode 100644 index 4410dd1def..0000000000 --- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/bind.js +++ /dev/null @@ -1,30 +0,0 @@ -var Socks = require('../index.js'); - -var options = { - proxy: { - ipaddress: "202.101.228.108", - 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: '202.101.228.108' } - - // Resume! You need to! - socket.resume(); - } -});
\ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js b/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js deleted file mode 100644 index 528ad4d416..0000000000 --- a/deps/npm/node_modules/npm-registry-fetch/node_modules/socks/examples/connect.js +++ /dev/null @@ -1,31 +0,0 @@ -var Socks = require('../index.js'); - -var options = { - proxy: { - ipaddress: "31.193.133.9", - port: 1081, - type: 5 // (4 or 5) - }, - - target: { - host: "173.194.33.103", // (google.com) - port: 80 - } -}; - -Socks.createConnection(options, function (err, socket, info) { - if (err) - console.log(err); - else { - console.log("Connected"); - - socket.on('data', function (data) { - // do something with incoming data - }); - - // Please remember that sockets need to be resumed before any data will come in. - socket.resume(); - - // We can do whatever we want with the socket now. - } -});
\ No newline at end of file |