mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-10 19:46:34 +03:00
Allow following spaces in name and password
This commit is contained in:
parent
b0f9cd2694
commit
bc439c22f7
|
@ -328,9 +328,19 @@ export default function getProxyEditor(theState) {
|
|||
</tr>
|
||||
{/* ADD NEW PROXY ENDS. */}
|
||||
{
|
||||
splitBySemi(this.props.proxyStringRaw).map((proxyAsString, index) => {
|
||||
splitBySemi(this.props.proxyStringRaw).map((proxyAsStringRaw, index) => {
|
||||
|
||||
const proxyAsString = proxyAsStringRaw.trim();
|
||||
const [type] = proxyAsString.split(/\s+/);
|
||||
/*
|
||||
if (!/^[a-zA-Z0-9]+$/.test(type)) {
|
||||
throw new Error(`${type} is not a proxy type!`);
|
||||
}
|
||||
JS has no code blocks in RE, seems safe to omit this check.
|
||||
*/
|
||||
const typeRe = new RegExp(`^${type}\s+`, 'g');
|
||||
const crededAddr = proxyAsString.replace(typeRe, '');
|
||||
|
||||
const [type, crededAddr] = proxyAsString.trim().split(/\s+/);
|
||||
let parts;
|
||||
parts = crededAddr.split('@');
|
||||
let [creds, addr] = [parts.slice(0, -1).join('@'), parts[parts.length - 1]];
|
||||
|
|
Loading…
Reference in New Issue
Block a user