feat: finalize first modular pack

This commit is contained in:
divocat
2025-10-04 01:15:12 +03:00
parent eb52d52eb4
commit d9a4f50f62
15 changed files with 241 additions and 14 deletions

View File

@@ -31,7 +31,7 @@ export function validateShadowsocksUrl(url: string): ValidationResult {
'Invalid Shadowsocks URL: decoded credentials must contain method:password',
};
}
} catch (e) {
} catch (_e) {
if (!encryptedPart.includes(':') && !encryptedPart.includes('-')) {
return {
valid: false,
@@ -73,7 +73,7 @@ export function validateShadowsocksUrl(url: string): ValidationResult {
message: 'Invalid port number. Must be between 1 and 65535',
};
}
} catch (e) {
} catch (_e) {
return { valid: false, message: 'Invalid Shadowsocks URL: parsing failed' };
}

View File

@@ -18,7 +18,7 @@ export function validateTrojanUrl(url: string): ValidationResult {
message: 'Invalid Trojan URL: must contain username, hostname and port',
};
}
} catch (e) {
} catch (_e) {
return { valid: false, message: 'Invalid Trojan URL: parsing failed' };
}

View File

@@ -14,7 +14,7 @@ export function validateUrl(
};
}
return { valid: true, message: 'Valid' };
} catch (e) {
} catch (_e) {
return { valid: false, message: 'Invalid URL format' };
}
}

View File

@@ -94,7 +94,7 @@ export function validateVlessUrl(url: string): ValidationResult {
};
}
}
} catch (e) {
} catch (_e) {
return { valid: false, message: 'Invalid VLESS URL: parsing failed' };
}