Class FirefoxSettingParser
java.lang.Object
com.github.markusbernhardt.proxy.search.browser.firefox.FirefoxSettingParser
Parser for the Firefox settings file. Will extract all relevant proxy settings form the configuration file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected File
getSettingsFile
(FirefoxProfileSource source) Reads the profile.ini, searches for the profiles directory and returns a file object pointing to the settings file.parseSettings
(FirefoxProfileSource source) Parse the settings file and extract all network.proxy.* settings from it.private String
removeDoubleQuotes
(String string) Removes leading and trailing double quotes.
-
Constructor Details
-
FirefoxSettingParser
public FirefoxSettingParser()Constructor
-
-
Method Details
-
parseSettings
Parse the settings file and extract all network.proxy.* settings from it.- Parameters:
source
- of the Firefox profiles.- Returns:
- the parsed properties.
- Throws:
IOException
- on read error.
-
removeDoubleQuotes
Removes leading and trailing double quotes.- Parameters:
string
-- Returns:
-
getSettingsFile
Reads the profile.ini, searches for the profiles directory and returns a file object pointing to the settings file.- Parameters:
source
- of the Firefox profiles.- Returns:
File
object pointing to the settings file- Throws:
IOException
- on read error.
-