mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
Strip DIRECT in the migration of a proxy string
This commit is contained in:
parent
72b4802a45
commit
b42b6a03d4
|
@ -505,6 +505,7 @@ PROXY foobar.com:8080; # Not HTTP!`.trim()}
|
|||
|
||||
return proxyStringRaw
|
||||
.replace(/#.*$/mg, '') // Strip comments.
|
||||
.replace(/\s*DIRECT\s*/g, '') // Remove DIRECT from old versions.
|
||||
.split( /(?:[^\S\r\n]*(?:;|\r?\n)+[^\S\r\n]*)+/g )
|
||||
.map( (p) => p.trim() )
|
||||
.filter((p) => p)
|
||||
|
|
Loading…
Reference in New Issue
Block a user