fix
This commit is contained in:
@@ -1194,11 +1194,24 @@ function tuanAward(activeId, tuanId, isTuanLeader = true) {
|
||||
|
||||
function updateTuanIdsCDN(url = 'https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_updateFactoryTuanId.json') {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url,
|
||||
timeout: 200000,
|
||||
headers:{
|
||||
const options = {
|
||||
url: `${url}?${new Date()}`, "timeout": 10000, headers: {
|
||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
|
||||
}}, (err, resp, data) => {
|
||||
}
|
||||
};
|
||||
if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) {
|
||||
const tunnel = require("tunnel");
|
||||
const agent = {
|
||||
https: tunnel.httpsOverHttp({
|
||||
proxy: {
|
||||
host: process.env.TG_PROXY_HOST,
|
||||
port: process.env.TG_PROXY_PORT * 1
|
||||
}
|
||||
})
|
||||
}
|
||||
Object.assign(options, { agent })
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
// console.log(`${JSON.stringify(err)}`)
|
||||
|
Reference in New Issue
Block a user