mirror of
				https://github.com/anticensority/runet-censorship-bypass.git
				synced 2025-10-30 23:47:56 +03:00 
			
		
		
		
	Define migration replacement
This commit is contained in:
		
							parent
							
								
									15e95d6e07
								
							
						
					
					
						commit
						c9c7b15d9b
					
				|  | @ -527,10 +527,10 @@ | |||
|       console.log('Updating from', oldStorage.version, 'to', antiCensorRu.version); | ||||
|       if (window.apis.version.isLeq(oldStorage.version, '0.0.1.5')) { | ||||
| 
 | ||||
|         // Change semicolons to newlines in proxy string (raw).
 | ||||
|         // TODO:
 | ||||
|         // Change semicolons to semicolons followed by newlines in proxy string (raw).
 | ||||
|         const migrateProxies = (oldStr) => oldStr.replace(/;\r?\n?/g, ';\n'); | ||||
|         const modsMutated = window.apis.pacKitchen.getPacMods(); | ||||
|         modsMutated['customProxyStringRaw'] = MIGRATE(conf.value); | ||||
|         modsMutated['customProxyStringRaw'] = migrateProxies(conf.value); | ||||
|         window.apis.pacKitchen.keepCookedNowAsync(modsMutated, cb); | ||||
| 
 | ||||
|       } | ||||
|  |  | |||
|  | @ -161,10 +161,10 @@ export default function getProxyEditor(theState) { | |||
|   const splitBySemi = (proxyString) => proxyString | ||||
|     .replace(/#.*$/mg, '') | ||||
|     .trim() | ||||
|     .split(/\s*;\s*/g) | ||||
|     .split(/\s*;\r?\n\s*/g) | ||||
|     .filter((s) => s); | ||||
| 
 | ||||
|   const joinBySemi = (strs) => strs.join(';\n') + ';'; | ||||
|   const joinBySemi = (strs) => strs.join(';\n') + ';\n'; | ||||
|   const normalizeProxyString = (str) => joinBySemi(splitBySemi(str)); | ||||
| 
 | ||||
|   const PROXY_TYPE_LABEL_PAIRS = [['PROXY', 'PROXY/HTTP'],['HTTPS'],['SOCKS4'],['SOCKS5'],['SOCKS']]; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user