This commit is contained in:
Boki 2025-06-11 10:35:15 -04:00
parent d85cd58acd
commit 597c6efc9b
91 changed files with 2224 additions and 1400 deletions

View file

@ -16,7 +16,7 @@ const getEvery24HourCron = (): string => {
export const proxyProvider: ProviderConfig = {
name: 'proxy-provider',
operations: {
'fetch-and-check': async (payload: { sources?: string[] }) => {
'fetch-and-check': async (_payload: { sources?: string[] }) => {
const { proxyService } = await import('./proxy.tasks');
const { queueManager } = await import('../services/queue.service');
const { processItems } = await import('../utils/batch-helpers');

View file

@ -172,8 +172,8 @@ let proxyStats: ProxySource[] = PROXY_CONFIG.PROXY_SOURCES.map(source => ({
async function updateProxyStats(sourceId: string, success: boolean) {
const source = proxyStats.find(s => s.id === sourceId);
if (source !== undefined) {
if (typeof source.working !== 'number') source.working = 0;
if (typeof source.total !== 'number') source.total = 0;
if (typeof source.working !== 'number') {source.working = 0;}
if (typeof source.total !== 'number') {source.total = 0;}
source.total += 1;
if (success) {
source.working += 1;
@ -400,7 +400,7 @@ export async function fetchProxiesFromSource(source: ProxySource): Promise<Proxy
for (const line of lines) {
let trimmed = line.trim();
trimmed = cleanProxyUrl(trimmed);
if (!trimmed || trimmed.startsWith('#')) continue;
if (!trimmed || trimmed.startsWith('#')) {continue;}
// Parse formats like "host:port" or "host:port:user:pass"
const parts = trimmed.split(':');

View file

@ -82,7 +82,7 @@ export function createProviderRegistry(): ProviderRegistry {
function getAllScheduledJobs(): Array<{ provider: string; job: ScheduledJob }> {
const allJobs: Array<{ provider: string; job: ScheduledJob }> = [];
for (const [key, config] of providers) {
for (const [, config] of providers) {
if (config.scheduledJobs) {
for (const job of config.scheduledJobs) {
allJobs.push({