在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:mattcg/socks5-https-client开源软件地址:https://github.com/mattcg/socks5-https-client开源编程语言:JavaScript 96.6%开源软件介绍:SOCKS5 HTTPS ClientSOCKS v5 HTTPS client implementation in JavaScript for Node.js. var shttps = require('socks5-https-client');
shttps.get({
hostname: 'encrypted.google.com',
path: '/',
rejectUnauthorized: true // This is the default.
}, function(res) {
res.setEncoding('utf8');
res.on('readable', function() {
console.log(res.read()); // Log response to console.
});
}); Specify the Username and password authentication is supported with the You may also pass a URL as the first argument to Using with TorWorks great for making HTTPS requests through Tor. Make sure a Tor server is running locally and run Using with RequestTo use with Request, just pass a reference to the var Agent = require('socks5-https-client/lib/Agent');
request({
url: 'https://encrypted.google.com/',
strictSSL: true,
agentClass: Agent,
agentOptions: {
socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
socksPort: 9050, // Defaults to 1080.
// Optional credentials
socksUsername: 'proxyuser',
socksPassword: 'p@ssw0rd',
}
}, function(err, res) {
console.log(err || res.body);
}); HTTPThis client only provides support for making HTTPS requests. See socks5-http-client for an HTTP implementation. LicenseCopyright © 2013 Matthew Caruana Galizia, licensed under an MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论