commit
2916eccff5
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ proxifiedContainers = {
|
|||
|
||||
// Parses a proxy description string of the format type://host[:port] or type://username:password@host[:port] (port is optional)
|
||||
parseProxy(proxy_str, mozillaVpnData = null) {
|
||||
const proxyRegexp = /(?<type>(https?)|(socks4?)):\/\/(\b(?<username>\w+):(?<password>\w+)@)?(?<host>((?:\d{1,3}\.){3}\d{1,3}\b)|(\b([\w.-]+)+))(:(?<port>\d+))?/;
|
||||
const proxyRegexp = /(?<type>(https?)|(socks4?)):\/\/(\b(?<username>[\w-]+):(?<password>[\w-]+)@)?(?<host>((?:\d{1,3}\.){3}\d{1,3}\b)|(\b([\w.-]+)+))(:(?<port>\d+))?/;
|
||||
const matches = proxyRegexp.exec(proxy_str);
|
||||
if (!matches) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue