Przeglądaj źródła

check proxy enabled on firefox

Nicolas Cannasse 18 lat temu
rodzic
commit
54436da226
1 zmienionych plików z 5 dodań i 0 usunięć
  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;