hidemyname-proxy-parser v1.1.1
hidemyname-proxy-parser
Another languages
About in a few words
This module can parse walls of the specified VK.com groups key-distributors, search on them for HideMyName API keys, then use found keys for parsing free proxies. You will need VK API token received with this method. If you have stuck on something, feel free to contact me on my Telegram.
Install
npm i hidemyname-proxy-parser
How to use
You should get the result with this simple code:
const HMNproxyParser = require('hidemyname-proxy-parser');
const config = require('hidemyname-proxy-parser/config-example');
// your VK API token, it can be without any additional access rights
config.vkToken = 'dkvm2w0v0me2i04x02d23d04xk204dmlzd20z032scswv23v2al';
HMNproxyParser(config)
.then(console.log)
.catch(console.log)
But be patient. Unfortunately, HideMyName API have huge delay restrictions, so the module will need to wait a ~minute after every unsuccessfull request: for example, if a key was wrong.
:warning: Important note:
If you gonna to use the module non-stop (constantly restarting it), you need to set the config.launchDelay
property to true
,
because requests to the HideMyName API must be delayed. Otherwise you can be banned (for a ~5-6 minutes), but
only if you will use the module non-stop. Don't torture yourself with unnecessary ~1 minute delay.
Expected output
/*
workingKey - HideMyName API key that works for now;
If you have big delays (that probably can be only on key checking
by HideMyName API), or you have your own 100% working key, you should
provide workingKey or yourKey to config.keysToTryFirst array
*/
/* If succeed and config.formatting = true,
module will resolve promise with next object: */
{ error: null,
proxiesArr: [
'http://5.167.51.235:8080',
'http://185.75.5.158:60819',
'socks4://212.58.202.70:4145',
'socks5://91.217.109.177:5555'...
],
workingKey: '22749864500947' }
/* If succeed and config.formatting is undefined or false,
module will resolve promise with next object: */
{ error: null,
proxiesArr: [
{ host: '62.173.145.211',
ip: '62.173.145.211',
port: '8118',
lastseen: 2289,
delay: 560,
cid: '524901',
country_code: 'RU',
country_name: 'Russian Federation',
city: 'Moscow',
checks_up: '33',
checks_down: '54',
anon: '4',
http: '0',
ssl: '1',
socks4: '0',
socks5: '0' },
{ host: '176.196.84.138',
ip: '176.196.84.138',
port: '51336',
lastseen: 2312,
delay: 4740,
cid: '1503901',
country_code: 'RU',
country_name: 'Russian Federation',
city: 'Kemerovo',
checks_up: '5502',
checks_down: '1319',
anon: '4',
http: '1',
ssl: '0',
socks4: '0',
socks5: '0' },
{ host: '192.162.193.243',
ip: '192.162.193.243',
port: '36910',
lastseen: 2312,
delay: 5100,
cid: '479532',
country_code: 'RU',
country_name: 'Russian Federation',
city: 'Uglich',
checks_up: '3832',
checks_down: '1317',
anon: '4',
http: '1',
ssl: '0',
socks4: '0',
socks5: '0' }...
],
workingKey: '22749864500947' }
/* If fails, but workingKey was found,
module will resolve promise with next object: */
{ error: someError,
proxiesArr: null,
workingKey: '22749864500947' }
// If all fails completely, module will reject promise with some error
VK.com groups key-distributors
HideMyName working with keys system. With valid paid or free key you can get access to proxies or to VPN through the PC or mobile client. There are few known public groups for now that make everyday giveaways of free one-day keys:
However, their functionality can be suspended at anytime. Also, sometimes even fresh keys from the groups can be non-working for the API.
Detailed config description
const config = {
/* If false, module on success will return
proxy list just as it was received from HideMyName API */
// True will return simple "protocol://ip:port" array
formatting: true, // Default: true
/* If you gonna to use the module non-stop (launch after launch),
you need to set this variable to true, because requests to HideMyName API
must be delayed. Otherwise you can be banned (for a ~5-6 minutes), but
only if you will use the module non-stop */
// If true, HideMyName API request will be delayed for a ~minute
launchDelay: true, // Default: false
// --- VK keys parser settings
vkToken: "your API token, that doesn't need any additional access rights",
/* Keep in mind:
VK restrict is 5000 requests per day to the wall.get API method.
But even if this module will be working for entire day,
it will make only ~1631 requests (for a two groups) */
groupsToParse: {
151583125: { // vk.com/club151583125
// How much of last wall posts need to be considered
// Pinned post and posts without keys also will be counted
parsedPostsCount: 3, // Default: 3
// If false and pinned post is exist, it will be parsed first
skipPinnedPost: true // Default: true
},
157077128: {} // vk.com/club157077128
},
// Optional, array of your own keys that will be tried primarily
/* Actually needed for reusing the working key
that will be returned by this module on success */
keysToTryFirst: [],
// Due to HideMyName API restrictions, it takes a ~minute to verify one key
// You can easily parse from VK groups up to 50 keys from the last posts
// If all keys will be wrong, it means you will wait ~hour before rejecting
// This variable makes module to reject after N wrong keys,
// Array keysToTryFirst also will be counted
keysTryLimit: 10, // Default unlimited (strongly not recommended)
// ---
// --- HideMyName API query filter
// Proxy-list page: https://hidemy.name/en/proxy-list/?
hidemynameAPIquery: {
// More country codes can be found at the proxy-list page
country: 'ru', // Examples: 'RU' or 'RUCA' or 'LTRUGE'...
// Stands for approximate value of loading some unknown test page
// maxtime: 3000, // ms
/*
h - stands for http, s - https, 4 - socks4, 5 - socks5
If you want to select a few types at once,
you need to join it in 1 string
Examples: 's' or 'hs45' or 'h5' or '54'...
*/
// type: 'sh',
// ports: '80,3128,8080', // Allowed listen-ports (who even needs that?)
// Allowed levels of anonymity
// More info can be found at the proxy-list page
// anon: 1234 // Examples: 4 or 24 or 14 or 3 or 134...
}
// ---
}
Possible future improvements
- Proxy grabber module probably can be optimized for testing 6 API keys in a row, but if all will fail, module will have to wait ~5-6 minutes. Optionally can to return reject. For now it waiting a ~minute after every request (and it probably worse, because working key usually can be found in a few attempts)
- config.groupsToParse.groupID.parsedPostsCount shouldn't count posts without keys