const axios = require('axios');
const crypto = require('crypto');
const license = 'L01234567890123P';
const secret = 'ABCDEFGHIJKLMNOP';
const ts = Math.floor(+new Date() / 1000);
const queries = {
license: license,
time: ts,
// cnt: 1, // 代理数(可选)
};
const md5Sum = crypto.createHash('md5');
md5Sum.update(license + ts + secret);
queries.sign = md5Sum.digest('hex').toLowerCase();
axios.get('https://api-ip.abuyun.com/obtain', {
params: queries,
}).then((response) => {
console.log('Response HTTP Status Code: ', response.status);
console.log('Response HTTP Response Body: ', response.data);
}).catch((e) => {
console.error('Error:', e);
});