Commit c346e22d authored by wang's avatar wang

收集环境

parent 6acd511d
......@@ -6,8 +6,15 @@ import {MongoClient} from "mongodb";
import * as fs from "fs";
let ENVS = JSON.parse(fs.readFileSync('./env.json', 'utf-8').toString())
let keys = Object.keys(ENVS);
const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
// const client = new MongoClient(uri);
const plt = process.platform;
let uri;
if (plt !== 'darwin') {
uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
}else{
uri = 'mongodb://root:123456@192.168.50.110:27017/'
}// const client = new MongoClient(uri);
log4js.levels.INFO.colour = 'white';
// console.log(log4js.levels.INFO.colour);
log4js.configure({
......@@ -57,8 +64,8 @@ class PxBypass {
// prox = `http://uni00001_custom_zone_US_sid_${randint(67336718, 67336728)}_time_5:q39CEBTs5A@us.foxyip.com:7778`
// prox = `http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:${randint(10000, 13500)}`
this.prox = 'http://127.0.0.1:8890'
// this.tlsUrl = 'http://52.52.23.116/tls/forward'
this.tlsUrl = 'http://127.0.0.1:58000/tls/forward'
this.tlsUrl = 'http://52.52.23.116/tls/forward'
// this.tlsUrl = 'http://127.0.0.1:58000/tls/forward'
this.pxHeaders = {
......@@ -118,7 +125,7 @@ class PxBypass {
let proxyRes = await axios({
method: 'post',
url: 'http://ymx-lcc.unififi.com/proxy/get-proxy',
url: 'http://aws-lcc.unififi.com/proxy/get-proxy',
headers: {
'Content-Type': 'application/json'
},
......@@ -144,7 +151,7 @@ class PxBypass {
"accept-language": "en-US",
"cache-control": "no-cache",
"content-type": "application/json",
"ocp-apim-subscription-key": "dc6844776fe84b1c8b68affe7deb7916",
"ocp-apim-subscription-key": "3b6a6994753b4efc86376552e52b8432",
"origin": "https://www.spirit.com",
"pragma": "no-cache",
"referer": "https://www.spirit.com/",
......@@ -152,7 +159,7 @@ class PxBypass {
'Authorization': 'Bearer ' + token,
"cookie": cks
}
let res = await axios.post('http://ymx-lcc.unififi.com/header/add', JSON.stringify({
let res = await axios.post('http://aws-lcc.unififi.com/header/add', JSON.stringify({
'brush_fromto': 'LAS-BOS',
'brush_fromdate': '2023-05-26',
'brush_header': headers,
......@@ -391,7 +398,7 @@ class PxBypass {
let res = await this.do_collector(data)
this.seq++;
this.pxenv = new PxEnv(this.env, this.url, this.sid, this.vid, this.ts, this.num1, this.num2,
this.pxenv = new PxEnv(undefined, this.env, this.url, this.sid, this.vid, this.ts, this.num1, this.num2,
this.str1, this.uuid,
this.startTs, this.startTs2, this.performanceNow, this.px12280)
......@@ -455,7 +462,7 @@ class PxBypass {
"accept-language": "en",
"cache-control": "no-cache",
"content-type": "application/json",
"ocp-apim-subscription-key": "dc6844776fe84b1c8b68affe7deb7916",
"ocp-apim-subscription-key": "3b6a6994753b4efc86376552e52b8432",
"origin": "https://www.spirit.com",
"pragma": "no-cache",
"referer": "https://www.spirit.com/",
......@@ -505,7 +512,7 @@ class PxBypass {
async function run() {
while (true) {
try {
// let res = await axios.get('http://ymx-lcc.unififi.com/header/task/pull/cookieF9?brush_name=test')
// let res = await axios.get('http://aws-lcc.unififi.com/header/task/pull/cookieF9?brush_name=test')
// let data = res.data;
let data = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment