Explorar o código

check proxy enabled on firefox

Nicolas Cannasse %!s(int64=18) %!d(string=hai) anos
pai
achega
54436da226
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      std/neko/net/ProxyDetect.hx

+ 5 - 0
std/neko/net/ProxyDetect.hx

@@ -59,6 +59,11 @@ class ProxyDetect {
 	static function detectFF( basedir : String ) {
 		var profile = neko.FileSystem.readDirectory(basedir).pop();
 		var prefs = neko.io.File.getContent(basedir+"/"+profile+"/prefs.js");
+		// enabled ?
+		var r = ~/user_pref\("network\.proxy\.type", 1);/;
+		if( !r.match(prefs) )
+			return null;
+		// prefs
 		var r = ~/user_pref\("network\.proxy\.http", "([^"]+)"\);/;
 		if( !r.match(prefs) )
 			return null;