mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-14 15:36:52 +03:00
feat: finalize first modular pack
This commit is contained in:
@@ -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' };
|
||||
}
|
||||
|
||||
|
||||
@@ -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' };
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export function validateUrl(
|
||||
};
|
||||
}
|
||||
return { valid: true, message: 'Valid' };
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
return { valid: false, message: 'Invalid URL format' };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export function validateVlessUrl(url: string): ValidationResult {
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
return { valid: false, message: 'Invalid VLESS URL: parsing failed' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user