|
@@ -20,10 +20,19 @@ export function getProxyUrl() {
|
|
return `http://tuxla:${pass}@geo.iproyal.com:12321`
|
|
return `http://tuxla:${pass}@geo.iproyal.com:12321`
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+export function generate2CaptchaProxyAgent(){
|
|
|
|
+ const username = `u3e4c2852572e05c5-zone-custom-session-${generateRandomString(9)}-sessTime-20`
|
|
|
|
+ const password = 'u3e4c2852572e05c5'
|
|
|
|
+ return new HttpsProxyAgent(`http://${username}:${password}@43.152.113.55:2334`)
|
|
|
|
+}
|
|
|
|
+
|
|
export function getAxiosClient(useProxy: boolean) {
|
|
export function getAxiosClient(useProxy: boolean) {
|
|
const pass = `test1234_session-${generateRandomString(8)}_lifetime-1h`
|
|
const pass = `test1234_session-${generateRandomString(8)}_lifetime-1h`
|
|
|
|
+ // const proxyAgent = useProxy
|
|
|
|
+ // ? new HttpsProxyAgent(`http://tuxla:${pass}@geo.iproyal.com:12321`)
|
|
|
|
+ // : undefined
|
|
const proxyAgent = useProxy
|
|
const proxyAgent = useProxy
|
|
- ? new HttpsProxyAgent(`http://tuxla:${pass}@geo.iproyal.com:12321`)
|
|
|
|
|
|
+ ? generate2CaptchaProxyAgent()
|
|
: undefined
|
|
: undefined
|
|
return axios.create({
|
|
return axios.create({
|
|
httpsAgent: proxyAgent,
|
|
httpsAgent: proxyAgent,
|