diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js index 85c31da..91661b3 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/ProxyEditor.js @@ -64,7 +64,7 @@ export default function getProxyEditor(theState) { { text-align: center; } - table.editor tr.proxyRow input[name="hostname"] { + table.editor tr.proxyRow input[name="crededHostname"] { padding: 0; } @@ -217,10 +217,10 @@ export default function getProxyEditor(theState) { }, {}); const type = that.state.selectedNewType; - const hostname = elements.newHostname; + const crededHostname = elements.newHostname; const port = elements.newPort; - const newValue = `${that.props.proxyStringRaw}; ${type} ${hostname}:${port}` + const newValue = `${that.props.proxyStringRaw}; ${type} ${crededHostname}:${port}` .trim().replace(/(\s*;\s*)+/, '; '); that.props.setProxyStringRaw(true, newValue); @@ -324,7 +324,12 @@ export default function getProxyEditor(theState) { { splitBySemi(this.props.proxyStringRaw).map((proxyAsString, index) => { - const [type, addr] = proxyAsString.trim().split(/\s+/); + const [type, crededAddr] = proxyAsString.trim().split(/\s+/); + let [creds, addr] = crededAddr.split('@'); + if (!addr) { + addr = creds; + creds = ''; + } const [hostname, port] = addr.split(':'); return ( @@ -335,7 +340,7 @@ export default function getProxyEditor(theState) { >X {type} - + {port}