testing
This commit is contained in:
parent
f5a5ff0a76
commit
e4d5dba73a
4 changed files with 103 additions and 100 deletions
|
|
@ -37,7 +37,7 @@ export const proxyProvider: ProviderConfig = {
|
||||||
}),
|
}),
|
||||||
queueManager,
|
queueManager,
|
||||||
{
|
{
|
||||||
totalDelayHours: 4, //parseFloat(process.env.PROXY_VALIDATION_HOURS || '1'),
|
totalDelayHours: 0.1, //parseFloat(process.env.PROXY_VALIDATION_HOURS || '1'),
|
||||||
batchSize: parseInt(process.env.PROXY_BATCH_SIZE || '200'),
|
batchSize: parseInt(process.env.PROXY_BATCH_SIZE || '200'),
|
||||||
useBatching: process.env.PROXY_DIRECT_MODE !== 'true',
|
useBatching: process.env.PROXY_DIRECT_MODE !== 'true',
|
||||||
priority: 2,
|
priority: 2,
|
||||||
|
|
|
||||||
|
|
@ -54,103 +54,103 @@ const PROXY_CONFIG = {
|
||||||
url: 'https://raw.githubusercontent.com/databay-labs/free-proxy-list/refs/heads/master/http.txt',
|
url: 'https://raw.githubusercontent.com/databay-labs/free-proxy-list/refs/heads/master/http.txt',
|
||||||
protocol: 'http',
|
protocol: 'http',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: 'speedx',
|
// id: 'speedx',
|
||||||
url: 'https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt',
|
// url: 'https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'monosans',
|
// id: 'monosans',
|
||||||
url: 'https://raw.githubusercontent.com/monosans/proxy-list/main/proxies/http.txt',
|
// url: 'https://raw.githubusercontent.com/monosans/proxy-list/main/proxies/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
id: 'murong',
|
// id: 'murong',
|
||||||
url: 'https://raw.githubusercontent.com/MuRongPIG/Proxy-Master/main/http.txt',
|
// url: 'https://raw.githubusercontent.com/MuRongPIG/Proxy-Master/main/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'vakhov-fresh',
|
// id: 'vakhov-fresh',
|
||||||
url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/master/http.txt',
|
// url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/master/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'kangproxy',
|
// id: 'kangproxy',
|
||||||
url: 'https://raw.githubusercontent.com/officialputuid/KangProxy/refs/heads/KangProxy/http/http.txt',
|
// url: 'https://raw.githubusercontent.com/officialputuid/KangProxy/refs/heads/KangProxy/http/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'gfpcom',
|
// id: 'gfpcom',
|
||||||
url: 'https://raw.githubusercontent.com/gfpcom/free-proxy-list/refs/heads/main/list/http.txt',
|
// url: 'https://raw.githubusercontent.com/gfpcom/free-proxy-list/refs/heads/main/list/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'dpangestuw',
|
// id: 'dpangestuw',
|
||||||
url: 'https://raw.githubusercontent.com/dpangestuw/Free-Proxy/refs/heads/main/http_proxies.txt',
|
// url: 'https://raw.githubusercontent.com/dpangestuw/Free-Proxy/refs/heads/main/http_proxies.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'gitrecon',
|
// id: 'gitrecon',
|
||||||
url: 'https://raw.githubusercontent.com/gitrecon1455/fresh-proxy-list/refs/heads/main/proxylist.txt',
|
// url: 'https://raw.githubusercontent.com/gitrecon1455/fresh-proxy-list/refs/heads/main/proxylist.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'vakhov-master',
|
// id: 'vakhov-master',
|
||||||
url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/refs/heads/master/http.txt',
|
// url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/refs/heads/master/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'breaking-tech',
|
// id: 'breaking-tech',
|
||||||
url: 'https://raw.githubusercontent.com/BreakingTechFr/Proxy_Free/refs/heads/main/proxies/http.txt',
|
// url: 'https://raw.githubusercontent.com/BreakingTechFr/Proxy_Free/refs/heads/main/proxies/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'ercindedeoglu',
|
// id: 'ercindedeoglu',
|
||||||
url: 'https://raw.githubusercontent.com/ErcinDedeoglu/proxies/main/proxies/http.txt',
|
// url: 'https://raw.githubusercontent.com/ErcinDedeoglu/proxies/main/proxies/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'tuanminpay',
|
// id: 'tuanminpay',
|
||||||
url: 'https://raw.githubusercontent.com/TuanMinPay/live-proxy/master/http.txt',
|
// url: 'https://raw.githubusercontent.com/TuanMinPay/live-proxy/master/http.txt',
|
||||||
protocol: 'http',
|
// protocol: 'http',
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
id: 'r00tee-https',
|
// id: 'r00tee-https',
|
||||||
url: 'https://raw.githubusercontent.com/r00tee/Proxy-List/refs/heads/main/Https.txt',
|
// url: 'https://raw.githubusercontent.com/r00tee/Proxy-List/refs/heads/main/Https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'ercindedeoglu-https',
|
// id: 'ercindedeoglu-https',
|
||||||
url: 'https://raw.githubusercontent.com/ErcinDedeoglu/proxies/main/proxies/https.txt',
|
// url: 'https://raw.githubusercontent.com/ErcinDedeoglu/proxies/main/proxies/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'vakhov-fresh-https',
|
// id: 'vakhov-fresh-https',
|
||||||
url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/refs/heads/master/https.txt',
|
// url: 'https://raw.githubusercontent.com/vakhov/fresh-proxy-list/refs/heads/master/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'databay-https',
|
// id: 'databay-https',
|
||||||
url: 'https://raw.githubusercontent.com/databay-labs/free-proxy-list/refs/heads/master/https.txt',
|
// url: 'https://raw.githubusercontent.com/databay-labs/free-proxy-list/refs/heads/master/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'kangproxy-https',
|
// id: 'kangproxy-https',
|
||||||
url: 'https://raw.githubusercontent.com/officialputuid/KangProxy/refs/heads/KangProxy/https/https.txt',
|
// url: 'https://raw.githubusercontent.com/officialputuid/KangProxy/refs/heads/KangProxy/https/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'zloi-user-https',
|
// id: 'zloi-user-https',
|
||||||
url: 'https://raw.githubusercontent.com/zloi-user/hideip.me/refs/heads/master/https.txt',
|
// url: 'https://raw.githubusercontent.com/zloi-user/hideip.me/refs/heads/master/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
id: 'gfpcom-https',
|
// id: 'gfpcom-https',
|
||||||
url: 'https://raw.githubusercontent.com/gfpcom/free-proxy-list/refs/heads/main/list/https.txt',
|
// url: 'https://raw.githubusercontent.com/gfpcom/free-proxy-list/refs/heads/main/list/https.txt',
|
||||||
protocol: 'https',
|
// protocol: 'https',
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ export class QueueService {
|
||||||
private queueEvents!: QueueEvents;
|
private queueEvents!: QueueEvents;
|
||||||
|
|
||||||
private config = {
|
private config = {
|
||||||
workers: parseInt(process.env.WORKER_COUNT || '5'),
|
workers: 1, //parseInt(process.env.WORKER_COUNT || '5'),
|
||||||
concurrency: parseInt(process.env.WORKER_CONCURRENCY || '20'),
|
concurrency: 1, //parseInt(process.env.WORKER_CONCURRENCY || '20'),
|
||||||
redis: {
|
redis: {
|
||||||
host: process.env.DRAGONFLY_HOST || 'localhost',
|
host: process.env.DRAGONFLY_HOST || 'localhost',
|
||||||
port: parseInt(process.env.DRAGONFLY_PORT || '6379'),
|
port: parseInt(process.env.DRAGONFLY_PORT || '6379'),
|
||||||
|
|
@ -45,7 +45,10 @@ export class QueueService {
|
||||||
removeOnComplete: 10,
|
removeOnComplete: 10,
|
||||||
removeOnFail: 5,
|
removeOnFail: 5,
|
||||||
attempts: 3,
|
attempts: 3,
|
||||||
backoff: { type: 'exponential', delay: 1000 },
|
backoff: {
|
||||||
|
type: 'exponential',
|
||||||
|
delay: 1000,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -282,4 +282,4 @@ program
|
||||||
// Parse command line arguments
|
// Parse command line arguments
|
||||||
program.parse();
|
program.parse();
|
||||||
|
|
||||||
export { runBacktest, listStrategies, validateStrategy };
|
export { listStrategies, runBacktest, validateStrategy };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue