eslint
This commit is contained in:
parent
8955544593
commit
9d38f9a7b6
91 changed files with 2224 additions and 1400 deletions
|
|
@ -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(':');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue