selektor-3.13.73/0000755000175000017500000000000013302030722013030 5ustar bannorbannorselektor-3.13.73/javadoc/0000755000175000017500000000000013302030722014437 5ustar bannorbannorselektor-3.13.73/javadoc/package-summary.html0000644000175000017500000001070313302030722020414 0ustar bannorbannor (SelekTOR Java Documentation)
Skip navigation links

Package <Unnamed>

Skip navigation links
selektor-3.13.73/javadoc/SelekTOR.html0000644000175000017500000002146313302030722016763 0ustar bannorbannor SelekTOR (SelekTOR Java Documentation)
Skip navigation links

Class SelekTOR

Skip navigation links
selektor-3.13.73/javadoc/overview-tree.html0000644000175000017500000002364313302030722020140 0ustar bannorbannor Class Hierarchy (SelekTOR Java Documentation)
Skip navigation links

Hierarchy For All Packages

Package Hierarchies:

Class Hierarchy

Skip navigation links
selektor-3.13.73/javadoc/package-list0000644000175000017500000000001413302030722016721 0ustar bannorbannor client lib selektor-3.13.73/javadoc/package-use.html0000644000175000017500000000734513302030722017523 0ustar bannorbannor Uses of Package (SelekTOR Java Documentation)
Skip navigation links

Uses of Package

No usage of
Skip navigation links
selektor-3.13.73/javadoc/client/0000755000175000017500000000000013302030722015715 5ustar bannorbannorselektor-3.13.73/javadoc/client/TorMonFrame.html0000644000175000017500000005112613302030722021001 0ustar bannorbannor TorMonFrame (SelekTOR Java Documentation)
Skip navigation links
client

Class TorMonFrame

Skip navigation links
selektor-3.13.73/javadoc/client/package-summary.html0000644000175000017500000001516013302030722021674 0ustar bannorbannor client (SelekTOR Java Documentation)
Skip navigation links

Package client

Skip navigation links
selektor-3.13.73/javadoc/client/SelekTOR.html0000644000175000017500000005022113302030722020233 0ustar bannorbannor SelekTOR (SelekTOR Java Documentation)
Skip navigation links
client

Class SelekTOR

Skip navigation links
selektor-3.13.73/javadoc/client/TorController.html0000644000175000017500000017030613302030722021422 0ustar bannorbannor TorController (SelekTOR Java Documentation)
Skip navigation links
client

Class TorController

Skip navigation links
selektor-3.13.73/javadoc/client/PatternsEditor.CustomTableCellRenderer.html0000644000175000017500000005452313302030722026273 0ustar bannorbannor PatternsEditor.CustomTableCellRenderer (SelekTOR Java Documentation)
Skip navigation links
client

Class PatternsEditor.CustomTableCellRenderer

Skip navigation links
selektor-3.13.73/javadoc/client/TorCircuit.html0000644000175000017500000005311013302030722020672 0ustar bannorbannor TorCircuit (SelekTOR Java Documentation)
Skip navigation links
client

Class TorCircuit

Skip navigation links
selektor-3.13.73/javadoc/client/package-use.html0000644000175000017500000001351513302030722020775 0ustar bannorbannor Uses of Package client (SelekTOR Java Documentation)
Skip navigation links

Uses of Package
client

Skip navigation links
selektor-3.13.73/javadoc/client/package-frame.html0000644000175000017500000000407713302030722021276 0ustar bannorbannor client (SelekTOR Java Documentation)

client

Classes

selektor-3.13.73/javadoc/client/package-tree.html0000644000175000017500000001767713302030722021155 0ustar bannorbannor client Class Hierarchy (SelekTOR Java Documentation)
Skip navigation links

Hierarchy For Package client

Package Hierarchies:

Class Hierarchy

Skip navigation links
selektor-3.13.73/javadoc/client/NodeItem.html0000644000175000017500000010633013302030722020312 0ustar bannorbannor NodeItem (SelekTOR Java Documentation)
Skip navigation links
client

Class NodeItem

Skip navigation links
selektor-3.13.73/javadoc/client/ExitNodeTableModel.html0000644000175000017500000005470713302030722022270 0ustar bannorbannor ExitNodeTableModel (SelekTOR Java Documentation)
Skip navigation links
client

Class ExitNodeTableModel

Skip navigation links
selektor-3.13.73/javadoc/client/PatternsEditor.PACTableModel.html0000644000175000017500000004267413302030722024122 0ustar bannorbannor PatternsEditor.PACTableModel (SelekTOR Java Documentation)
Skip navigation links
client

Class PatternsEditor.PACTableModel

Skip navigation links
selektor-3.13.73/javadoc/client/PrefsDialog.html0000644000175000017500000005740513302030722021015 0ustar bannorbannor PrefsDialog (SelekTOR Java Documentation)
Skip navigation links
client

Class PrefsDialog

Skip navigation links
selektor-3.13.73/javadoc/client/TorProcess.html0000644000175000017500000015313113302030722020712 0ustar bannorbannor TorProcess (SelekTOR Java Documentation)
Skip navigation links
client

Class TorProcess

Skip navigation links
selektor-3.13.73/javadoc/client/QuickAddDialog.html0000644000175000017500000006123313302030722021415 0ustar bannorbannor QuickAddDialog (SelekTOR Java Documentation)
Skip navigation links
client

Class QuickAddDialog

Skip navigation links
selektor-3.13.73/javadoc/client/NodeList.html0000644000175000017500000007064113302030722020334 0ustar bannorbannor NodeList (SelekTOR Java Documentation)
Skip navigation links
client

Class NodeList

Skip navigation links
selektor-3.13.73/javadoc/client/GuardNodeDialog.html0000644000175000017500000005523213302030722021602 0ustar bannorbannor GuardNodeDialog (SelekTOR Java Documentation)
Skip navigation links
client

Class GuardNodeDialog

Skip navigation links
selektor-3.13.73/javadoc/client/PatternsEditor.html0000644000175000017500000006026013302030722021556 0ustar bannorbannor PatternsEditor (SelekTOR Java Documentation)
Skip navigation links
client

Class PatternsEditor

Skip navigation links
selektor-3.13.73/javadoc/client/PacFactory.html0000644000175000017500000007727713302030722020662 0ustar bannorbannor PacFactory (SelekTOR Java Documentation)
Skip navigation links
client

Class PacFactory

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/0000755000175000017500000000000013302030722017614 5ustar bannorbannorselektor-3.13.73/javadoc/client/class-use/TorMonFrame.html0000644000175000017500000001011313302030722022667 0ustar bannorbannor Uses of Class client.TorMonFrame (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.TorMonFrame

No usage of client.TorMonFrame
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/SelekTOR.html0000644000175000017500000001005213302030722022130 0ustar bannorbannor Uses of Class client.SelekTOR (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.SelekTOR

No usage of client.SelekTOR
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/TorController.html0000644000175000017500000001354413302030722023321 0ustar bannorbannor Uses of Class client.TorController (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.TorController

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/PatternsEditor.CustomTableCellRenderer.html0000644000175000017500000001056413302030722030167 0ustar bannorbannor Uses of Class client.PatternsEditor.CustomTableCellRenderer (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.PatternsEditor.CustomTableCellRenderer

No usage of client.PatternsEditor.CustomTableCellRenderer
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/TorCircuit.html0000644000175000017500000001536513302030722022603 0ustar bannorbannor Uses of Class client.TorCircuit (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.TorCircuit

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/NodeItem.html0000644000175000017500000001474013302030722022214 0ustar bannorbannor Uses of Class client.NodeItem (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.NodeItem

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/ExitNodeTableModel.html0000644000175000017500000001373613302030722024164 0ustar bannorbannor Uses of Class client.ExitNodeTableModel (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.ExitNodeTableModel

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/PatternsEditor.PACTableModel.html0000644000175000017500000001040613302030722026005 0ustar bannorbannor Uses of Class client.PatternsEditor.PACTableModel (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.PatternsEditor.PACTableModel

No usage of client.PatternsEditor.PACTableModel
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/PrefsDialog.html0000644000175000017500000001011313302030722022675 0ustar bannorbannor Uses of Class client.PrefsDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.PrefsDialog

No usage of client.PrefsDialog
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/TorProcess.html0000644000175000017500000001315513302030722022612 0ustar bannorbannor Uses of Class client.TorProcess (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.TorProcess

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/QuickAddDialog.html0000644000175000017500000001015413302030722023310 0ustar bannorbannor Uses of Class client.QuickAddDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.QuickAddDialog

No usage of client.QuickAddDialog
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/NodeList.html0000644000175000017500000001340613302030722022227 0ustar bannorbannor Uses of Class client.NodeList (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.NodeList

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/GuardNodeDialog.html0000644000175000017500000001016713302030722023477 0ustar bannorbannor Uses of Class client.GuardNodeDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.GuardNodeDialog

No usage of client.GuardNodeDialog
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/PatternsEditor.html0000644000175000017500000001015413302030722023452 0ustar bannorbannor Uses of Class client.PatternsEditor (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.PatternsEditor

No usage of client.PatternsEditor
Skip navigation links
selektor-3.13.73/javadoc/client/class-use/PacFactory.html0000644000175000017500000001344213302030722022541 0ustar bannorbannor Uses of Class client.PacFactory (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.PacFactory

Skip navigation links
selektor-3.13.73/javadoc/client/class-use/GuardNodeTableModel.html0000644000175000017500000001376413302030722024316 0ustar bannorbannor Uses of Class client.GuardNodeTableModel (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
client.GuardNodeTableModel

Skip navigation links
selektor-3.13.73/javadoc/client/GuardNodeTableModel.html0000644000175000017500000005152313302030722022412 0ustar bannorbannor GuardNodeTableModel (SelekTOR Java Documentation)
Skip navigation links
client

Class GuardNodeTableModel

Skip navigation links
selektor-3.13.73/javadoc/constant-values.html0000644000175000017500000011061313302030722020455 0ustar bannorbannor Constant Field Values (SelekTOR Java Documentation)
Skip navigation links

Constant Field Values

Contents

client.*

lib.*

Skip navigation links
selektor-3.13.73/javadoc/package-frame.html0000644000175000017500000000150613302030722020012 0ustar bannorbannor <Unnamed> (SelekTOR Java Documentation)

<Unnamed>

Classes

selektor-3.13.73/javadoc/package-tree.html0000644000175000017500000001015213302030722017654 0ustar bannorbannor Class Hierarchy (SelekTOR Java Documentation)
Skip navigation links

Hierarchy For Package <Unnamed>

Package Hierarchies:

Class Hierarchy

Skip navigation links
selektor-3.13.73/javadoc/script.js0000644000175000017500000000147313302030722016306 0ustar bannorbannorfunction show(type) { count = 0; for (var key in methods) { var row = document.getElementById(key); if ((methods[key] & type) != 0) { row.style.display = ''; row.className = (count++ % 2) ? rowColor : altColor; } else row.style.display = 'none'; } updateTabs(type); } function updateTabs(type) { for (var value in tabs) { var sNode = document.getElementById(tabs[value][0]); var spanNode = sNode.firstChild; if (value == type) { sNode.className = activeTableTab; spanNode.innerHTML = tabs[value][1]; } else { sNode.className = tableTab; spanNode.innerHTML = "" + tabs[value][1] + ""; } } } selektor-3.13.73/javadoc/index-files/0000755000175000017500000000000013302030722016646 5ustar bannorbannorselektor-3.13.73/javadoc/index-files/index-7.html0000644000175000017500000014552013302030722021016 0ustar bannorbannor G-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

G

generateSecretKey(int) - Static method in class lib.Utilities
Generate secret key.
getActiveCountry() - Method in class client.PacFactory
Get the active country code
getActiveDesktop() - Static method in class lib.OSFunction
Get the name of the active desktop
getActiveStreams() - Method in class client.TorController
Get list of active streams
getAgeOfFile(String, int) - Static method in class lib.SimpleFile
Get the age of a specified file
getAppSettingsPath(String, String) - Static method in class lib.OSFunction
Get a specified application's settings folder, if null return this applications setting folder
getBandwidth() - Method in class client.NodeItem
Get nodeitem bandwith
getBestHops() - Method in class client.TorController
Get best hops
getBestLatency() - Method in class client.TorController
Get best latency
getBodyAsString() - Method in class lib.NetFunctions.HttpPage
Retrieve http body as string should only be used with text content
getBool(String) - Method in class lib.SimpleProps
Get a boolean property
getBridges() - Method in class client.TorProcess
Get bridges
getBuildFlags() - Method in class client.TorCircuit
Get current circuits build flags
getBuiltCircuits(boolean) - Method in class client.TorController
Get built circuits
getCacheAge() - Method in class client.TorProcess
Get the age of the file cache in minutes
getCachedDataFolder() - Method in class client.TorProcess
Get the currently set cached data folder
getCachedProcesses() - Static method in class lib.OSFunction
Cached list of processes
getChangedProperties() - Method in class lib.SimpleProps
Get a comma separated list of properties that were changed
getCircuit() - Method in class client.TorCircuit
Get circuit
getCircuitHops() - Method in class client.NodeItem
Get circuit hops
getClientLocation() - Method in class client.TorProcess
Get Tor client location as a filepath
getClientStatus() - Method in class lib.ClientProcess
 
getCLIOptionBool(String) - Method in class client.TorProcess
Get a previously added tor option boolean value
getCLIOptions(String) - Method in class client.TorProcess
Get a previously added tor option string
getCLIOptionsAsString() - Method in class client.TorProcess
Gets all the currently set tor options as single String for use as arguments passed to tor client
getColumnClass(int) - Method in class client.ExitNodeTableModel
Get column class at given index
getColumnClass(int) - Method in class client.GuardNodeTableModel
Get column class at given index
getColumnClass(int) - Method in class client.PatternsEditor.PACTableModel
Get column class
getColumnCount() - Method in class client.ExitNodeTableModel
Get the number of columns
getColumnCount() - Method in class client.GuardNodeTableModel
Get the number of columns
getColumnCount() - Method in class client.PatternsEditor.PACTableModel
Get column count as integer
getColumnName(int) - Method in class client.ExitNodeTableModel
Get column name at given index
getColumnName(int) - Method in class client.GuardNodeTableModel
Get column name at given index
getColumnName(int) - Method in class client.PatternsEditor.PACTableModel
Get column name at given index
getCompositor() - Static method in class lib.OSFunction
Get the name of the compositor
getConfigFilePath() - Method in class client.TorProcess
Get the path to the configuration file
getControlPort() - Method in class client.TorProcess
Get the control port
getCountryCode() - Method in class client.NodeItem
Get nodeitem two letter country code abbreviation
getCountryFromIP(String) - Method in class client.TorController
Attempts to return the Country associated with an ip address
getCountryName() - Method in class client.NodeItem
Get nodeitem full country name
getCurrentStatus() - Method in class client.NodeList
Get the process status
getDataFolder() - Method in class client.TorProcess
Get the datafolder being used by tor client
getDescription() - Method in class client.QuickAddDialog
Get contents of description field
getDescription() - Method in class lib.ExtensionFileFilter
Get description
getDisplayCountry(String) - Method in class lib.Localisation
Get the country name for supplied iso2 code
getDoNotProxy() - Method in class client.PacFactory
Get value of comma separated host or ip list
getEnabledCount() - Method in class client.GuardNodeTableModel
 
getEntryGuardsAsCSV() - Method in class client.TorController
Get entry guards chosen by tor client
getEntryNodes() - Method in class client.TorController
Get configured entry nodes
getEventMessage(int) - Method in class client.TorController
 
getEventMessage(int) - Method in class client.TorProcess
Get textual representation on an event
getExit(int) - Method in class client.TorCircuit
Get Exitnode
getExitHop() - Method in class client.TorCircuit
Get current circuits exit node
getExitNodes(boolean, boolean) - Method in class client.NodeList
Get a list of exitnodes, if all is false then it returns only favourited nodes, if omitfailednodes is true then don't include nodes that failed testing
getExitNodesAsString(boolean, boolean) - Method in class client.NodeList
Get a string of comma separated exitnodes, if all is false then it returns only favourited nodes, if omitfailednodes is true then don't include nodes that failed testing
getExpires() - Method in class lib.NetFunctions.HttpPage
 
getFile() - Method in class lib.SimpleFile
Get file
getFileFilter() - Method in class lib.SimpleFile
Gets the current file filter
getFileList() - Method in class lib.SimpleFile
Gets the file list at the specified directory location based on filter contents
getFilenames(int) - Method in class lib.SimpleFile
Returns an array of filenames, array if populated from the offset value onwards
getFileSeparator() - Static method in class lib.OSFunction
Get file separator
getFingerprint() - Method in class client.NodeItem
Get nodeitems fingerprint
getFont() - Method in class lib.InfoDialog
 
getFromNodeHop(String, int) - Static method in class client.TorCircuit
Get fingerprint of given node Nodeinfo is in the format of fingerprint~name or fingerprint=name
getGnome3Pref(String, String) - Static method in class lib.OSFunction
Get gnome 3 preference using schema name and key name
getGsettingsPath() - Static method in class lib.OSFunction
Test if gsettings installed (Linux only)
getGuard(int) - Method in class client.TorCircuit
Get Guardnode finger or nick
getGuardFavouritesAsCSV() - Method in class client.NodeList
Get guard favourites
getGuardHop() - Method in class client.TorCircuit
Get current circuits guard or entry node
getGuardNodes() - Method in class client.NodeList
Get a list of all guard nodes guard nodes
getHops() - Method in class client.TorCircuit
Get circuit hops
getID() - Method in class client.TorCircuit
Get current circuit ID
getInfo(String) - Method in class client.TorController
Get tor status information for a given property.
getInt(String) - Method in class lib.SimpleProps
Get an integer number property
getIPAddress() - Method in class client.NodeItem
Get nodeitem ip address
getKDEPref(String, String, String) - Static method in class lib.OSFunction
Get a kde preference string value using group name, key name and return contents of def on failure
getKDEProxyPath() - Static method in class lib.OSFunction
Test for KDE installed (Linux only)
getLangCode() - Static method in class lib.OSFunction
Get default language iso code
getLastModified() - Method in class lib.NetFunctions.HttpPage
 
getLatency() - Method in class client.NodeItem
Get Nodeitem latency in ms
getLatency() - Method in class client.TorController
Get current latency
getLatency(String, Proxy, int) - Method in class lib.NetFunctions
Get latency non threaded version
getLatestCircuit() - Method in class client.TorController
Get the latest circuit
getListAsCSV(ArrayList<String>) - Static method in class lib.Utilities
Covert list to csv
getListenPort() - Method in class client.TorProcess
Get the listening port
getLiveProcesses() - Static method in class lib.OSFunction
Gets list of active system processes
getLocale() - Method in class lib.Localisation
Get the locale
getLong(String) - Method in class lib.SimpleProps
Get a long number property
getMiddleHop() - Method in class client.TorCircuit
Get current circuits middle node if any, returns exit node for a two hop circuit
getMiddleMan(int) - Method in class client.TorCircuit
Get Middleman
getNickName() - Method in class client.NodeItem
Get nodeitem unique name
getNode(String) - Method in class client.NodeList
Get node item from its fingerprint
getNodeItemAt(int) - Method in class client.ExitNodeTableModel
Get row nodeitem
getNotifySendPath() - Method in class lib.DesktopNotify
 
getNumberOfFavs() - Method in class client.NodeList
Get the number of active favourites
getOldestFile() - Method in class lib.SimpleFile
 
getOSArch() - Static method in class lib.OSFunction
Get OS architecture, convenience method
getOSName() - Static method in class lib.OSFunction
Get OS name, convenience method
getOSVersion() - Static method in class lib.OSFunction
Get OS version
getOurProcessID() - Static method in class lib.OSFunction
Get process id
getOwnershipID() - Method in class client.TorProcess
Return the currently set process ownership ID
getPattern() - Method in class client.QuickAddDialog
Get contents of the pattern field
getPatternsFiles() - Method in class client.PacFactory
Get an array of user pattern files
getProcess() - Method in class lib.ClientProcess
Return the client system process
getProcessID(String) - Static method in class lib.OSFunction
Get process id from a process
getProcessOutput(InputStream) - Static method in class lib.OSFunction
Obtain all output of an executed process.
getProcessResult(Process) - Static method in class lib.OSFunction
Convenience method to get the first resultant output of an executed process as a String
getProperty(String) - Method in class lib.NetFunctions.HttpPage
Get various properties of the web page
getPurpose() - Method in class client.TorCircuit
Get current circuits purpose
getReturnStatus() - Method in class client.GuardNodeDialog
 
getReturnStatus() - Method in class client.PatternsEditor
 
getReturnStatus() - Method in class client.PrefsDialog
 
getReturnStatus() - Method in class client.QuickAddDialog
 
getReturnStatus() - Method in class lib.InfoDialog
 
getRouterDesc(String) - Method in class client.NodeList
 
getRouterStatus(String) - Method in class client.NodeList
 
getSecret() - Method in class client.TorProcess
Get the currently set authentification secret
getSeparator() - Static method in class lib.SimpleFile
 
getServerDate() - Method in class lib.NetFunctions.HttpPage
 
getSha1Sum(String) - Static method in class lib.Utilities
Calculate the sha1 checksum of a given file
getSHAHash(String) - Static method in class lib.Utilities
Get SHAHash using given password string
getStability() - Method in class client.NodeItem
Get Nodeitem stability
getStatus() - Method in class client.TorCircuit
Get current circuit status
getStatus() - Method in class client.TorController
Get current status
getStdoutTextArea() - Method in class client.TorMonFrame
 
getStreams() - Method in class client.NodeItem
Get nodeitems active streams
getString(String) - Method in class lib.Localisation
Get localised string using given key
getString(String) - Method in class lib.SimpleProps
Get a String property
getStrings(String...) - Method in class lib.Localisation
Get an array of localised strings using a key array or multiple keys
getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) - Method in class client.PatternsEditor.CustomTableCellRenderer
 
getTempFolder(String) - Static method in class lib.OSFunction
Get users temp folder
getTestingMessage() - Method in class client.NodeItem
Get Node item status
getTestLatency() - Method in class client.NodeItem
Get Nodeitem test latency in ms
getTestStatus() - Method in class client.NodeItem
Get testing status flag
getText() - Method in class lib.TextResourceDialog
Get the license text
getTextArea() - Method in class lib.InfoDialog
 
getTextFromFile(String) - Static method in class lib.Utilities
Retrieve text from a text file
getTextFromResource(String) - Static method in class lib.Utilities
Retrieve text from a resource text file
getTimestamp() - Method in class client.TorCircuit
Get current circuits timestamp
getTorHashPassword(String) - Static method in class lib.Utilities
 
getTorLatency(int) - Method in class client.TorController
Returns measured latency for the active circuit without creating a stream, this blocks so be careful
getTorrcOption(String) - Method in class client.TorProcess
Get a previously added tor option string
getTorrcOptionsAsString() - Method in class client.TorProcess
Gets all the currently set torrc options as single String
getURLContentAsString(String, Socket) - Method in class lib.NetFunctions
Check web for updates and return version string if an update is available
getUserName() - Static method in class lib.OSFunction
Get user name
getUsersCurrentFolder() - Static method in class lib.OSFunction
Get users current folder
getUsersDocFolder() - Static method in class lib.OSFunction
Get users documents folder (Windows only)
getUserSettingsPath() - Static method in class lib.OSFunction
Get user settings path
getUsersHomeFolder() - Static method in class lib.OSFunction
Get users home folder
getValidatedCountries() - Method in class client.NodeList
Gets validated countries, a valid country is any country with active exit nodes
getValidatedCountryCodes() - Method in class client.NodeList
Gets validated country codes, a valid country is any country with active exit nodes
getValueAt(int, int) - Method in class client.ExitNodeTableModel
Get cell value as object at row,col
getValueAt(int, int) - Method in class client.GuardNodeTableModel
Get cell value as object at row,col
getVersion() - Method in class client.TorProcess
Get Tor version as float
GTKFixes - Class in lib
 
GTKFixes() - Constructor for class lib.GTKFixes
 
GuardNodeDialog - Class in client
 
GuardNodeDialog(Frame, boolean) - Constructor for class client.GuardNodeDialog
Creates new form GuardNodeDialog
GuardNodeTableModel - Class in client
 
GuardNodeTableModel() - Constructor for class client.GuardNodeTableModel
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-8.html0000644000175000017500000001342713302030722021017 0ustar bannorbannor H-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

H

haveValidEntryNode() - Method in class client.TorController
 
HttpPage(InputStream) - Constructor for class lib.NetFunctions.HttpPage
Store webpage from the given input stream
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-18.html0000644000175000017500000014506513302030722021104 0ustar bannorbannor S-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

S

S2KRFC2440(String) - Static method in class lib.Utilities
Secret to key, Algorithm info taken from http://sunsite.icm.edu.pl/gnupg/rfc2440-3.html
save() - Method in class lib.SimpleProps
Save to xml file
saveBodyToFile(String, JProgressBar) - Method in class lib.NetFunctions.HttpPage
Save http body to a file, applies to all types of content
saveConf() - Method in class client.TorController
Save configuration file
saveExitFavourites() - Method in class client.NodeList
Save exit node whitelist
saveGuardWhitelist() - Method in class client.NodeList
Save exit node blacklist
savePatternsList(String, String, ArrayList<String>) - Method in class client.PacFactory
Save a patterns list by filename
savePreferences() - Method in class client.PrefsDialog
Save preferences
saveURLContentToFile(String, String, Socket, boolean) - Method in class lib.NetFunctions
Save the contents of a URL to a file
secureWipe(String) - Static method in class lib.SimpleFile
Wipe file using specified filename
secureWipe(File) - Static method in class lib.SimpleFile
Wipe file using specified File
secureWipeFolder(String) - Static method in class lib.SimpleFile
Wipe folder and its contents using specified folder path
secureWipeFolder(File) - Static method in class lib.SimpleFile
Wipe folder and its contents using specified File
SelekTOR - Class in client
 
SelekTOR(String[]) - Constructor for class client.SelekTOR
Initialises SelekTOR UI Frame
SelekTOR - Class in <Unnamed>
Explanation of why this is in the default package
SelekTOR() - Constructor for class SelekTOR
 
sendCommand(String) - Method in class client.TorController
Send a command to tor client
sendMessage(String) - Method in class lib.ClientProcess
Send a message to the process
setAckEnabled(boolean) - Method in class lib.InfoDialog
Set whether Ok button is enabled
setAckVisible(boolean) - Method in class lib.InfoDialog
Set whether OK button is visible
setAppDescription(String) - Method in class lib.AboutDialog
Set appliction description
setAppLogo(ImageIcon) - Method in class lib.AboutDialog
Set application logo
setApplyText(String) - Method in class client.QuickAddDialog
Set text that appears on the Apply button
setAutoClose(int) - Method in class lib.InfoDialog
Set the form auto close period in milliseconds
setAutoScrollEnabled(boolean) - Method in class lib.InfoDialog
Enable/Disable Autoscrolling
setBackground(Color) - Method in class lib.TrayPopupMenu
 
setBackupFolder(String) - Method in class client.PacFactory
Set folder where system proxy settings will be backed up
setBandwidth(float) - Method in class client.NodeItem
Set node item bandwidth
setBool(String, boolean) - Method in class lib.SimpleProps
Set a boolean property
setBoolTorOption(String, boolean) - Method in class client.TorProcess
Add a tor option boolean value
setBridges(String) - Method in class client.TorProcess
Set Tor bridges, supports multiple addresses
setButtonCloseText(String) - Method in class lib.AboutDialog
Set text on Close button
setButtonContactText(String) - Method in class lib.AboutDialog
Set text on Contact button
setButtonURL(String) - Method in class lib.TextResourceDialog
Set the browser url for unnoficial translation
setButtonVisitText(String) - Method in class lib.AboutDialog
Set text on Visit button
setCachedDataFolder(int) - Method in class client.TorProcess
This populates the the current folder whose name is derived from the listening port with data from the given source folder derived by the given port number.
setCancelButtonText(String) - Method in class lib.InfoDialog
 
setCancelEnabled(boolean) - Method in class lib.InfoDialog
Set whether Cancel button is enabled
setCancelVisible(boolean) - Method in class lib.InfoDialog
Set whether Cancel button is visible
setCheckBoxEnabled(boolean) - Method in class lib.InfoDialog
Set check box selection status
setCheckBoxText(String) - Method in class lib.InfoDialog
 
setCheckBoxVisible(boolean) - Method in class lib.InfoDialog
Set whether the forms checkbox is enabled
setCircuit(String) - Method in class client.TorCircuit
Set circuit to supplied circuit
setCircuitHops(String) - Method in class client.NodeItem
Set circuit hops
setCLIOption(String, String) - Method in class client.TorProcess
Add a tor option string which is passed to the tor client on startup.
setCloseButtonText(String) - Method in class lib.InfoDialog
 
setCloseButtonText(String) - Method in class lib.TextResourceDialog
Set the text on the Close button
setColumnName(String, int) - Method in class client.ExitNodeTableModel
Set the column name at the specified index
setColumnName(String, int) - Method in class client.GuardNodeTableModel
Set the column name at the specified index
setColumnName(String, int) - Method in class client.PatternsEditor.PACTableModel
Set the column name at the specified index
setConf(String) - Method in class client.TorController
Set a tor configuration property
setContactURL(String) - Method in class lib.AboutDialog
Set contact url
setContinueButtonText(String) - Method in class lib.InfoDialog
 
setControlPassword(String, String) - Method in class client.TorProcess
 
setCountryCode(String) - Method in class client.NodeItem
Set Nodeitem with its two letter country code abbreviation
setCountryName(String) - Method in class client.NodeItem
Set Nodeitem with its full country name
setDefaultModeEnabled(boolean) - Method in class lib.SimpleProps
Enable/disable default mode
setDefaultProxy(String) - Method in class client.PacFactory
Set default proxy url
setDoNotProxy(String) - Method in class client.PacFactory
Set do not proxy
setEnabled(boolean) - Method in class lib.DesktopNotify
Disable/Enable notifications
setEntryNodes(String) - Method in class client.TorController
Set entry nodes
setExitNodeTableModel(ExitNodeTableModel) - Method in class client.NodeList
Set the exit node view table model
setExternalArgs(String) - Method in class client.TorProcess
Set external user provided startup arguments
setFavouriteEnabled(boolean) - Method in class client.NodeItem
Set exit enabled status of Nodeitem
setFields(String, String) - Method in class client.QuickAddDialog
Set the test that appears in both fields
setFile(File) - Method in class lib.SimpleFile
Set file
setFileFilter(String) - Method in class lib.SimpleFile
Sets the file filter
setFileHidden(String, boolean) - Static method in class lib.OSFunction
Set a files hidden status (Windows only)
setFileName(String) - Method in class lib.SimpleFile
Set filename
setFingerprint(String) - Method in class client.NodeItem
Set nodeitem fingerprint
setFont(String, int) - Method in class lib.InfoDialog
Set info font
setForeground(Color) - Method in class lib.TrayPopupMenu
 
setGeoIP4(String) - Method in class client.TorProcess
Set the path to the geoip file
setGeoIP6(String) - Method in class client.TorProcess
Set the path to the geoip file
setGnome3Pref(String, String, boolean) - Static method in class lib.OSFunction
Set a gnome 3 boolean value using schema name and key name
setGnome3Pref(String, String, String) - Static method in class lib.OSFunction
Set a gnome 3 string value using schema name and key name
setGuardEnabled(boolean) - Method in class client.NodeItem
Set guard enabled status of Nodeitem
setGuardNodeTableModel(GuardNodeTableModel) - Method in class client.NodeList
Set the guard node view table model
setHomeURL(String) - Method in class lib.AboutDialog
Set home url
setHops(String) - Method in class client.TorCircuit
Set hops
setHttpSupported(boolean) - Method in class client.NodeItem
 
setInfoText(String) - Method in class lib.InfoDialog
Set dialog message body
setInfoText(String, Color) - Method in class lib.InfoDialog
Set dialog message body, and font colour
setInfoTip(String) - Method in class lib.SwingTrayIcon
Set info tip text
setInitialBootEvent(int) - Method in class client.TorProcess
Set the event that is issued on process boot completion
setInt(String, int) - Method in class lib.SimpleProps
Set a integer number property
setIPAddress(String) - Method in class client.NodeItem
Set nodeitem ip address
setKDEPref(String, String, String) - Static method in class lib.OSFunction
Set a kde string preference value using group name, key name
setKDEPref(String, String, boolean) - Static method in class lib.OSFunction
Set a kde boolean preference value using group name, key name
setKDEPref(String, String, int) - Static method in class lib.OSFunction
Set a kde integer preference value using group name, key name
setLatency(long) - Method in class client.NodeItem
Set Nodeitem latency value in ms
setLaunchString(String) - Method in class client.TorMonFrame
Set launch command text
setListenPort(int) - Method in class client.TorProcess
Set the listening port
setLogLevel(int) - Method in class client.TorProcess
Set the Tor stdout log level
setLong(String, long) - Method in class lib.SimpleProps
Set a long number property
setMaxHistory(int) - Method in class client.TorProcess
Set the maximum no of lines to display in the Stdout output
setNickName(String) - Method in class client.NodeItem
Set nodeitem name
setNodeList(NodeList) - Method in class client.GuardNodeDialog
Set the nodelist
setNotificationBody(String) - Method in class lib.DesktopNotify
Set desktop notification body
setNotificationTitle(String) - Method in class lib.DesktopNotify
Set desktop notification title
setOwnershipID(String) - Method in class client.TorProcess
Set Ownership process id, useful for proper process termination in event of a crash
setPACFolder(String) - Method in class client.PacFactory
Set folder where pac files will be generated
setPatternsFolder(String) - Method in class client.PacFactory
Create folder in which pattern files will be stored
setProgressBar(JProgressBar) - Method in class lib.NetFunctions
 
setProxyAutoConfigURL(String) - Method in class client.PacFactory
Generic set proxy config
setSelectedCountry(String) - Method in class client.PatternsEditor
Set the selected country
setSilentBootEnabled(boolean) - Method in class client.TorProcess
Enable/Disable bootstrap message events on startup
setSocketTimeout(int) - Method in class lib.NetFunctions
Set default socket timeout
setStable(String) - Method in class client.NodeItem
Set Nodeitem stability yes/no/unknown
setStartupDelay(long) - Method in class lib.ClientProcess
Set the initial delay that is executed prior to starting the process
setStartupTimeout(long) - Method in class lib.ClientProcess
Set startup timeout
setStatus(int) - Method in class client.TorController
Set status flag
setStdoutTextArea(JTextArea) - Method in class client.TorProcess
Set the text area that will receive Stdout output
setStreams(int) - Method in class client.NodeItem
Set nodeitem number of streams
setString(String, String) - Method in class lib.SimpleProps
Set a String property
setTempFolder(String) - Method in class client.PacFactory
Set the temp folder for file extractions
setTestFieldValues(String, long, String, String) - Method in class client.ExitNodeTableModel
Convenience method to set the testing field cell values for a specific fingerprint, the hops field is hidden and does npt show up in table
setTestingMessage(String) - Method in class client.NodeItem
Set Nodeitem testing status message
setTestingURL(String) - Method in class client.TorController
Set the url used for latency checking
setTestLatency(long) - Method in class client.NodeItem
Set Nodeitem test latency value in ms
setTestStatus(int) - Method in class client.NodeItem
Set testing status flag
setText(String) - Method in class lib.TextResourceDialog
Set the license text
setTimeLock(int) - Method in class lib.InfoDialog
 
setTitle(String) - Method in class lib.InfoDialog
Set dialog title
setTorrcOption(String, String) - Method in class client.TorProcess
Add a torrc option string See Tor documentation for valid options.
setTrayPopupMenu(TrayPopupMenu) - Method in class lib.SwingTrayIcon
Set tray right click popup
setType(int) - Method in class client.NodeItem
Set Node type
setURLButtonText(String) - Method in class lib.TextResourceDialog
Set the text on the Close button
setValueAt(Object, String, int) - Method in class client.ExitNodeTableModel
Set value with given fingerprint at given column
setValueAt(Object, int, int) - Method in class client.ExitNodeTableModel
Set cell value at row,col
setValueAt(Object, String, int) - Method in class client.GuardNodeTableModel
Set value with given fingerprint at given column
setValueAt(Object, int, int) - Method in class client.GuardNodeTableModel
Set cell value at row,col
setVisibleWithFocus(boolean) - Method in class lib.InfoDialog
 
signal(String) - Method in class client.TorController
Send signal to tor
SimpleFile - Class in lib
 
SimpleFile() - Constructor for class lib.SimpleFile
 
SimpleFile(String) - Constructor for class lib.SimpleFile
Constructor
SimpleProps - Class in lib
 
SimpleProps(String, String) - Constructor for class lib.SimpleProps
Constructor, requires
start() - Method in class client.TorController
Start tor controller process and issue the TOR_BOOTED event
start(int) - Method in class client.TorController
Start tor controller process and issue the given event
start(String) - Method in class lib.ClientProcess
Starts the client process
startProcess() - Method in class client.TorProcess
Starts Tor process, and issues booted event on completion
STATUS_BOOTING - Static variable in class client.TorController
 
STATUS_CIRCUIT_CREATION - Static variable in class client.TorController
 
STATUS_DEAD - Static variable in class client.TorController
 
STATUS_IDLE - Static variable in class client.TorController
 
STATUS_LATENCY_CHECKING - Static variable in class client.TorController
 
stop() - Method in class client.TorController
Stop the tor controller process completely
stopProcess() - Method in class lib.ClientProcess
Stops the client process
STREAM_IP - Static variable in class client.TorController
 
SwingTrayIcon - Class in lib
 
SwingTrayIcon(GraphicsConfiguration, String) - Constructor for class lib.SwingTrayIcon
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-20.html0000644000175000017500000001357113302030722021071 0ustar bannorbannor U-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

U

unload() - Method in class lib.SwingTrayIcon
Unload Tray icon
Utilities - Class in lib
 
Utilities() - Constructor for class lib.Utilities
Constructor
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-12.html0000644000175000017500000001333113302030722021064 0ustar bannorbannor M-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

M

main(String[]) - Static method in class SelekTOR
 
mergeFiles(String, String, String) - Static method in class lib.SimpleFile
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-11.html0000644000175000017500000002251113302030722021063 0ustar bannorbannor L-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

L

LATENCY_FAIL - Static variable in class client.TorController
 
LATENCY_FAIL - Static variable in class lib.NetFunctions
 
LATENCY_UNKNOWN - Static variable in class lib.NetFunctions
 
launchProcess(String...) - Static method in class lib.OSFunction
Launch an external process with arguments
lib - package lib
 
load() - Method in class lib.SimpleProps
Load from xml file
load() - Method in class lib.SwingTrayIcon
Load tray icon
loadAdvancedPrefs(boolean) - Method in class client.PrefsDialog
Load the preferences
loadBasicPrefs(boolean) - Method in class client.PrefsDialog
 
loadConf() - Method in class client.TorController
Load configuration file
loadPatternsList(String, ArrayList<String>) - Method in class client.PacFactory
Load a patterns list from a file
loadUIStyle(String) - Static method in class lib.Utilities
Initialises the UI Look and Feel
Localisation - Class in lib
 
Localisation(String) - Constructor for class lib.Localisation
 
LOG_DEBUG - Static variable in class client.TorProcess
 
LOG_INFO - Static variable in class client.TorProcess
 
LOG_NOTICE - Static variable in class client.TorProcess
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-5.html0000644000175000017500000002647613302030722021024 0ustar bannorbannor E-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

E

editFile(String) - Static method in class lib.Utilities
Open the desktop default file editor
EMPTYSTRING - Static variable in class client.TorProcess
 
enablePredictiveCircuits(boolean) - Method in class client.TorController
Enable/Disable predictive circuit building
EVENT_ABORTED - Static variable in class client.TorController
 
EVENT_CIRCUIT_BUILT - Static variable in class client.TorController
 
EVENT_CIRCUIT_CHANGED - Static variable in class client.TorController
 
EVENT_CIRCUIT_FAILED - Static variable in class client.TorController
 
EVENT_CIRCUITS_BUILT - Static variable in class client.TorController
 
EVENT_CIRCUITS_FAILED - Static variable in class client.TorController
 
EVENT_LATENCY_DONE - Static variable in class client.TorController
 
EVENT_NETLATENCY - Static variable in class lib.NetFunctions
 
EVENT_TESTING_DONE - Static variable in class client.TorController
 
EVENT_URLFAILED - Static variable in class lib.NetFunctions
 
EVENT_URLOK - Static variable in class lib.NetFunctions
 
exists() - Method in class lib.SimpleFile
Test to see if path exists
exists(String) - Static method in class lib.SimpleFile
Test to see if path exists
ExitNodeTableModel - Class in client
 
ExitNodeTableModel() - Constructor for class client.ExitNodeTableModel
 
exportUserPatterns(String, File[]) - Method in class client.PacFactory
Export user patterns
ExtensionFileFilter - Class in lib
 
ExtensionFileFilter(String, String) - Constructor for class lib.ExtensionFileFilter
Convenience constructor for a single extension
ExtensionFileFilter(String, String[]) - Constructor for class lib.ExtensionFileFilter
Convenience constructor for a multiple extensions
extractZipTo(String) - Method in class lib.SimpleFile
Extracts a zip file to a supplied location
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-21.html0000644000175000017500000001416413302030722021071 0ustar bannorbannor V-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

V

validateBridges(String) - Method in class client.TorProcess
Validate bridge addresses
validateHostPort(String) - Method in class client.TorProcess
Validate a host:port ipv4 address
verifyControlComms() - Method in class client.TorController
Verify we have comms on the control socket
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-1.html0000644000175000017500000003200113302030722020775 0ustar bannorbannor A-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

A

abortActions() - Method in class client.TorController
Abort all current actions
abortLatencyCheck() - Method in class client.TorController
Abort latency checking
AboutDialog - Class in lib
 
AboutDialog(Frame, boolean) - Constructor for class lib.AboutDialog
Creates new About Dialog
accept(File) - Method in class lib.ExtensionFileFilter
 
activateCircuit(String) - Method in class client.TorController
Activate given circuit, does not block
activateNodes(String, int) - Method in class client.TorController
Set the csv list of exit node fingers to be used by tor, a single exit node may also be specified, this does not block
activateNodesBlocking(String, int) - Method in class client.TorController
Set the csv list of exit node fingers to be used by tor, a single exit node may also be specified, this blocks
add(JMenuItem) - Method in class lib.TrayPopupMenu
 
addBridge(String) - Method in class client.NodeList
Add newly learned bridge to nodelist
addDirectMatchingRule(ArrayList<String>, String) - Method in class client.PacFactory
 
addFilesToZip(File...) - Method in class lib.SimpleFile
Add files to a zip file
addMouseListener(MouseListener) - Method in class lib.SwingTrayIcon
Add a mouse listener
addProxyRule(ArrayList<String>, String) - Method in class client.PacFactory
 
addRow(Object[]) - Method in class client.ExitNodeTableModel
Add rowdata with given data object array
addRow(Object[]) - Method in class client.GuardNodeTableModel
Add rowdata with given data object array
addRow(Object[], boolean) - Method in class client.PatternsEditor.PACTableModel
 
addSocksMatchingRule(ArrayList<String>, String, String, String) - Method in class client.PacFactory
Add socks pattern mayching rule to a supllied list
addSocksRule(ArrayList<String>, String, String) - Method in class client.PacFactory
Add a socks rule to a supplied list
addToPatternFile(String, String, String) - Method in class client.PacFactory
Adds pattern to an existing pattern file
adjustTableColumnWidth(JTable, String...) - Static method in class lib.Utilities
Adjust specified column width based on the width of a test string
appendInfoText(String) - Method in class lib.InfoDialog
Append text to the information area, Scrolling should be enabled
APPLY - Static variable in class client.GuardNodeDialog
 
APPLY - Static variable in class client.PatternsEditor
 
APPLY - Static variable in class client.PrefsDialog
 
APPLY - Static variable in class client.QuickAddDialog
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-6.html0000644000175000017500000002416213302030722021013 0ustar bannorbannor F-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

F

FILE_FAILED - Static variable in class lib.NetFunctions
 
FILE_LOCAL_ISNEWER - Static variable in class lib.NetFunctions
 
FILE_RETRIEVED - Static variable in class lib.NetFunctions
 
FILEDELETEFAIL - Static variable in class lib.SimpleFile
 
FILEDELETEOK - Static variable in class lib.SimpleFile
 
FILEUSER - Static variable in class client.PacFactory
 
filterProcesses(ArrayList<String>, String) - Static method in class lib.OSFunction
Find processes matching the contents of filter
filterProcesses(String) - Static method in class lib.OSFunction
Find processes matching the contents of filter
filterRouterInfo(ArrayList<String>, String) - Method in class client.NodeList
 
findFile(String, String...) - Static method in class lib.OSFunction
Find a specific file, requires a series of paths where it might be found to be provided
FINGER - Static variable in class client.TorCircuit
 
fixJMenuPopupBorder(JMenu...) - Static method in class lib.GTKFixes
Fixes incorrect JMenu border outline
fixMenubarHeight(JMenuBar, JMenuItem) - Static method in class lib.GTKFixes
 
fixMenuItemFgColor(JMenuItem...) - Static method in class lib.GTKFixes
Fixes incorrect JMenu selectionForeground highlighting
fixMenuSelectionColor(JMenu...) - Static method in class lib.GTKFixes
Fixes incorrect JMenu selectionForeground and selectionBackground highlighting
fixTextAreaColor(JTextArea) - Static method in class lib.GTKFixes
 
fixTrayMenuPopupBorder(TrayPopupMenu) - Static method in class lib.GTKFixes
 
flushWriter() - Method in class lib.SimpleFile
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-15.html0000644000175000017500000002575713302030722021106 0ustar bannorbannor P-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

P

PacFactory - Class in client
 
PacFactory() - Constructor for class client.PacFactory
 
PACTableModel() - Constructor for class client.PatternsEditor.PACTableModel
Constructor
paintComponent(Graphics) - Method in class lib.TrayPopupMenu
 
PATTERN_ASCTIME - Static variable in class lib.NetFunctions.HttpPage
 
PATTERN_RFC1036 - Static variable in class lib.NetFunctions.HttpPage
 
PATTERN_RFC1123 - Static variable in class lib.NetFunctions.HttpPage
 
PatternsEditor - Class in client
 
PatternsEditor(Frame, boolean, PacFactory) - Constructor for class client.PatternsEditor
Creates a PatternsEditor dialog
PatternsEditor.CustomTableCellRenderer - Class in client
CustomTableCellRenderer
PatternsEditor.PACTableModel - Class in client
PACTableModel class
PERIOD_DAYS - Static variable in class lib.SimpleFile
 
PERIOD_HOURS - Static variable in class lib.SimpleFile
 
PERIOD_MINUTES - Static variable in class lib.SimpleFile
 
populateCountryComboBox(String[]) - Method in class client.PatternsEditor
Populate the country combobox with a list of countries
PrefsDialog - Class in client
 
PrefsDialog(Frame, SimpleProps, String) - Constructor for class client.PrefsDialog
Creates a preferences editor dialog
preloadFileChooser() - Static method in class lib.Utilities
Preloads filechooser in background so it will open instantly when requested
progressTask(int, JProgressBar) - Method in class lib.InfoDialog
Overridable handle for a progress based task
PROXY_ALL - Static variable in class client.PacFactory
 
PROXY_DISABLED - Static variable in class client.PacFactory
 
PROXY_PATTERN - Static variable in class client.PacFactory
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-17.html0000644000175000017500000002372713302030722021103 0ustar bannorbannor R-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

R

raiseNotification() - Method in class lib.DesktopNotify
Raise a notification
readEntireFile() - Method in class lib.SimpleFile
Read bytes from previously opened BufferedReader
readLine() - Method in class lib.SimpleFile
Read a single line from a text file
refreshExitTableModel(String) - Method in class client.NodeList
Update the table model based on supplied country
refreshGuardTableModel() - Method in class client.NodeList
Update the guard node table model
refreshNodelist(TorController) - Method in class client.NodeList
Generate the nodelist
registerWindow() - Static method in class lib.Utilities
Creates a hidden dummy window for registration to various docks/launchers Fixes the neverending launching indicator
renameFile(String) - Method in class lib.SimpleFile
 
renameTo(File, String) - Static method in class lib.SimpleFile
 
RESET - Static variable in class client.GuardNodeDialog
 
RESET - Static variable in class client.PrefsDialog
 
RESET - Static variable in class client.QuickAddDialog
 
resetConf(String) - Method in class client.TorController
reset a tor configuration property
resetGnome3Pref(String, String) - Static method in class lib.OSFunction
Reset a gnome3 value to its default.
resetToDefaults() - Method in class lib.SimpleProps
Reset to defaults
restoreProxyPrefs(boolean) - Method in class client.PacFactory
Generic restore of proxy settings, for ease of use
retrieveHeader() - Method in class lib.NetFunctions.HttpPage
Retrieve http header info
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-4.html0000644000175000017500000002401613302030722021007 0ustar bannorbannor D-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

D

delete() - Method in class lib.SimpleFile
Deletes file
delete(String) - Static method in class lib.SimpleFile
Deletes the specified file
delete() - Method in class lib.SimpleProps
Delete the properties file store
deleteAllPAC() - Method in class client.PacFactory
Delete all pac files
deleteCacheData() - Method in class client.TorProcess
Delete Tor cache data
deleteConfigFile() - Method in class client.TorProcess
Delete the configuration file
deleteFileList(File[]) - Method in class lib.SimpleFile
Deletes the supplied list of files, be very carefull with this
deleteFolder(String) - Static method in class lib.SimpleFile
Delete folder and its contents using specified folder path
deletePAC(String) - Method in class client.PacFactory
Delete specified pac file
deletePatternsFile(String, String) - Method in class client.PacFactory
Delete patterns file for a given country and type, where type is either "def" or "user"
deleteProxyPrefs() - Method in class client.PacFactory
Generic proxy prefs delete, for ease of use
DesktopNotify - Class in lib
This class handles desktop notifications
DesktopNotify(SwingTrayIcon, String) - Constructor for class lib.DesktopNotify
 
disable() - Method in class lib.SwingTrayIcon
 
displayMessage(String, String) - Method in class lib.SwingTrayIcon
Display desktop message (Windows only)
dispose() - Method in class lib.SwingTrayIcon
 
doLatencyCheck(int) - Method in class client.TorController
Triggers a socks latency check, EVENT_LATENCY_CHECK is fired on completion
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-19.html0000644000175000017500000003554113302030722021102 0ustar bannorbannor T-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

T

terminate() - Method in class client.NodeList
Ensures any threaded actions will terminate themselves
testNode(String) - Method in class client.TorController
Test specified node, non blocking
TESTSTATUS_FAILED - Static variable in class client.NodeItem
 
TESTSTATUS_PASSED - Static variable in class client.NodeItem
 
TESTSTATUS_UNKNOWN - Static variable in class client.NodeItem
 
TextResourceDialog - Class in lib
 
TextResourceDialog(Frame, boolean) - Constructor for class lib.TextResourceDialog
Creates new License Dialog
TOR_BOOT_ERROR - Static variable in class client.TorProcess
 
TOR_BOOT_FATAL - Static variable in class client.TorProcess
 
TOR_BOOT_TIMEOUT - Static variable in class client.TorProcess
 
TOR_BOOTED - Static variable in class client.TorProcess
 
TOR_BRIDGE - Static variable in class client.TorProcess
 
TOR_CLOCK_ERROR - Static variable in class client.TorProcess
 
TOR_DIRINFO_STALE - Static variable in class client.TorProcess
 
TOR_MESSAGE - Static variable in class client.TorProcess
 
TOR_NEWCIRC - Static variable in class client.TorProcess
 
TOR_NOEXITS - Static variable in class client.TorProcess
 
TOR_NOHOP0 - Static variable in class client.TorProcess
 
TOR_NONET_ACTIVITY - Static variable in class client.TorProcess
 
TOR_NOROUTE - Static variable in class client.TorProcess
 
TOR_RESTARTED - Static variable in class client.TorProcess
 
TOR_STOPPED - Static variable in class client.TorProcess
 
TorCircuit - Class in client
 
TorCircuit() - Constructor for class client.TorCircuit
Constructor
TorCircuit(String) - Constructor for class client.TorCircuit
Constructor, Create circuit object with given circuit
TorController - Class in client
 
TorController(String, String) - Constructor for class client.TorController
Constructor
TorMonFrame - Class in client
 
TorMonFrame() - Constructor for class client.TorMonFrame
Creates new form TorMonFrame
TorProcess - Class in client
 
TorProcess(String, String) - Constructor for class client.TorProcess
Constructor
torProcessEventFired(int, String) - Method in class client.TorController
Tor process event
torProcessEventFired(int, String) - Method in class client.TorProcess
Called if an event was fired, will be overidden by sub class
toString() - Method in class client.PatternsEditor.PACTableModel
Returns all data as a single string
toWebLanguageTag() - Method in class lib.Localisation
 
TrayPopupMenu - Class in lib
 
TrayPopupMenu() - Constructor for class lib.TrayPopupMenu
 
TYPE_EXIT - Static variable in class client.NodeItem
 
TYPE_GUARD - Static variable in class client.NodeItem
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-16.html0000644000175000017500000001336313302030722021075 0ustar bannorbannor Q-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

Q

QuickAddDialog - Class in client
 
QuickAddDialog(Frame, boolean) - Constructor for class client.QuickAddDialog
Creates a quick add patterns dialog
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-10.html0000644000175000017500000001277413302030722021074 0ustar bannorbannor K-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

K

killProcess(String) - Static method in class lib.OSFunction
Generic kill process with matching pid
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-22.html0000644000175000017500000001451413302030722021071 0ustar bannorbannor W-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

W

walkFileTree(String, ArrayList<File>) - Static method in class lib.SimpleFile
 
walkFileTree(String, ArrayList<File>, String) - Static method in class lib.SimpleFile
 
writeFile(String, int) - Method in class lib.SimpleFile
Write to a previously opened output file
writeFile(char[], int) - Method in class lib.SimpleFile
Write to a previously opened output file
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-3.html0000644000175000017500000004570713302030722021020 0ustar bannorbannor C-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

C

CANCEL - Static variable in class client.GuardNodeDialog
 
CANCEL - Static variable in class client.PatternsEditor
 
CANCEL - Static variable in class client.PrefsDialog
 
CANCEL - Static variable in class client.QuickAddDialog
 
CANCEL_BUTTON - Static variable in class lib.InfoDialog
 
CANCEL_WINDOW - Static variable in class lib.InfoDialog
 
cleanupExit() - Method in class client.SelekTOR
The main application exit routine also does cleanup before exiting
clear() - Method in class client.ExitNodeTableModel
Clear the table model of all data
clear() - Method in class client.GuardNodeTableModel
Clear the table model of all data
clearActiveProcesses() - Static method in class lib.OSFunction
Clear active processes, mainly to reduce memory consumption when were done with them
clearBridges() - Method in class client.NodeList
Clear any learned bridges
clearCLIOption(String) - Method in class client.TorProcess
Remove previously add tor option
clearStdout() - Method in class client.TorProcess
Clear the Stdout text area
clearTorrcOption(String) - Method in class client.TorProcess
Remove previously add torrc option
clearType() - Method in class client.NodeItem
Clear node type
client - package client
 
CLIENT_RUNNING - Static variable in class lib.ClientProcess
 
CLIENT_STOPPED - Static variable in class lib.ClientProcess
 
CLIENT_TIMEDOUT - Static variable in class lib.ClientProcess
 
ClientProcess - Class in lib
 
ClientProcess() - Constructor for class lib.ClientProcess
Constructor
clientProcessEventFired(String) - Method in class client.TorProcess
Client event handler, can be overriden by parent class
clientProcessEventFired(String) - Method in class lib.ClientProcess
Event from the process, should be overriden by sub class
clone() - Method in class client.NodeItem
 
closeCircuit(String) - Method in class client.TorController
Close a circuit with ID
closeCircuitsExcept(String, boolean) - Method in class client.TorController
Close open circuits except circuit specified by id
closeFile() - Method in class lib.SimpleFile
Close file and any resources such as buffered readers/writers that are attached to it.
closeZipStream() - Method in class lib.SimpleFile
Close a zip stream
compress(String, String) - Static method in class lib.SimpleFile
 
CONNECTION_FAILED - Static variable in class lib.NetFunctions
 
controllerEventFired(int, Object) - Method in class client.TorController
Handle for controllerEventFired should be overridden by parent class
copyFolderContents(String, String, String) - Static method in class lib.SimpleFile
Copy multiple files from one folder to another
copyFromTo(String, String) - Static method in class lib.SimpleFile
Copy file to
createDataFolder() - Method in class client.TorProcess
Creates a data folder for the Tor client to put its cache data
createDefaultConfig() - Method in class client.TorProcess
Creates the default Tor config file
createError(String) - Method in class lib.InfoDialog
Create error dialog
createError(String, String) - Method in class lib.InfoDialog
Create error dialog
createFile() - Method in class lib.SimpleFile
Create a new file
createFolder() - Method in class lib.SimpleFile
Creates a new folder
createFolder(String) - Static method in class lib.SimpleFile
Creates a new folder
createInfo(String) - Method in class lib.InfoDialog
Convenience methods
createInfo(String, String) - Method in class lib.InfoDialog
 
createPacFile(String, int) - Method in class client.PacFactory
Create and/or activate a pacfile for a specific country
createProgress(String, String) - Method in class lib.InfoDialog
Create progress bar dialog
createSocks4aSocket(String, int, String, int) - Method in class client.TorController
Create a Socks4a socket Taken from Wikipedia SOCKS4a is a simple extension to SOCKS4 protocol that allows a client that cannot resolve the destination host's domain name to specify it.
createTorSocketToURL(String, boolean) - Method in class client.TorController
Create a socks4a socket to this URL on this tor connection, if nowww is true then remove www.
createWarn(String) - Method in class lib.InfoDialog
 
createWarn(String, String) - Method in class lib.InfoDialog
Create warning dialog
CustomTableCellRenderer() - Constructor for class client.PatternsEditor.CustomTableCellRenderer
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-13.html0000644000175000017500000002205613302030722021071 0ustar bannorbannor N-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

N

NetFunctions - Class in lib
 
NetFunctions() - Constructor for class lib.NetFunctions
 
NetFunctions.HttpPage - Class in lib
Store an http formatted web page
NICKNAME - Static variable in class client.TorCircuit
 
NODE_EXIT - Static variable in class client.TorController
 
NODE_GUARD - Static variable in class client.TorController
 
NODE_MIDDLE - Static variable in class client.TorController
 
NodeItem - Class in client
 
NodeItem() - Constructor for class client.NodeItem
 
NodeList - Class in client
 
NodeList(String, String, String) - Constructor for class client.NodeList
 
NODELIST_BUILDING - Static variable in class client.NodeList
 
NODELIST_BUILT - Static variable in class client.NodeList
 
NODELIST_FAILED - Static variable in class client.NodeList
 
NODELIST_IDLE - Static variable in class client.NodeList
 
NODELIST_TERMINATED - Static variable in class client.NodeList
 
NOTFOUND - Static variable in class lib.SimpleFile
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-14.html0000644000175000017500000002244513302030722021074 0ustar bannorbannor O-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

O

objectRead(String, Object) - Static method in class lib.SimpleFile
 
objectWrite(String, Object) - Static method in class lib.SimpleFile
 
OK - Static variable in class lib.InfoDialog
 
openBufferedAppend() - Method in class lib.SimpleFile
Opens a buffered file for append
openBufferedRead() - Method in class lib.SimpleFile
Opens a buffered file for read
openBufferedResource() - Method in class lib.SimpleFile
Use this if you need access to a file within a jar
openBufferedWrite() - Method in class lib.SimpleFile
Opens a buffered file for write
openFileChooser(Frame, String, FileFilter, int) - Static method in class lib.Utilities
Opens java file chooser dialog, convenience method.
openFileExternally(String) - Static method in class lib.Utilities
Launch the desktops default file handling program
openFileInputStream(String) - Method in class lib.SimpleFile
 
openFileOutputStream() - Method in class lib.SimpleFile
Opens a file output stream
openStreamToURL(String, Socket) - Method in class lib.NetFunctions
Open an inputstream to the given url on the given socket
openZipStream(int) - Method in class lib.SimpleFile
Opens a zipstream.
OSFunction - Class in lib
 
OSFunction() - Constructor for class lib.OSFunction
 
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-9.html0000644000175000017500000003336313302030722021021 0ustar bannorbannor I-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

I

importPatterns(String) - Method in class client.PacFactory
Import patterns
InfoDialog - Class in lib
 
InfoDialog(Frame) - Constructor for class lib.InfoDialog
Creates new InfoDialog, for parent frame with modality modal
isCellEditable(int, int) - Method in class client.ExitNodeTableModel
Test if the cell is editable
isCellEditable(int, int) - Method in class client.GuardNodeTableModel
Test if the cell is editable
isCellEditable(int, int) - Method in class client.PatternsEditor.PACTableModel
Test if cell at given row, col is editable
isCheckBoxSelected() - Method in class lib.InfoDialog
Test to see if checkbox is selected
isDaysOlder(String, long) - Static method in class lib.SimpleFile
Test to see our file is older in days, returns true if it is
isEnabled() - Method in class lib.DesktopNotify
Are notifications enabled
isExit() - Method in class client.NodeItem
Is exit node
isFavourite() - Method in class client.NodeItem
Get exit enabled status of Nodeitem
isGuard() - Method in class client.NodeItem
Is Guard node
isGuardEnabled() - Method in class client.NodeItem
Get guard enabled status of Nodeitem
isHeaderOK() - Method in class lib.NetFunctions.HttpPage
 
isHoursOlder(String, long) - Static method in class lib.SimpleFile
Test to see our file is older in hours, returns true if it is
isHttpSupported() - Method in class client.NodeItem
 
isIdle() - Method in class client.TorController
Convenience test for idle status
isIPAddress(String) - Method in class lib.NetFunctions
Make sure ipaddress is valid number
isLinux() - Static method in class lib.OSFunction
Generic test for Linux platform
isLoaded() - Method in class lib.SwingTrayIcon
Is tray icon loaded
isMinutesOlder(String, long) - Static method in class lib.SimpleFile
Test to see our file is older in minutes, returns true if it is
isMultipleInstance(String) - Static method in class lib.OSFunction
Test to see if their are multiple instances of the this app running
isNewerVersion(String, String) - Static method in class lib.Utilities
Check for newer appversion
isNonUnique() - Method in class client.NodeItem
 
isSupported() - Method in class lib.DesktopNotify
Is notifications supported
isSupported() - Method in class lib.SwingTrayIcon
 
isWin10() - Static method in class lib.OSFunction
Specific test for Win 10
isWin7() - Static method in class lib.OSFunction
Specific test for Win 7
isWin8() - Static method in class lib.OSFunction
Specific test for Win 8
isWindows() - Static method in class lib.OSFunction
Generic test for Windows platform
isWinXP() - Static method in class lib.OSFunction
Specific test for Win XP
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/index-files/index-2.html0000644000175000017500000001275113302030722021010 0ustar bannorbannor B-Index (SelekTOR Java Documentation)
Skip navigation links
A B C D E F G H I K L M N O P Q R S T U V W 

B

backupProxyPrefs() - Method in class client.PacFactory
Generic backup of proxy settings
A B C D E F G H I K L M N O P Q R S T U V W 
Skip navigation links
selektor-3.13.73/javadoc/help-doc.html0000644000175000017500000002135113302030722017022 0ustar bannorbannor API Help (SelekTOR Java Documentation)
Skip navigation links

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
This help file applies to API documentation generated using the standard doclet.
Skip navigation links
selektor-3.13.73/javadoc/stylesheet.css0000644000175000017500000003105213302030722017343 0ustar bannorbannor/* Javadoc style sheet */ /* Overall document style */ @import url('resources/fonts/dejavu.css'); body { background-color:#ffffff; color:#353833; font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; font-size:14px; margin:0; } a:link, a:visited { text-decoration:none; color:#4A6782; } a:hover, a:focus { text-decoration:none; color:#bb7a2a; } a:active { text-decoration:none; color:#4A6782; } a[name] { color:#353833; } a[name]:hover { text-decoration:none; color:#353833; } pre { font-family:'DejaVu Sans Mono', monospace; font-size:14px; } h1 { font-size:20px; } h2 { font-size:18px; } h3 { font-size:16px; font-style:italic; } h4 { font-size:13px; } h5 { font-size:12px; } h6 { font-size:11px; } ul { list-style-type:disc; } code, tt { font-family:'DejaVu Sans Mono', monospace; font-size:14px; padding-top:4px; margin-top:8px; line-height:1.4em; } dt code { font-family:'DejaVu Sans Mono', monospace; font-size:14px; padding-top:4px; } table tr td dt code { font-family:'DejaVu Sans Mono', monospace; font-size:14px; vertical-align:top; padding-top:4px; } sup { font-size:8px; } /* Document title and Copyright styles */ .clear { clear:both; height:0px; overflow:hidden; } .aboutLanguage { float:right; padding:0px 21px; font-size:11px; z-index:200; margin-top:-9px; } .legalCopy { margin-left:.5em; } .bar a, .bar a:link, .bar a:visited, .bar a:active { color:#FFFFFF; text-decoration:none; } .bar a:hover, .bar a:focus { color:#bb7a2a; } .tab { background-color:#0066FF; color:#ffffff; padding:8px; width:5em; font-weight:bold; } /* Navigation bar styles */ .bar { background-color:#4D7A97; color:#FFFFFF; padding:.8em .5em .4em .8em; height:auto;/*height:1.8em;*/ font-size:11px; margin:0; } .topNav { background-color:#4D7A97; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; font-size:12px; } .bottomNav { margin-top:10px; background-color:#4D7A97; color:#FFFFFF; float:left; padding:0; width:100%; clear:right; height:2.8em; padding-top:10px; overflow:hidden; font-size:12px; } .subNav { background-color:#dee3e9; float:left; width:100%; overflow:hidden; font-size:12px; } .subNav div { clear:left; float:left; padding:0 0 5px 6px; text-transform:uppercase; } ul.navList, ul.subNavList { float:left; margin:0 25px 0 0; padding:0; } ul.navList li{ list-style:none; float:left; padding: 5px 6px; text-transform:uppercase; } ul.subNavList li{ list-style:none; float:left; } .topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { color:#FFFFFF; text-decoration:none; text-transform:uppercase; } .topNav a:hover, .bottomNav a:hover { text-decoration:none; color:#bb7a2a; text-transform:uppercase; } .navBarCell1Rev { background-color:#F8981D; color:#253441; margin: auto 5px; } .skipNav { position:absolute; top:auto; left:-9999px; overflow:hidden; } /* Page header and footer styles */ .header, .footer { clear:both; margin:0 20px; padding:5px 0 0 0; } .indexHeader { margin:10px; position:relative; } .indexHeader span{ margin-right:15px; } .indexHeader h1 { font-size:13px; } .title { color:#2c4557; margin:10px 0; } .subTitle { margin:5px 0 0 0; } .header ul { margin:0 0 15px 0; padding:0; } .footer ul { margin:20px 0 5px 0; } .header ul li, .footer ul li { list-style:none; font-size:13px; } /* Heading styles */ div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { background-color:#dee3e9; border:1px solid #d0d9e0; margin:0 0 6px -8px; padding:7px 5px; } ul.blockList ul.blockList ul.blockList li.blockList h3 { background-color:#dee3e9; border:1px solid #d0d9e0; margin:0 0 6px -8px; padding:7px 5px; } ul.blockList ul.blockList li.blockList h3 { padding:0; margin:15px 0; } ul.blockList li.blockList h2 { padding:0px 0 20px 0; } /* Page layout container styles */ .contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { clear:both; padding:10px 20px; position:relative; } .indexContainer { margin:10px; position:relative; font-size:12px; } .indexContainer h2 { font-size:13px; padding:0 0 3px 0; } .indexContainer ul { margin:0; padding:0; } .indexContainer ul li { list-style:none; padding-top:2px; } .contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { font-size:12px; font-weight:bold; margin:10px 0 0 0; color:#4E4E4E; } .contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { margin:5px 0 10px 0px; font-size:14px; font-family:'DejaVu Sans Mono',monospace; } .serializedFormContainer dl.nameValue dt { margin-left:1px; font-size:1.1em; display:inline; font-weight:bold; } .serializedFormContainer dl.nameValue dd { margin:0 0 0 1px; font-size:1.1em; display:inline; } /* List styles */ ul.horizontal li { display:inline; font-size:0.9em; } ul.inheritance { margin:0; padding:0; } ul.inheritance li { display:inline; list-style:none; } ul.inheritance li ul.inheritance { margin-left:15px; padding-left:15px; padding-top:1px; } ul.blockList, ul.blockListLast { margin:10px 0 10px 0; padding:0; } ul.blockList li.blockList, ul.blockListLast li.blockList { list-style:none; margin-bottom:15px; line-height:1.4; } ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { padding:0px 20px 5px 10px; border:1px solid #ededed; background-color:#f8f8f8; } ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { padding:0 0 5px 8px; background-color:#ffffff; border:none; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { margin-left:0; padding-left:0; padding-bottom:15px; border:none; } ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { list-style:none; border-bottom:none; padding-bottom:0; } table tr td dl, table tr td dl dt, table tr td dl dd { margin-top:0; margin-bottom:1px; } /* Table styles */ .overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { width:100%; border-left:1px solid #EEE; border-right:1px solid #EEE; border-bottom:1px solid #EEE; } .overviewSummary, .memberSummary { padding:0px; } .overviewSummary caption, .memberSummary caption, .typeSummary caption, .useSummary caption, .constantsSummary caption, .deprecatedSummary caption { position:relative; text-align:left; background-repeat:no-repeat; color:#253441; font-weight:bold; clear:none; overflow:hidden; padding:0px; padding-top:10px; padding-left:1px; margin:0px; white-space:pre; } .overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, .useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, .overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, .useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, .overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, .useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, .overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, .useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { color:#FFFFFF; } .overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, .useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { white-space:nowrap; padding-top:5px; padding-left:12px; padding-right:12px; padding-bottom:7px; display:inline-block; float:left; background-color:#F8981D; border: none; height:16px; } .memberSummary caption span.activeTableTab span { white-space:nowrap; padding-top:5px; padding-left:12px; padding-right:12px; margin-right:3px; display:inline-block; float:left; background-color:#F8981D; height:16px; } .memberSummary caption span.tableTab span { white-space:nowrap; padding-top:5px; padding-left:12px; padding-right:12px; margin-right:3px; display:inline-block; float:left; background-color:#4D7A97; height:16px; } .memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { padding-top:0px; padding-left:0px; padding-right:0px; background-image:none; float:none; display:inline; } .overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, .useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { display:none; width:5px; position:relative; float:left; background-color:#F8981D; } .memberSummary .activeTableTab .tabEnd { display:none; width:5px; margin-right:3px; position:relative; float:left; background-color:#F8981D; } .memberSummary .tableTab .tabEnd { display:none; width:5px; margin-right:3px; position:relative; background-color:#4D7A97; float:left; } .overviewSummary td, .memberSummary td, .typeSummary td, .useSummary td, .constantsSummary td, .deprecatedSummary td { text-align:left; padding:0px 0px 12px 10px; } th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ vertical-align:top; padding-right:0px; padding-top:8px; padding-bottom:3px; } th.colFirst, th.colLast, th.colOne, .constantsSummary th { background:#dee3e9; text-align:left; padding:8px 3px 3px 7px; } td.colFirst, th.colFirst { white-space:nowrap; font-size:13px; } td.colLast, th.colLast { font-size:13px; } td.colOne, th.colOne { font-size:13px; } .overviewSummary td.colFirst, .overviewSummary th.colFirst, .useSummary td.colFirst, .useSummary th.colFirst, .overviewSummary td.colOne, .overviewSummary th.colOne, .memberSummary td.colFirst, .memberSummary th.colFirst, .memberSummary td.colOne, .memberSummary th.colOne, .typeSummary td.colFirst{ width:25%; vertical-align:top; } td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { font-weight:bold; } .tableSubHeadingColor { background-color:#EEEEFF; } .altColor { background-color:#FFFFFF; } .rowColor { background-color:#EEEEEF; } /* Content styles */ .description pre { margin-top:0; } .deprecatedContent { margin:0; padding:10px 0; } .docSummary { padding:0; } ul.blockList ul.blockList ul.blockList li.blockList h3 { font-style:normal; } div.block { font-size:14px; font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; } td.colLast div { padding-top:0px; } td.colLast a { padding-bottom:3px; } /* Formatting effect styles */ .sourceLineNo { color:green; padding:0 30px 0 0; } h1.hidden { visibility:hidden; overflow:hidden; font-size:10px; } .block { display:block; margin:3px 10px 2px 0px; color:#474747; } .deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, .overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { font-weight:bold; } .deprecationComment, .emphasizedPhrase, .interfaceName { font-style:italic; } div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, div.block div.block span.interfaceName { font-style:normal; } div.contentContainer ul.blockList li.blockList h2{ padding-bottom:0px; } selektor-3.13.73/javadoc/serialized-form.html0000644000175000017500000007710313302030722020431 0ustar bannorbannor Serialized Form (SelekTOR Java Documentation)
Skip navigation links

Serialized Form

Skip navigation links
selektor-3.13.73/javadoc/overview-summary.html0000644000175000017500000001012413302030722020664 0ustar bannorbannor Overview (SelekTOR Java Documentation)
Skip navigation links
Packages 
Package Description
client  
lib  
Skip navigation links
selektor-3.13.73/javadoc/deprecated-list.html0000644000175000017500000000712513302030722020403 0ustar bannorbannor Deprecated List (SelekTOR Java Documentation)
Skip navigation links

Deprecated API

Contents

Skip navigation links
selektor-3.13.73/javadoc/index.html0000644000175000017500000000565013302030722016442 0ustar bannorbannor SelekTOR Java Documentation <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <h2>Frame Alert</h2> <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> selektor-3.13.73/javadoc/lib/0000755000175000017500000000000013302030722015205 5ustar bannorbannorselektor-3.13.73/javadoc/lib/GTKFixes.html0000644000175000017500000003105213302030722017520 0ustar bannorbannor GTKFixes (SelekTOR Java Documentation)
Skip navigation links
lib

Class GTKFixes

Skip navigation links
selektor-3.13.73/javadoc/lib/package-summary.html0000644000175000017500000001561313302030722021167 0ustar bannorbannor lib (SelekTOR Java Documentation)
Skip navigation links

Package lib

Skip navigation links
selektor-3.13.73/javadoc/lib/ExtensionFileFilter.html0000644000175000017500000002647113302030722022027 0ustar bannorbannor ExtensionFileFilter (SelekTOR Java Documentation)
Skip navigation links
lib

Class ExtensionFileFilter

Skip navigation links
selektor-3.13.73/javadoc/lib/package-use.html0000644000175000017500000001352013302030722020261 0ustar bannorbannor Uses of Package lib (SelekTOR Java Documentation)
Skip navigation links

Uses of Package
lib

Skip navigation links
selektor-3.13.73/javadoc/lib/package-frame.html0000644000175000017500000000433613302030722020564 0ustar bannorbannor lib (SelekTOR Java Documentation)

lib

Classes

selektor-3.13.73/javadoc/lib/package-tree.html0000644000175000017500000001565413302030722020436 0ustar bannorbannor lib Class Hierarchy (SelekTOR Java Documentation)
Skip navigation links

Hierarchy For Package lib

Package Hierarchies:

Class Hierarchy

Skip navigation links
selektor-3.13.73/javadoc/lib/TrayPopupMenu.html0000644000175000017500000005242013302030722020666 0ustar bannorbannor TrayPopupMenu (SelekTOR Java Documentation)
Skip navigation links
lib

Class TrayPopupMenu

Skip navigation links
selektor-3.13.73/javadoc/lib/TextResourceDialog.html0000644000175000017500000005521313302030722021655 0ustar bannorbannor TextResourceDialog (SelekTOR Java Documentation)
Skip navigation links
lib

Class TextResourceDialog

Skip navigation links
selektor-3.13.73/javadoc/lib/SwingTrayIcon.html0000644000175000017500000003427713302030722020650 0ustar bannorbannor SwingTrayIcon (SelekTOR Java Documentation)
Skip navigation links
lib

Class SwingTrayIcon

Skip navigation links
selektor-3.13.73/javadoc/lib/InfoDialog.html0000644000175000017500000012311413302030722020110 0ustar bannorbannor InfoDialog (SelekTOR Java Documentation)
Skip navigation links
lib

Class InfoDialog

Skip navigation links
selektor-3.13.73/javadoc/lib/NetFunctions.html0000644000175000017500000005303213302030722020515 0ustar bannorbannor NetFunctions (SelekTOR Java Documentation)
Skip navigation links
lib

Class NetFunctions

Skip navigation links
selektor-3.13.73/javadoc/lib/Localisation.html0000644000175000017500000002753013302030722020523 0ustar bannorbannor Localisation (SelekTOR Java Documentation)
Skip navigation links
lib

Class Localisation

Skip navigation links
selektor-3.13.73/javadoc/lib/OSFunction.html0000644000175000017500000012601313302030722020125 0ustar bannorbannor OSFunction (SelekTOR Java Documentation)
Skip navigation links
lib

Class OSFunction

Skip navigation links
selektor-3.13.73/javadoc/lib/NetFunctions.HttpPage.html0000644000175000017500000004016213302030722022230 0ustar bannorbannor NetFunctions.HttpPage (SelekTOR Java Documentation)
Skip navigation links
lib

Class NetFunctions.HttpPage

Skip navigation links
selektor-3.13.73/javadoc/lib/ClientProcess.html0000644000175000017500000003772313302030722020664 0ustar bannorbannor ClientProcess (SelekTOR Java Documentation)
Skip navigation links
lib

Class ClientProcess

Skip navigation links
selektor-3.13.73/javadoc/lib/DesktopNotify.html0000644000175000017500000003157713302030722020712 0ustar bannorbannor DesktopNotify (SelekTOR Java Documentation)
Skip navigation links
lib

Class DesktopNotify

Skip navigation links
selektor-3.13.73/javadoc/lib/SimpleProps.html0000644000175000017500000004415613302030722020362 0ustar bannorbannor SimpleProps (SelekTOR Java Documentation)
Skip navigation links
lib

Class SimpleProps

Skip navigation links
selektor-3.13.73/javadoc/lib/AboutDialog.html0000644000175000017500000005732213302030722020276 0ustar bannorbannor AboutDialog (SelekTOR Java Documentation)
Skip navigation links
lib

Class AboutDialog

Skip navigation links
selektor-3.13.73/javadoc/lib/SimpleFile.html0000644000175000017500000014222013302030722020125 0ustar bannorbannor SimpleFile (SelekTOR Java Documentation)
Skip navigation links
lib

Class SimpleFile

Skip navigation links
selektor-3.13.73/javadoc/lib/Utilities.html0000644000175000017500000005266713302030722020066 0ustar bannorbannor Utilities (SelekTOR Java Documentation)
Skip navigation links
lib

Class Utilities

Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/0000755000175000017500000000000013302030722017104 5ustar bannorbannorselektor-3.13.73/javadoc/lib/class-use/GTKFixes.html0000644000175000017500000001001113302030722021407 0ustar bannorbannor Uses of Class lib.GTKFixes (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.GTKFixes

No usage of lib.GTKFixes
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/ExtensionFileFilter.html0000644000175000017500000001020213302030722023707 0ustar bannorbannor Uses of Class lib.ExtensionFileFilter (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.ExtensionFileFilter

No usage of lib.ExtensionFileFilter
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/TrayPopupMenu.html0000644000175000017500000001425713302030722022573 0ustar bannorbannor Uses of Class lib.TrayPopupMenu (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.TrayPopupMenu

Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/TextResourceDialog.html0000644000175000017500000001016713302030722023553 0ustar bannorbannor Uses of Class lib.TextResourceDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.TextResourceDialog

No usage of lib.TextResourceDialog
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/SwingTrayIcon.html0000644000175000017500000001324713302030722022541 0ustar bannorbannor Uses of Class lib.SwingTrayIcon (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.SwingTrayIcon

Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/InfoDialog.html0000644000175000017500000001003713302030722022006 0ustar bannorbannor Uses of Class lib.InfoDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.InfoDialog

No usage of lib.InfoDialog
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/NetFunctions.html0000644000175000017500000001006513302030722022413 0ustar bannorbannor Uses of Class lib.NetFunctions (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.NetFunctions

No usage of lib.NetFunctions
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/Localisation.html0000644000175000017500000001006513302030722022415 0ustar bannorbannor Uses of Class lib.Localisation (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.Localisation

No usage of lib.Localisation
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/OSFunction.html0000644000175000017500000001003713302030722022022 0ustar bannorbannor Uses of Class lib.OSFunction (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.OSFunction

No usage of lib.OSFunction
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/NetFunctions.HttpPage.html0000644000175000017500000001023013302030722024120 0ustar bannorbannor Uses of Class lib.NetFunctions.HttpPage (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.NetFunctions.HttpPage

No usage of lib.NetFunctions.HttpPage
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/ClientProcess.html0000644000175000017500000001353213302030722022553 0ustar bannorbannor Uses of Class lib.ClientProcess (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.ClientProcess

Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/DesktopNotify.html0000644000175000017500000001010013302030722022564 0ustar bannorbannor Uses of Class lib.DesktopNotify (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.DesktopNotify

No usage of lib.DesktopNotify
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/SimpleProps.html0000644000175000017500000001340313302030722022250 0ustar bannorbannor Uses of Class lib.SimpleProps (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.SimpleProps

Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/AboutDialog.html0000644000175000017500000001005213302030722022162 0ustar bannorbannor Uses of Class lib.AboutDialog (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.AboutDialog

No usage of lib.AboutDialog
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/SimpleFile.html0000644000175000017500000001003713302030722022024 0ustar bannorbannor Uses of Class lib.SimpleFile (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.SimpleFile

No usage of lib.SimpleFile
Skip navigation links
selektor-3.13.73/javadoc/lib/class-use/Utilities.html0000644000175000017500000001002413302030722021742 0ustar bannorbannor Uses of Class lib.Utilities (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
lib.Utilities

No usage of lib.Utilities
Skip navigation links
selektor-3.13.73/javadoc/allclasses-frame.html0000644000175000017500000000734113302030722020550 0ustar bannorbannor All Classes (SelekTOR Java Documentation)

All Classes

selektor-3.13.73/javadoc/overview-frame.html0000644000175000017500000000177313302030722020273 0ustar bannorbannor Overview List (SelekTOR Java Documentation)
All Classes

Packages

 

selektor-3.13.73/javadoc/allclasses-noframe.html0000644000175000017500000000616513302030722021110 0ustar bannorbannor All Classes (SelekTOR Java Documentation)

All Classes

selektor-3.13.73/javadoc/class-use/0000755000175000017500000000000013302030722016336 5ustar bannorbannorselektor-3.13.73/javadoc/class-use/SelekTOR.html0000644000175000017500000000770713302030722020667 0ustar bannorbannor Uses of Class SelekTOR (SelekTOR Java Documentation)
Skip navigation links

Uses of Class
SelekTOR

No usage of SelekTOR
Skip navigation links
selektor-3.13.73/SelekTOR.pro0000644000175000017500000003211113302030722015200 0ustar bannorbannor -libraryjars /usr/lib/jvm/default-java/jre/lib/resources.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/rt.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/jsse.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/charsets.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/management-agent.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/jce.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/ext/dnsns.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/ext/localedata.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/ext/sunjce_provider.jar -libraryjars /usr/lib/jvm/default-java/jre/lib/ext/sunpkcs11.jar -target 1.7 -optimizations !code/allocation/* -optimizationpasses 2 -dontobfuscate -overloadaggressively -verbose -ignorewarnings -keepclasseswithmembers class * { *** styleFactory; } # Keep names - Native method names. Keep all native class/method names. -keepclasseswithmembers,allowshrinking class * { native ; } # Keep - Applications. Keep all application classes, along with their 'main' # methods. -keepclasseswithmembers public class * { public static void main(java.lang.String[]); } # Also keep - Enumerations. Keep the special static methods that are required in # enumeration classes. -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } # Also keep - Database drivers. Keep all implementations of java.sql.Driver. -keep class * extends java.sql.Driver # Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI, # along with the special 'createUI' method. -keep class * extends javax.swing.plaf.ComponentUI { public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent); } # Remove - Math method calls. Remove all invocations of Math # methods without side effects whose return values are not used. -assumenosideeffects public class java.lang.Math { public static double sin(double); public static double cos(double); public static double tan(double); public static double asin(double); public static double acos(double); public static double atan(double); public static double toRadians(double); public static double toDegrees(double); public static double exp(double); public static double log(double); public static double log10(double); public static double sqrt(double); public static double cbrt(double); public static double IEEEremainder(double,double); public static double ceil(double); public static double floor(double); public static double rint(double); public static double atan2(double,double); public static double pow(double,double); public static int round(float); public static long round(double); public static double random(); public static int abs(int); public static long abs(long); public static float abs(float); public static double abs(double); public static int max(int,int); public static long max(long,long); public static float max(float,float); public static double max(double,double); public static int min(int,int); public static long min(long,long); public static float min(float,float); public static double min(double,double); public static double ulp(double); public static float ulp(float); public static double signum(double); public static float signum(float); public static double sinh(double); public static double cosh(double); public static double tanh(double); public static double hypot(double,double); public static double expm1(double); public static double log1p(double); } # Remove - Number method calls. Remove all invocations of Number # methods without side effects whose return values are not used. -assumenosideeffects public class java.lang.* extends java.lang.Number { public static java.lang.String toString(byte); public static java.lang.Byte valueOf(byte); public static byte parseByte(java.lang.String); public static byte parseByte(java.lang.String,int); public static java.lang.Byte valueOf(java.lang.String,int); public static java.lang.Byte valueOf(java.lang.String); public static java.lang.Byte decode(java.lang.String); public int compareTo(java.lang.Byte); public static java.lang.String toString(short); public static short parseShort(java.lang.String); public static short parseShort(java.lang.String,int); public static java.lang.Short valueOf(java.lang.String,int); public static java.lang.Short valueOf(java.lang.String); public static java.lang.Short valueOf(short); public static java.lang.Short decode(java.lang.String); public static short reverseBytes(short); public int compareTo(java.lang.Short); public static java.lang.String toString(int,int); public static java.lang.String toHexString(int); public static java.lang.String toOctalString(int); public static java.lang.String toBinaryString(int); public static java.lang.String toString(int); public static int parseInt(java.lang.String,int); public static int parseInt(java.lang.String); public static java.lang.Integer valueOf(java.lang.String,int); public static java.lang.Integer valueOf(java.lang.String); public static java.lang.Integer valueOf(int); public static java.lang.Integer getInteger(java.lang.String); public static java.lang.Integer getInteger(java.lang.String,int); public static java.lang.Integer getInteger(java.lang.String,java.lang.Integer); public static java.lang.Integer decode(java.lang.String); public static int highestOneBit(int); public static int lowestOneBit(int); public static int numberOfLeadingZeros(int); public static int numberOfTrailingZeros(int); public static int bitCount(int); public static int rotateLeft(int,int); public static int rotateRight(int,int); public static int reverse(int); public static int signum(int); public static int reverseBytes(int); public int compareTo(java.lang.Integer); public static java.lang.String toString(long,int); public static java.lang.String toHexString(long); public static java.lang.String toOctalString(long); public static java.lang.String toBinaryString(long); public static java.lang.String toString(long); public static long parseLong(java.lang.String,int); public static long parseLong(java.lang.String); public static java.lang.Long valueOf(java.lang.String,int); public static java.lang.Long valueOf(java.lang.String); public static java.lang.Long valueOf(long); public static java.lang.Long decode(java.lang.String); public static java.lang.Long getLong(java.lang.String); public static java.lang.Long getLong(java.lang.String,long); public static java.lang.Long getLong(java.lang.String,java.lang.Long); public static long highestOneBit(long); public static long lowestOneBit(long); public static int numberOfLeadingZeros(long); public static int numberOfTrailingZeros(long); public static int bitCount(long); public static long rotateLeft(long,int); public static long rotateRight(long,int); public static long reverse(long); public static int signum(long); public static long reverseBytes(long); public int compareTo(java.lang.Long); public static java.lang.String toString(float); public static java.lang.String toHexString(float); public static java.lang.Float valueOf(java.lang.String); public static java.lang.Float valueOf(float); public static float parseFloat(java.lang.String); public static boolean isNaN(float); public static boolean isInfinite(float); public static int floatToIntBits(float); public static int floatToRawIntBits(float); public static float intBitsToFloat(int); public static int compare(float,float); public boolean isNaN(); public boolean isInfinite(); public int compareTo(java.lang.Float); public static java.lang.String toString(double); public static java.lang.String toHexString(double); public static java.lang.Double valueOf(java.lang.String); public static java.lang.Double valueOf(double); public static double parseDouble(java.lang.String); public static boolean isNaN(double); public static boolean isInfinite(double); public static long doubleToLongBits(double); public static long doubleToRawLongBits(double); public static double longBitsToDouble(long); public static int compare(double,double); public boolean isNaN(); public boolean isInfinite(); public int compareTo(java.lang.Double); public byte byteValue(); public short shortValue(); public int intValue(); public long longValue(); public float floatValue(); public double doubleValue(); public int compareTo(java.lang.Object); public boolean equals(java.lang.Object); public int hashCode(); public java.lang.String toString(); } # Remove - String method calls. Remove all invocations of String # methods without side effects whose return values are not used. -assumenosideeffects public class java.lang.String { public static java.lang.String copyValueOf(char[]); public static java.lang.String copyValueOf(char[],int,int); public static java.lang.String valueOf(boolean); public static java.lang.String valueOf(char); public static java.lang.String valueOf(char[]); public static java.lang.String valueOf(char[],int,int); public static java.lang.String valueOf(double); public static java.lang.String valueOf(float); public static java.lang.String valueOf(int); public static java.lang.String valueOf(java.lang.Object); public static java.lang.String valueOf(long); public boolean contentEquals(java.lang.StringBuffer); public boolean endsWith(java.lang.String); public boolean equalsIgnoreCase(java.lang.String); public boolean equals(java.lang.Object); public boolean matches(java.lang.String); public boolean regionMatches(boolean,int,java.lang.String,int,int); public boolean regionMatches(int,java.lang.String,int,int); public boolean startsWith(java.lang.String); public boolean startsWith(java.lang.String,int); public byte[] getBytes(); public byte[] getBytes(java.lang.String); public char charAt(int); public char[] toCharArray(); public int compareToIgnoreCase(java.lang.String); public int compareTo(java.lang.Object); public int compareTo(java.lang.String); public int hashCode(); public int indexOf(int); public int indexOf(int,int); public int indexOf(java.lang.String); public int indexOf(java.lang.String,int); public int lastIndexOf(int); public int lastIndexOf(int,int); public int lastIndexOf(java.lang.String); public int lastIndexOf(java.lang.String,int); public int length(); public java.lang.CharSequence subSequence(int,int); public java.lang.String concat(java.lang.String); public java.lang.String replaceAll(java.lang.String,java.lang.String); public java.lang.String replace(char,char); public java.lang.String replaceFirst(java.lang.String,java.lang.String); public java.lang.String[] split(java.lang.String); public java.lang.String[] split(java.lang.String,int); public java.lang.String substring(int); public java.lang.String substring(int,int); public java.lang.String toLowerCase(); public java.lang.String toLowerCase(java.util.Locale); public java.lang.String toString(); public java.lang.String toUpperCase(); public java.lang.String toUpperCase(java.util.Locale); public java.lang.String trim(); } # Remove - StringBuffer method calls. Remove all invocations of StringBuffer # methods without side effects whose return values are not used. -assumenosideeffects public class java.lang.StringBuffer { public java.lang.String toString(); public char charAt(int); public int capacity(); public int codePointAt(int); public int codePointBefore(int); public int indexOf(java.lang.String,int); public int lastIndexOf(java.lang.String); public int lastIndexOf(java.lang.String,int); public int length(); public java.lang.String substring(int); public java.lang.String substring(int,int); } # Remove - StringBuilder method calls. Remove all invocations of StringBuilder # methods without side effects whose return values are not used. -assumenosideeffects public class java.lang.StringBuilder { public java.lang.String toString(); public char charAt(int); public int capacity(); public int codePointAt(int); public int codePointBefore(int); public int indexOf(java.lang.String,int); public int lastIndexOf(java.lang.String); public int lastIndexOf(java.lang.String,int); public int length(); public java.lang.String substring(int); public java.lang.String substring(int,int); } # Remove debugging - Throwable_printStackTrace calls. Remove all invocations of # Throwable.printStackTrace(). -assumenosideeffects public class java.lang.Throwable { public void printStackTrace(); } # Remove debugging - Thread_dumpStack calls. Remove all invocations of # Thread.dumpStack(). -assumenosideeffects public class java.lang.Thread { public static void dumpStack(); } selektor-3.13.73/COPYING0000644000175000017500000004325413302030722014073 0ustar bannorbannor GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. selektor-3.13.73/src/0000755000175000017500000000000013302030722013617 5ustar bannorbannorselektor-3.13.73/src/SelekTOR.java0000644000175000017500000000317313302030722016116 0ustar bannorbannor/* * Copyright (C) 2014 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * Explanation of why this is in the default package * * @author Alistair Neil * * The app launcher is here in the default package which should not normally be * used. The method java uses to launche its apps is not fully compatible with * various Linux launchers panels such as Dockbarx or Unity launchers and thus * confuses those apps. By putting this simple launch handle here in the default * package the Linux dockpanel launchers should function correctly when it * commes to application pinning. * */ public class SelekTOR { /** * @param args the command line arguments */ public static void main(final String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { new client.SelekTOR(args); } }); } } selektor-3.13.73/src/client/0000755000175000017500000000000013302030722015075 5ustar bannorbannorselektor-3.13.73/src/client/TorProcess.java0000644000175000017500000006165113302030722020054 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.net.URI; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; import javax.swing.JTextArea; import javax.swing.text.BadLocationException; import lib.ClientProcess; import lib.SimpleFile; /** * * @author Alistair Neil */ public class TorProcess extends ClientProcess { public static final int LOG_DEBUG = 0; public static final int LOG_INFO = 1; public static final int LOG_NOTICE = 2; private static final String TORCONFIGFILE = "torrc"; public static final String EMPTYSTRING = ""; // Event constants public static final int TOR_MESSAGE = 0; public static final int TOR_BOOT_TIMEOUT = 1; public static final int TOR_BOOT_FATAL = 2; public static final int TOR_BOOT_ERROR = 3; public static final int TOR_CLOCK_ERROR = 4; public static final int TOR_NOROUTE = 5; public static final int TOR_BOOTED = 6; public static final int TOR_RESTARTED = 7; public static final int TOR_NOEXITS = 8; public static final int TOR_STOPPED = 9; public static final int TOR_BRIDGE = 10; public static final int TOR_NEWCIRC = 11; public static final int TOR_DIRINFO_STALE = 12; public static final int TOR_NOHOP0 = 13; public static final int TOR_NONET_ACTIVITY = 14; private static final String[] EVENTMESSAGES = new String[]{ "TOR_MESSAGE", "TOR_BOOT_TIMEOUT", "TOR_BOOT_FATAL", "TOR_BOOT_ERROR", "TOR_CLOCK_ERROR", "TOR_NOROUTE", "TOR_BOOTED", "TOR_RESTARTED", "TOR_NOEXITS", "TOR_STOPPED", "TOR_BRIDGE", "TOR_NEWCIRC", "TOR_DIRINFO_STALE", "TOR_NOHOP0", "TOR_NONET_ACTIVITY" }; private final LinkedHashMap lhmCLIOptions; private final LinkedHashMap lhmTorrcOptions; private final String strClientLocation; private final String strConfigFolder; private String strSecret; private String strCachedDataFolder; private String invCommas = "\""; private String strExternalArgs = ""; private String strBridges = ""; private int intListenPort; private int intInitialBootEvent; private int loglev = LOG_NOTICE; private float version = 9999; private int maxlines = 50; private int nolines; private JTextArea jtxtstdout; private boolean boolSilentBoot; /** * Constructor * * @param clientpath Path to Tor client * @param configfolder Filepath to torrc */ public TorProcess(String clientpath, String configfolder) { setSilentBootEnabled(false); strClientLocation = clientpath; this.intInitialBootEvent = TOR_BOOTED; this.strConfigFolder = configfolder; this.lhmCLIOptions = new LinkedHashMap<>(); this.lhmTorrcOptions = new LinkedHashMap<>(); // All our initialisation if (SimpleFile.getSeparator().compareTo("/") == 0) { this.invCommas = ""; } } /** * Starts Tor process, and issues booted event on completion * */ public final void startProcess() { setStartupTimeout(45); // Cache age check float age = getCacheAge(); Logger.getGlobal().logp(Level.INFO, TorProcess.class.getName(), "start() on Port=" + getListenPort(), "Cache age = " + (int) age + " minutes."); if (age > 180) { deleteCacheData(); Logger.getGlobal().logp(Level.INFO, TorProcess.class.getName(), "start() on Port=" + getListenPort(), "Cache stale, deleting old cache data."); } // Some essential initialisation String strConfig = strClientLocation + " -f " + invCommas + getConfigFilePath() + invCommas + " " + getCLIOptionsAsString() + " " + strExternalArgs; super.start(strConfig); } /** * Set the Tor stdout log level * * @param lev */ public final void setLogLevel(int lev) { loglev = lev; } /** * Set external user provided startup arguments * * @param torargs */ public final void setExternalArgs(String torargs) { strExternalArgs = torargs; } /** * Set the listening port * * @param port */ public final void setListenPort(int port) { // Setup listening port and control port if (intListenPort == port) { return; } intListenPort = port; setCLIOption("SocksPort", String.valueOf(port)); setCLIOption("ControlPort", String.valueOf(port + 1)); // Finish of by creating the default config file and data folders createDataFolder(); } /** * Set the event that is issued on process boot completion * * @param event */ public final void setInitialBootEvent(int event) { intInitialBootEvent = event; } /** * Client event handler, can be overriden by parent class * * @param data line data from standard output of Tor client */ @Override public final void clientProcessEventFired(String data) { Logger.getGlobal().logp(Level.FINER, TorProcess.class.getName(), "clientProcessEventFired() on Port=" + getListenPort(), data); if (!data.isEmpty()) { appendStdout(data); } // Check for process stopped if (getClientStatus() == CLIENT_STOPPED) { torProcessEventFired(TOR_STOPPED, null); return; } // Check for timeout if (getClientStatus() == CLIENT_TIMEDOUT) { torProcessEventFired(TOR_BOOT_TIMEOUT, null); return; } if (getClientStatus() == CLIENT_RUNNING) { // Check to see if we need to copy cache if (strCachedDataFolder != null) { SimpleFile.copyFolderContents(strCachedDataFolder, getDataFolder() + SimpleFile.getSeparator(), "torrc"); strCachedDataFolder = null; } // Check for fatal tor process startup errors if (data.contains("[warn] Our clock")) { torProcessEventFired(TOR_CLOCK_ERROR, data); return; } // Check for errors if (data.contains("exception") || data.contains("[err]")) { torProcessEventFired(TOR_BOOT_FATAL, data); return; } // Check for network unreachable if (data.contains("NOROUTE")) { torProcessEventFired(TOR_NOROUTE, data); return; } // Check new tor bridge if (data.contains("[notice] new bridge")) { torProcessEventFired(TOR_BRIDGE, data); return; } // Check for conditions that may prevent circuit building if (data.contains("directory information is no longer up-to-date")) { torProcessEventFired(TOR_DIRINFO_STALE, data); return; } // Check for conditions that will prevent circuit building if (data.contains("All routers are down")) { torProcessEventFired(TOR_NOEXITS, data); return; } // Check for Tor retrying on new circuit if (data.contains("Retrying on a new circuit")) { torProcessEventFired(TOR_NEWCIRC, data); return; } // Check for Tor failed to find hop zero if (data.contains("Failed to find node for hop 0")) { torProcessEventFired(TOR_NOHOP0, data); return; } // Check for no net activity if (data.contains("Tor has not observed any network activity")) { torProcessEventFired(TOR_NONET_ACTIVITY, data); return; } // Check for a bootstrap message if (data.contains("Bootstrapped")) { // If silent then dont fire bootstrapping messages if (!boolSilentBoot) { torProcessEventFired(TOR_MESSAGE, data.substring(data.indexOf(']') + 2)); } int percent = getPercentage(data); // Set startup timeout based on percentage of Tor progression if (percent >= 15) { setStartupTimeout(60); } if (percent >= 40) { setStartupTimeout(120); } if (percent >= 80) { setStartupTimeout(30); } // Check for initial bootup completion if (percent >= 100) { setStartupTimeout(-1); torProcessEventFired(intInitialBootEvent, null); intInitialBootEvent = TOR_BOOTED; setSilentBootEnabled(false); } } } } /** * Get percentage value from bootstrap message * * @param data * @return percentage as and int */ private int getPercentage(String data) { int result = -1; int idx1 = data.indexOf("Bootstrapped "); if (idx1 > -1) { idx1 += 13; int idx2 = data.indexOf('%', idx1); if (idx2 > -1) { String temp = data.substring(idx1, idx2); result = Integer.parseInt(temp); } } return result; } /** * Enable/Disable bootstrap message events on startup * * @param enabled */ public final void setSilentBootEnabled(boolean enabled) { boolSilentBoot = enabled; } /** * Get textual representation on an event * * @param event * @return Event as text */ public String getEventMessage(int event) { return EVENTMESSAGES[event]; } /** * Called if an event was fired, will be overidden by sub class * * @param event * @param data */ public void torProcessEventFired(int event, String data) { } public final void setControlPassword(String secret, String hashpass) { strSecret = secret; setCLIOption("hashedcontrolpassword", hashpass); } /** * Get the currently set authentification secret * * @return String */ public final String getSecret() { return strSecret; } /** * Set Tor bridges, supports multiple addresses * * @param bridges */ public final void setBridges(String bridges) { clearCLIOption("UseBridges"); clearCLIOption("Bridge"); clearCLIOption("UpdateBridgesFromAuthority"); strBridges = ""; if (bridges == null || bridges.isEmpty()) { return; } StringBuilder sbBridgesOption = new StringBuilder(); String sep = ""; String[] arrBridges = Pattern.compile(",").split(bridges); for (String s : arrBridges) { sbBridgesOption.append(sep); sbBridgesOption.append(s); if (sep.isEmpty()) { sep = " --Bridge "; } } strBridges = bridges; setCLIOption("UseBridges", "1"); setCLIOption("UpdateBridgesFromAuthority", "1"); setCLIOption("Bridge", sbBridgesOption.toString()); } /** * Validate bridge addresses * * @param bridges * @return true if valid */ public boolean validateBridges(String bridges) { if (bridges.isEmpty()) { return true; } String[] arrBridges = Pattern.compile(",").split(bridges); for (String s : arrBridges) { if (!validateHostPort(s)) { return false; } } return true; } /** * Validate a host:port ipv4 address * * @param hostport * @return true if valid */ public final boolean validateHostPort(String hostport) { try { URI uri = new URI("my://" + hostport); // may throw URISyntaxException if (uri.getHost() == null || uri.getPort() == -1) { return false; } } catch (Exception ex) { return false; } return true; } /** * Get bridges * * @return bridges as csv string */ public final String getBridges() { return strBridges; } /** * Set Ownership process id, useful for proper process termination in event * of a crash * * @param processid */ public void setOwnershipID(String processid) { this.setCLIOption("__OwningControllerProcess", processid); } /** * Return the currently set process ownership ID * * @return String process id */ public String getOwnershipID() { return getCLIOptions("__OwningControllerProcess"); } /** * Set the path to the geoip file * * @param filepath File location */ public final void setGeoIP4(String filepath) { if (filepath != null) { if (SimpleFile.exists(filepath)) { setTorrcOption("GeoIPFile", invCommas + filepath + invCommas); } else { clearTorrcOption("GeoIPFile"); } } else { clearTorrcOption("GeoIPFile"); } } /** * Set the path to the geoip file * * @param filepath File location */ public final void setGeoIP6(String filepath) { if (filepath != null) { if (SimpleFile.exists(filepath)) { setTorrcOption("GeoIPv6File", invCommas + filepath + invCommas); } else { clearTorrcOption("GeoIPv6File"); } } else { clearTorrcOption("GeoIPv6File"); } } /** * Get Tor client location as a filepath * * @return filepath as string */ public final String getClientLocation() { return strClientLocation; } /** * Get the path to the configuration file * * @return String Path to configuration file */ public final String getConfigFilePath() { return getDataFolder() + File.separator + TORCONFIGFILE; } /** * Get a previously added tor option string * * @param option Tor option key * @return String Tor option value */ public final String getCLIOptions(String option) { return lhmCLIOptions.get(option); } /** * Add a tor option string which is passed to the tor client on startup. See * Tor documentation for valid options. * * @param option * @param value */ public final void setCLIOption(String option, String value) { lhmCLIOptions.put(option, value); } /** * Add a tor option boolean value * * @param option * @param value */ public final void setBoolTorOption(String option, boolean value) { lhmCLIOptions.remove(option); if (value) { lhmCLIOptions.put(option, "1"); } else { lhmCLIOptions.put(option, "0"); } } /** * Get a previously added tor option string * * @param option Tor option key * @return String Tor option value */ public final String getTorrcOption(String option) { return lhmTorrcOptions.get(option); } /** * Add a torrc option string See Tor documentation for valid options. * * @param option * @param value */ public final void setTorrcOption(String option, String value) { if (value.startsWith("\"")) { value = value.replace('\\', '/'); } lhmTorrcOptions.put(option, value); } /** * Gets all the currently set torrc options as single String * * @return String Tor client formatted cli arguments */ public final String getTorrcOptionsAsString() { Iterator iterator = lhmTorrcOptions.keySet().iterator(); String key; StringBuilder sbResult = new StringBuilder(); while (iterator.hasNext()) { key = iterator.next(); sbResult.append(key); sbResult.append(" "); sbResult.append(lhmTorrcOptions.get(key)); sbResult.append("\r\n"); } return sbResult.toString(); } /** * Remove previously add torrc option * * @param option */ public final void clearTorrcOption(String option) { lhmTorrcOptions.remove(option); } /** * Get a previously added tor option boolean value * * @param option Tor option key * @return Boolean value */ public final boolean getCLIOptionBool(String option) { return lhmCLIOptions.get(option).contentEquals("1"); } /** * Remove previously add tor option * * @param option */ public final void clearCLIOption(String option) { lhmCLIOptions.remove(option); } /** * Gets all the currently set tor options as single String for use as * arguments passed to tor client * * @return String Tor cleint formatted cli arguments */ public final String getCLIOptionsAsString() { Iterator iterator = lhmCLIOptions.keySet().iterator(); String key; String value; StringBuilder sbResult = new StringBuilder(); while (iterator.hasNext()) { key = iterator.next(); sbResult.append("--"); sbResult.append(key); sbResult.append(" "); value = lhmCLIOptions.get(key); if (!value.isEmpty()) { sbResult.append(value); sbResult.append(" "); } } return sbResult.toString().trim(); } /** * Get the listening port * * @return port */ public final int getListenPort() { return intListenPort; } /** * Get the control port * * @return port */ public final int getControlPort() { return intListenPort + 1; } /** * Creates the default Tor config file */ public final void createDefaultConfig() { SimpleFile sfTorrc = new SimpleFile(getConfigFilePath()); sfTorrc.openBufferedWrite(); sfTorrc.writeFile(getTorrcOptionsAsString(), 0); switch (loglev) { case LOG_DEBUG: sfTorrc.writeFile("log debug stdout", 1); break; case LOG_INFO: sfTorrc.writeFile("log info stdout", 1); break; case LOG_NOTICE: sfTorrc.writeFile("log notice stdout", 1); break; } sfTorrc.writeFile(EMPTYSTRING, 1); sfTorrc.closeFile(); } /** * Delete the configuration file */ public final void deleteConfigFile() { SimpleFile.delete(getConfigFilePath()); } /** * Creates a data folder for the Tor client to put its cache data */ public final void createDataFolder() { String folder = getDataFolder(); if (folder != null) { setTorrcOption("datadirectory", invCommas + getDataFolder() + invCommas); SimpleFile.createFolder(getDataFolder()); } } /** * Get the datafolder being used by tor client * * @return Path to datafolder */ public final String getDataFolder() { if (strConfigFolder == null) { return null; } return strConfigFolder + String.valueOf(intListenPort); } /** * Get the age of the file cache in minutes * * @return age of cache in minutes */ public float getCacheAge() { String path = getDataFolder() + SimpleFile.getSeparator() + "cached-consensus"; if (SimpleFile.exists(path)) { return SimpleFile.getAgeOfFile(path, SimpleFile.PERIOD_MINUTES); } else { return -1; } } /** * Delete Tor cache data */ public final void deleteCacheData() { SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "cached-consensus"); SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "cached-certs"); SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "cached-descriptors"); SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "cached-descriptors.new"); SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "lock"); SimpleFile.secureWipe(getDataFolder() + SimpleFile.getSeparator() + "state"); } /** * This populates the the current folder whose name is derived from the * listening port with data from the given source folder derived by the * given port number. This effectively allows each Tor client spawned to * have its Tor cache data copied from the first Tor client launched instead * of having to go to the net and fetch it and thus start up is a lot * faster. I was actually mildly suprised that this actually works. * * @param port */ public final void setCachedDataFolder(int port) { if (port < 0) { strCachedDataFolder = null; return; } strCachedDataFolder = strConfigFolder + String.valueOf(port); } /** * Get the currently set cached data folder * * @return path to cached data folder as String */ public final String getCachedDataFolder() { return strCachedDataFolder; } /** * Set the text area that will receive Stdout output * * @param jta */ public void setStdoutTextArea(JTextArea jta) { jtxtstdout = jta; } /** * Set the maximum no of lines to display in the Stdout output * * @param lines */ public void setMaxHistory(int lines) { maxlines = lines; } /** * Clear the Stdout text area */ public void clearStdout() { if (jtxtstdout != null) { jtxtstdout.setText(""); } nolines = 0; } /** * Append text to the StdOut text area * * @param text */ private void appendStdout(String text) { if (jtxtstdout == null) { return; } jtxtstdout.append(text + "\n"); if (++nolines > maxlines) { try { int end = jtxtstdout.getLineEndOffset(0); jtxtstdout.replaceRange("", 0, end); } catch (BadLocationException ex) { } } jtxtstdout.setCaretPosition(jtxtstdout.getText().length()); } /** * Get Tor version as float * * @return Tor version as String */ public final float getVersion() { if (version == 9999) { BufferedReader br; String strVer = ""; Process proc; try { proc = Runtime.getRuntime().exec(strClientLocation + " --version"); br = new BufferedReader(new InputStreamReader(proc.getInputStream()), 256); String line; while (true) { line = br.readLine(); if (line == null) { break; } strVer = line; } br.close(); proc.destroy(); proc.waitFor(); } catch (IOException | InterruptedException ex) { Logger.getLogger(TorProcess.class.getName()).log(Level.SEVERE, null, ex); } int idx = strVer.indexOf("ion"); if (idx > -1) { strVer = strVer.substring(idx + 4).replace(".", ""); idx = strVer.indexOf(' '); if (idx > -1) { strVer = strVer.substring(0, idx); } try { version = Float.parseFloat("0." + strVer) * 10; } catch (Exception ex) { Logger.getGlobal().logp(Level.SEVERE, this.getClass().getName(), "getVersion() Port=" + intListenPort, "", ex); } } } return version; } } selektor-3.13.73/src/client/QuickAddDialog.java0000644000175000017500000002105013302030722020543 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import lib.Localisation; /** * * @author Alistair Neil, */ public final class QuickAddDialog extends javax.swing.JDialog { private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); public static final int CANCEL = 0; public static final int APPLY = 1; public static final int RESET = 2; /** * Creates a quick add patterns dialog * * @param parent parent frame * @param modal modality */ public QuickAddDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** * Set text that appears on the Apply button * * @param text */ public void setApplyText(String text) { jButtonApply.setText(text); } /** * Set the test that appears in both fields * * @param desc * @param pattern */ public void setFields(String desc, String pattern) { jTextDescription.setText(desc); jTextPattern.setText(pattern); } /** * Get contents of description field * * @return String text */ public String getDescription() { return jTextDescription.getText(); } /** * Get contents of the pattern field * * @return String text */ public String getPattern() { return jTextPattern.getText(); } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public int getReturnStatus() { return returnStatus; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jPanelPreferences = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jTextDescription = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jTextPattern = new javax.swing.JTextField(); jButtonCancel = new javax.swing.JButton(); jButtonApply = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(LOCAL.getString("dlg_quickadd_title")); // NOI18N setIconImage(null); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jPanelPreferences.setFont(jPanelPreferences.getFont().deriveFont(jPanelPreferences.getFont().getStyle() | java.awt.Font.BOLD)); jLabel1.setText(LOCAL.getString("label_quickadd_desc")); // NOI18N jLabel2.setText(LOCAL.getString("label_quickadd_pattern")); // NOI18N jButtonCancel.setText(LOCAL.getString("button_cancel")); // NOI18N jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancelActionPerformed(evt); } }); jButtonApply.setText(LOCAL.getString("button_addnew")); // NOI18N jButtonApply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonApplyActionPerformed(evt); } }); javax.swing.GroupLayout jPanelPreferencesLayout = new javax.swing.GroupLayout(jPanelPreferences); jPanelPreferences.setLayout(jPanelPreferencesLayout); jPanelPreferencesLayout.setHorizontalGroup( jPanelPreferencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelPreferencesLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelPreferencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jTextDescription, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE) .addComponent(jLabel2) .addComponent(jTextPattern, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelPreferencesLayout.createSequentialGroup() .addComponent(jButtonCancel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonApply))) .addContainerGap()) ); jPanelPreferencesLayout.setVerticalGroup( jPanelPreferencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelPreferencesLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(0, 0, 0) .addComponent(jTextDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addGap(0, 0, 0) .addComponent(jTextPattern, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelPreferencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonApply) .addComponent(jButtonCancel)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelPreferences, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelPreferences, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }// //GEN-END:initComponents private void jButtonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed doClose(APPLY); }//GEN-LAST:event_jButtonApplyActionPerformed private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed doClose(CANCEL); }//GEN-LAST:event_jButtonCancelActionPerformed /** * Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog doClose(CANCEL); }//GEN-LAST:event_closeDialog private void doClose(int retStatus) { returnStatus = retStatus; setVisible(false); dispose(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonApply; private javax.swing.JButton jButtonCancel; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPanelPreferences; private javax.swing.JTextField jTextDescription; private javax.swing.JTextField jTextPattern; // End of variables declaration//GEN-END:variables private int returnStatus = CANCEL; } selektor-3.13.73/src/client/NodeItem.java0000644000175000017500000002106513302030722017450 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.text.DecimalFormat; /** * * @author Alistair Neil */ public class NodeItem extends Object implements Cloneable { public static final int TYPE_EXIT = 1; public static final int TYPE_GUARD = 2; public static final int TESTSTATUS_UNKNOWN = 0; public static final int TESTSTATUS_PASSED = 1; public static final int TESTSTATUS_FAILED = 2; private int type; private boolean exitFavourite; private boolean guardEnabled; private boolean httpSupported; private String stable; private String countrycode; private String countryname; private String nickname; private String finger; private String ipaddress; private String testingmess; private String circuithops; private int teststatus; private float bandwidth; private int streams; private long latency; private long testlatency; public NodeItem() { this.type = 0; this.exitFavourite = false; this.guardEnabled = false; this.httpSupported = false; this.countrycode = null; this.latency = 9999; this.testlatency = this.latency; this.bandwidth = 0; this.streams = 0; this.countrycode = ""; this.countryname = ""; this.stable = ""; this.testingmess = ""; this.ipaddress = ""; this.finger = ""; this.nickname = ""; this.teststatus = TESTSTATUS_UNKNOWN; } /** * Set Node type * * @param mask */ public final void setType(int mask) { this.type |= mask; } /** * Clear node type */ public final void clearType() { this.type = 0; } public boolean isNonUnique() { return (nickname.contains("Default") || nickname.contains("default") || nickname.contains("Unnamed")); } /** * Is exit node * * @return true if an exit node */ public final boolean isExit() { return (type & TYPE_EXIT) != 0; } public boolean isHttpSupported() { return httpSupported; } public void setHttpSupported(boolean supported) { httpSupported = supported; } /** * Is Guard node * * @return true if guard node */ public final boolean isGuard() { return (type & TYPE_GUARD) != 0; } /** * Set circuit hops * * @param hops */ public final void setCircuitHops(String hops) { circuithops = hops; } /** * Get circuit hops * * @return Circuit hops as String */ public final String getCircuitHops() { return circuithops; } /** * Set Nodeitem testing status message * * @param text */ public final void setTestingMessage(String text) { this.testingmess = text; } /** * Set testing status flag * * @param status */ public final void setTestStatus(int status) { teststatus = status; } /** * Get testing status flag * * @return test status */ public final int getTestStatus() { return teststatus; } /** * Get Node item status * * @return Nodeitem testing status message as string */ public final String getTestingMessage() { return testingmess; } /** * Set Nodeitem latency value in ms * * @param latency */ public final void setLatency(long latency) { this.latency = latency; } /** * Get Nodeitem latency in ms * * @return Latency value in ms */ public final long getLatency() { return latency; } /** * Set Nodeitem test latency value in ms * * @param latency */ public final void setTestLatency(long latency) { this.testlatency = latency; } /** * Get Nodeitem test latency in ms * * @return Latency value in ms */ public final long getTestLatency() { return testlatency; } /** * Set exit enabled status of Nodeitem * * @param enabled */ public final void setFavouriteEnabled(boolean enabled) { this.exitFavourite = enabled; } /** * Get exit enabled status of Nodeitem * * @return true if enabled */ public final boolean isFavourite() { return exitFavourite; } /** * Set guard enabled status of Nodeitem * * @param enabled */ public final void setGuardEnabled(boolean enabled) { this.guardEnabled = enabled; } /** * Get guard enabled status of Nodeitem * * @return true if enabled */ public final boolean isGuardEnabled() { return guardEnabled; } /** * Set Nodeitem stability yes/no/unknown * * @param stability */ public final void setStable(String stability) { this.stable = stability; } /** * Get Nodeitem stability * * @return Stability */ public final String getStability() { return stable; } /** * Set Nodeitem with its two letter country code abbreviation * * @param abrv */ public final void setCountryCode(String abrv) { countrycode = abrv; } /** * Get nodeitem two letter country code abbreviation * * @return Country code as string */ public final String getCountryCode() { return countrycode; } /** * Set Nodeitem with its full country name * * @param name */ public final void setCountryName(String name) { countryname = name; } /** * Get nodeitem full country name * * @return Country name as string */ public final String getCountryName() { return countryname; } /** * Set nodeitem name * * @param name */ public final void setNickName(String name) { nickname = name; } /** * Get nodeitem unique name * * @return Node name as string */ public final String getNickName() { return nickname; } /** * Set node item bandwidth * * @param bw */ public final void setBandwidth(float bw) { bandwidth = bw; } /** * Get nodeitem bandwith * * @return Bandwidth as long, in kb/s */ public final float getBandwidth() { Float result; try { DecimalFormat df = new DecimalFormat("#0.##"); result = Float.parseFloat(df.format(bandwidth).replace(",", ".")); } catch (Exception ex) { result = (float) 0; } return result; } /** * Set nodeitem number of streams * * @param streams */ public final void setStreams(int streams) { this.streams = streams; } /** * Get nodeitems active streams * * @return Number of active streams as int */ public final int getStreams() { return streams; } /** * Set nodeitem fingerprint * * @param fp */ public final void setFingerprint(String fp) { finger = fp; } /** * Get nodeitems fingerprint * * @return Tor node fingerprint as string */ public final String getFingerprint() { return finger; } /** * Set nodeitem ip address * * @param ip */ public final void setIPAddress(String ip) { ipaddress = ip; } /** * Get nodeitem ip address * * @return IP address as a string */ public final String getIPAddress() { return ipaddress; } @Override public NodeItem clone() { try { return (NodeItem) super.clone(); } catch (CloneNotSupportedException ex) { return null; } } } selektor-3.13.73/src/client/QuickAddDialog.form0000644000175000017500000001672613302030722020603 0ustar bannorbannor
selektor-3.13.73/src/client/PrefsDialog.form0000644000175000017500000012454413302030722020173 0ustar bannorbannor
selektor-3.13.73/src/client/SelekTOR.java0000644000175000017500000045017013302030722017377 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.awt.Color; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.MouseEvent; import java.io.File; import java.io.IOException; import java.net.Socket; import java.util.ArrayList; import java.util.Arrays; import java.util.Random; import java.util.logging.FileHandler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; import javax.swing.DefaultComboBoxModel; import javax.swing.JFileChooser; import javax.swing.JPopupMenu; import javax.swing.JProgressBar; import javax.swing.SwingUtilities; import javax.swing.Timer; import javax.swing.event.TableModelEvent; import javax.swing.table.TableRowSorter; import lib.AboutDialog; import lib.DesktopNotify; import lib.ExtensionFileFilter; import lib.GTKFixes; import lib.InfoDialog; import lib.TextResourceDialog; import lib.Localisation; import lib.NetFunctions; import lib.OSFunction; import lib.SimpleFile; import lib.SimpleProps; import lib.SwingTrayIcon; import lib.TrayPopupMenu; import lib.Utilities; /** * * @author Alistair Neil */ public class SelekTOR extends javax.swing.JFrame { private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); private static final String EMPTYSTR = ""; private static final String PREFSVER = "1.01"; private static final String APPNAME = "SelekTOR"; private static final String APPVER = "3.13.73"; private static final String APPSERIES = "3xx"; private static final String WEBDOMAIN = "www.dazzleships.net"; private static final String FILEDOMAIN = "http://dazzle.000webhostapp.com"; private static final String HOMEPAGE = "http://" + WEBDOMAIN; private static final String HOMEPAGE_SSL = "https://" + WEBDOMAIN; private static final String CONTACT = HOMEPAGE_SSL + "/?page_id=247"; private static final String APPUPDATE = FILEDOMAIN + "/anapps/linux/selektor/"; private static final String TESTURL = "http://google.com"; private static final String TORPROJECT = "https://torproject.org/"; private static final String TORCHECK = "https://check.torproject.org/"; private static final String ATLAS = "https://atlas.torproject.org/"; private static final String PATREON = "https://www.patreon.com/SelekTOR"; private static final String DOCSPATH = "/usr/share/doc/selektor/"; private static final String EXITFAVOURITES = "favourites.txt"; private static final String GUARDWHITELIST = "guardwhitelist.txt"; private static final String GEOIPZIP = "geoip.zip"; private static final String GEOIPSHA = "geoip.sha"; private static final String ICONFILE = "selektor.png"; private static final int TESTING_DISABLED = 0; private static final int TESTING_ACTIVE = -1; private static final long MAXTHRESHOLD = 5000; private String clientLocation; private String settingsPath; private String cachePath; private String defaultGeoipPath; private String geoipPath; private String geoip6Path; private String iconPath = EMPTYSTR; private TorController tcMain; private NodeList nodeList; private PacFactory pacFactory; private String strExitISOCode = "GB"; private String strRequestedExit = EMPTYSTR; private NodeItem niActiveGuard; private NodeItem niActiveMiddle; private NodeItem niActiveExit; private int intRowSelected = -1; private ExitNodeTableModel entm; private SimpleProps sp; private final ArrayList alTestThreads = new ArrayList<>(); private int intActiveNodeTests = 0; private int intBestNodeIndex = 0; private String[] strArrBestNodes; private long lngThreshold = MAXTHRESHOLD; private int intThresholdExceeded = 0; private NetFunctions nf; private boolean boolNetEnabled = true; private String strSecret; private String strHash; private final ArrayList alTestQueue = new ArrayList<>(); private Timer tmr; private int intBeginTesting; private int intLatencyCheck; private int intAutoSelectCheck; private long lngHibernateTimeStamp; private volatile boolean boolFirstRun; private ArrayList alArgs; private TorMonFrame tmf; private long startupDelay; private DesktopNotify dn; private SwingTrayIcon sti; private String desktopname = EMPTYSTR; private String compositor = EMPTYSTR; private boolean updateCheckDisabled; /** * Initialises SelekTOR UI Frame * * @param args */ public SelekTOR(String[] args) { boolFirstRun = true; // Initialises UI theme to system default Utilities.loadUIStyle("System"); // Check for multiple instances of this app if (OSFunction.isMultipleInstance(APPNAME)) { openInstanceDialog(); cleanupExit(); return; } // Initialise some essentialvariables // I know this looks a bit odd but trust me this allows us to install and run from anywhere String runPath = OSFunction.getUsersCurrentFolder() + OSFunction.getFileSeparator(); if (runPath.startsWith("/usr/share")) { runPath = "/usr/share/"; } iconPath = runPath + "icons" + OSFunction.getFileSeparator(); settingsPath = OSFunction.getAppSettingsPath(APPNAME, APPSERIES); cachePath = settingsPath + "cache" + OSFunction.getFileSeparator(); // Initialise property settings initProperties(); // Initialise pac factory initPacFactory(); // Get the desktop desktopname = OSFunction.getActiveDesktop(); compositor = OSFunction.getCompositor(); // Process any supplied cli arguments if (processCLIArgs(args)) { cleanupExit(); return; } // Ensure any old proxy settings are cleaned up pacCleanup(); // Verify Tor client is installed if (OSFunction.isWindows()) { clientLocation = OSFunction.findFile("tor.exe", "Tor/"); } else { clientLocation = OSFunction.findFile("tor", "/usr/sbin/", "/usr/bin/"); } if (clientLocation == null) { Logger.getGlobal().log(Level.SEVERE, "Tor client not found."); openTorClientDialog(); cleanupExit(); return; } // Verify if geoip data is installed defaultGeoipPath = "/usr/share/tor/"; geoipPath = OSFunction.findFile("geoip", settingsPath, defaultGeoipPath); geoip6Path = OSFunction.findFile("geoip6", settingsPath, defaultGeoipPath); if (geoipPath == null || geoip6Path == null) { Logger.getGlobal().log(Level.SEVERE, "Geoip not found."); openTorClientDialog(); cleanupExit(); return; } // Verify if gsettings is installed if (OSFunction.getGsettingsPath() == null) { Logger.getGlobal().log(Level.SEVERE, "Gsettings not found."); openGsettingsDialog(); cleanupExit(); return; } // Netbeans components init initComponents(); Utilities.preloadFileChooser(); updateProgramStatus(LOCAL.getString("progstatus_initial")); // Process any startup delay try { Thread.sleep(startupDelay); } catch (InterruptedException ex) { } startupDelay = -1; // Backup proxy preferences pacFactory.backupProxyPrefs(); pacFactory.setProxyAutoConfigURL(null); // Initialise node table initNodeTables(); // Initialise tor main and test threads initTorMain(); // Do a Tor version check float torversion = tcMain.getVersion(); Logger.getGlobal().logp(Level.INFO, this.getClass().getName(), "", "Tor version = " + torversion); if (torversion < 0.2420) { openToOldDialog(); cleanupExit(); return; } // Create testing threads initTestThreads(sp.getInt("PREF_TOR_TESTHREADS")); // Final Initialisation of other components which need to be done last initFinalComponents(); // System tray initSystemTray(); // Main program timer initTimer(); // Do tor main start applyMainTorSettings(); tcMain.setStartupDelay(1000); tcMain.start(); initGUIVisibility(); Logger.getGlobal().log(Level.INFO, "Environment = {0}", System.getenv().toString()); Logger.getGlobal().log(Level.INFO, "Active desktop = {0}", desktopname); Logger.getGlobal().log(Level.INFO, "Compositor = {0}", compositor); if (Logger.getGlobal().isLoggable(Level.FINE)) { for (String s : OSFunction.getCachedProcesses()) { Logger.getGlobal().log(Level.FINE, "Process = {0}", s); } } } /** * Initialise properties */ private void initProperties() { // Initialise application title setTitle(APPNAME); // Application icon setIconImage(new javax.swing.ImageIcon(iconPath + ICONFILE).getImage()); // Initial logging settings Logger.getGlobal().setLevel(Level.SEVERE); addLoggingFile(settingsPath + "status.log", false); // Init protperties sp = new SimpleProps(settingsPath + APPNAME + ".xml", APPNAME + " Settings"); // Set up our defaults sp.setDefaultModeEnabled(true); sp.setString("PREF_ISOCOUNTRY", "GB"); sp.setInt("PREF_LISTENPORT", 9054); sp.setInt("PREF_TOR_TESTHREADS", 2); sp.setInt("PREF_TORLOGLEV", 2); sp.setInt("PREF_PROXY_MODE", 2); sp.setLong("PREF_GEODATE", 0); sp.setBool("PREF_GEOCHECK", true); sp.setBool("PREF_AUTOSTART", false); sp.setBool("PREF_NOSYSTRAY", false); sp.setBool("PREF_HIDETOTRAY", false); sp.setBool("PREF_MINONCLOSE", false); sp.setBool("PREF_HIDE_MIN", false); sp.setBool("PREF_UPDATECHECK", true); sp.setBool("PREF_SAFESOCKS", true); sp.setBool("PREF_TESTSOCKS", false); sp.setBool("PREF_AVOIDDISK", true); sp.setBool("PREF_SAFELOG", true); sp.setBool("PREF_CACHEDELETE", false); sp.setBool("PREF_DISABLE_NOTIFY", false); sp.setString("PREF_HTTP_PROXY", EMPTYSTR); sp.setString("PREF_DONOT_PROXY", "localhost,127.0.0.1"); sp.setString("PREF_TORBRIDGE", EMPTYSTR); sp.setString("PREF_TORARGS", EMPTYSTR); sp.setDefaultModeEnabled(false); sp.resetToDefaults(); sp.load(); // This will reset the preferences file to its default if we dont get a preferences version match if (!sp.getString("prefsver").contentEquals(PREFSVER)) { sp.resetToDefaults(); sp.setString("prefsver", PREFSVER); sp.delete(); sp.save(); } // Dont allow listen ports below 9054, prevents any conflicts with the Tor default service. // Which can be used along side SelekTOR if (sp.getInt("PREF_LISTENPORT") < 9054) { sp.setInt("PREF_LISTENPORT", 9054); sp.save(); } strExitISOCode = sp.getString("PREF_ISOCOUNTRY"); } /** * Initialise logging facilities * * @param logpath * @param append */ private void addLoggingFile(String logpath, boolean append) { try { if (logpath != null) { FileHandler fh = new FileHandler(logpath, 10000000, 1, append); fh.setFormatter(new SimpleFormatter()); Logger.getGlobal().addHandler(fh); } } catch (SecurityException | IOException ex) { } } /** * Processes any supplied arguments post UI component build * * @param args Startup arguments */ private boolean processCLIArgs(String... args) { alArgs = new ArrayList<>(); alArgs.addAll(Arrays.asList(args)); for (String s : args) { if (s.contentEquals("--start-delay")) { alArgs.remove(s); if (alArgs.size() > 0) { String strDelay = alArgs.get(0); try { startupDelay = Long.valueOf(strDelay) * 1000; alArgs.remove(0); } catch (NumberFormatException ex) { } } } if (s.contentEquals("--debug-all")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); alArgs.remove(0); } Logger.getGlobal().setLevel(Level.ALL); } if (s.contentEquals("--debug-warn")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); alArgs.remove(0); } Logger.getGlobal().setLevel(Level.WARNING); } if (s.contentEquals("--debug-info")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); } Logger.getGlobal().setLevel(Level.INFO); } if (s.contentEquals("--debug-fine")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); alArgs.remove(0); } Logger.getGlobal().setLevel(Level.FINE); } if (s.contentEquals("--debug-finer")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); alArgs.remove(0); } Logger.getGlobal().setLevel(Level.FINER); } if (s.contentEquals("--debug-finest")) { alArgs.remove(s); if (!alArgs.isEmpty()) { addLoggingFile(alArgs.get(0), false); alArgs.remove(0); } Logger.getGlobal().setLevel(Level.FINEST); } if (s.contentEquals("--reset-defaults")) { alArgs.remove(s); sp.resetToDefaults(); sp.save(); sp.load(); return true; } if (s.contentEquals("--clear-cache")) { alArgs.remove(s); SimpleFile.deleteFolder(cachePath); } if (s.contentEquals("--help")) { alArgs.remove(s); outputHelp(); // Disable proxy restore on exit pacFactory = null; return true; } if (s.contentEquals("--cleanup")) { alArgs.remove(s); if (!sp.getBool("PREF_AUTOSTART")) { return true; } } if (s.contentEquals("--default-proxy-quiet")) { alArgs.remove(s); pacFactory.setProxyAutoConfigURL(null); pacFactory.deleteProxyPrefs(); // Disable proxy restore on exit pacFactory = null; return true; } if (s.contentEquals("--restore-proxy-quiet")) { alArgs.remove(s); return true; } if (s.contentEquals("--update-disable")) { alArgs.remove(s); updateCheckDisabled = true; } if (s.contentEquals("--restore-proxy")) { alArgs.remove(s); InfoDialog id = createInfoDialog(); id.createWarn(LOCAL.getString("dlg_restoreproxy_title"), LOCAL.getString("dlg_restoreproxy_body")); id.pack(); id.setVisible(true); if (id.getReturnStatus() == InfoDialog.OK) { return true; } // Disable proxy restore on exit pacFactory = null; return true; } if (s.contentEquals("--default-proxy")) { alArgs.remove(s); InfoDialog id = createInfoDialog(); id.createWarn(LOCAL.getString("dlg_resetproxy_title"), LOCAL.getString("dlg_resetproxy_body")); id.pack(); id.setVisible(true); if (id.getReturnStatus() == InfoDialog.OK) { pacFactory.setProxyAutoConfigURL(null); pacFactory.deleteProxyPrefs(); } // Disable proxy restore on exit pacFactory = null; return true; } if (s.contentEquals("--ignore-desktop")) { alArgs.remove(s); desktopname = EMPTYSTR; } } if (alArgs.size() > 0) { outputHelp(); // Disable proxy restore on exit pacFactory = null; return true; } return false; } /** * Output on standard out command line help info */ private void outputHelp() { System.out.println(APPNAME + " " + APPVER + " valid command line arguments."); System.out.println(); System.out.println("--help : This help information"); System.out.println("--debug-all [filename] : All debug output."); System.out.println("--debug-warn [filename] : Warnings level debug output."); System.out.println("--debug-info [filename] : Information level debug output."); System.out.println("--debug-fine [filename] : Fine level debug output."); System.out.println("--debug-finer [filename] : Finer level debug output."); System.out.println("--debug-finest [filename] : Finest level debug output."); System.out.println("--reset-defaults : Return user settings to their safe defaults."); System.out.println("--clear-cache : Clears the Tor cache on startup."); System.out.println("--ignore-desktop : Ignore desktop detection information."); System.out.println("--start-delay : Delay startup in seconds, eg. --start-delay 5"); System.out.println("--cleanup : Cleans up after a bad shutdown which may have left system proxy in an unknown state."); System.out.println("--default-proxy-quiet : Set system proxy back to its defaults quietly, without GUI dialog."); System.out.println("--restore-proxy-quiet : Attempt to restore proxy to its last known settings using a previously saved backup, " + "without GUI dialog."); System.out.println("--default-proxy : Set system proxy back to its defaults accepts verification input via a GUI dialog.."); System.out.println("--restore-proxy : Attempt to restore proxy to its last known settings using a previously saved backup, " + "with input verification via a GUI dialog."); System.out.println("--update-disable : Disables the version update checking at startup and removes " + "the option from preferences."); System.out.println(); } /** * Sets the enabled status of various GUI objects * * @param enabled */ private void setComponentsEnabled(boolean enabled) { jButtonExitNodeDetails.setEnabled(enabled); jButtonMiddleNodeDetails.setEnabled(enabled); jButtonGuardNodeDetails.setEnabled(enabled); jButtonSetGuards.setEnabled(enabled); jMenuItemPatternEdit.setEnabled(enabled); jMenuItemAddPattern.setEnabled(enabled); jTableExitNodes.setEnabled(enabled); jComboCountry.setEnabled(enabled); jMenuItemTorCheck.setEnabled(enabled); jCheckProxyDisable.setEnabled(enabled); jCheckProxyByPattern.setEnabled(enabled); jCheckProxyAll.setEnabled(enabled); jCheckTrayProxyDisable.setEnabled(enabled); jCheckTrayProxyByPattern.setEnabled(enabled); jCheckTrayProxyAll.setEnabled(enabled); jButtonClearFavs.setEnabled(enabled); if (!enabled) { jMenuItemGeoip.setEnabled(enabled); } } /** * Final initialisation of objects that need to be done near the end of * startup * */ private void initFinalComponents() { // Apply fixes for linux gtk issues in java GTKFixes.fixMenubarHeight(jMenuBar, jMenuItemGUI); GTKFixes.fixMenuSelectionColor(jMenuMenu, jMenuProxy, jMenuHelp); GTKFixes.fixJMenuPopupBorder(jMenuMenu, jMenuProxy, jMenuHelp); GTKFixes.fixMenuItemFgColor(jCheckProxyDisable, jCheckProxyByPattern, jCheckProxyAll); GTKFixes.fixMenuItemFgColor(jCheckTrayProxyDisable, jCheckTrayProxyByPattern, jCheckTrayProxyAll); // Disable certain components until first node is activated setComponentsEnabled(false); // Add proxy buttons to proxy button groups buttonGroupProxy.add(jCheckProxyDisable); buttonGroupProxy.add(jCheckProxyByPattern); buttonGroupProxy.add(jCheckProxyAll); buttonGroupProxyTray.add(jCheckTrayProxyDisable); buttonGroupProxyTray.add(jCheckTrayProxyByPattern); buttonGroupProxyTray.add(jCheckTrayProxyAll); // Update initial proxy selection switch (sp.getInt("PREF_PROXY_MODE")) { case 0: jCheckProxyDisable.setSelected(true); break; case 1: jCheckProxyByPattern.setSelected(true); break; case 2: jCheckProxyAll.setSelected(true); break; } // Make debug log menu item visible if required jMenuItemDebugLog.setVisible(Logger.getGlobal().getLevel() != Level.SEVERE); } /** * Initialise our internal 1 second timer tick * */ private void initTimer() { tmr = new Timer(1000, new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { // Do a hibernate check, check to see if computer has been asleep for more than 60 secs if ((System.currentTimeMillis() - lngHibernateTimeStamp) > 60000) { Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "initTimer()", "Hibernate Recovery"); lngHibernateTimeStamp = System.currentTimeMillis(); setComponentsEnabled(false); stopAllTorThreads(); boolFirstRun = true; tcMain.start(); } lngHibernateTimeStamp = System.currentTimeMillis(); if (!boolNetEnabled) { return; } // Do Latency checking if (intLatencyCheck > 0) { intLatencyCheck--; if (intLatencyCheck == 0) { intLatencyCheck = 5; getFreshNodeInfo(); // Tor latency check, only when node active if (niActiveExit != null) { // Do latency check tcMain.doLatencyCheck(4950); } } } // Activate a node selection check if (intAutoSelectCheck > 0) { intAutoSelectCheck--; if (intAutoSelectCheck == 0) { autoSelectNode(); } } // Activate a testing cycle if (intBeginTesting > 0) { intBeginTesting--; if (intBeginTesting == 0) { runTestingCycle(); } } } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "initTimer() actionPerformed", EMPTYSTR, ex); } } }); lngHibernateTimeStamp = System.currentTimeMillis(); tmr.setInitialDelay(0); tmr.setRepeats(true); tmr.start(); } /** * Initialise our pacfactory object * */ private void initPacFactory() { pacFactory = new PacFactory(); pacFactory.setTempFolder(cachePath); pacFactory.setBackupFolder(settingsPath + "backup"); pacFactory.setPatternsFolder(settingsPath + "patterns"); pacFactory.setPACFolder(settingsPath); pacFactory.setDefaultProxy(sp.getString("PREF_HTTP_PROXY")); pacFactory.setDoNotProxy(sp.getString("PREF_DONOT_PROXY")); } /** * Open the preferences dialog */ private void openPreferencesDialog() { // open dialog PrefsDialog pd; String disableditems = EMPTYSTR; if (!sti.isSupported()) { sp.setBool("PREF_NOSYSTRAY", true); disableditems += "jCheckDisableTray"; } if (updateCheckDisabled) { disableditems += ",jCheckAppUpdate"; } pd = new PrefsDialog(this, sp, disableditems); pd.setTitle(LOCAL.getString("wintitle_prefs").replace("$appname", APPNAME)); pd.pack(); pd.setLocationRelativeTo(this); pd.setVisible(true); // Check for changes String changed = sp.getChangedProperties(); if (pd.getReturnStatus() == PrefsDialog.APPLY) { sp.save(); } if (changed.contains("PREF_HTTP_PROXY")) { pacFactory.setDefaultProxy(sp.getString("PREF_HTTP_PROXY")); rebuildPatternPac(); } if (changed.contains("PREF_NOSYSTRAY")) { if (sp.getBool("PREF_NOSYSTRAY")) { sti.unload(); } else { sti.load(); } } if (changed.contains("PREF_DISABLE_NOTIFY")) { dn.setEnabled(!sp.getBool("PREF_DISABLE_NOTIFY")); if (dn.isEnabled() && !dn.isSupported()) { openLibnotifyDialog(); } } if (!boolNetEnabled) { return; } // Check to see if bridges entry was changed if (changed.contains("TORBRIDGE")) { // Update status message updateProgramStatus(LOCAL.getString("progstatus_applychanges")); // Validate bridge entry if (!tcMain.validateBridges(sp.getString("PREF_TORBRIDGE"))) { // Validation failed sp.setString("PREF_TORBRIDGE", EMPTYSTR); sp.save(); // Apply default bridge settings by doing hard Tor restart stopAllTorThreads(); applyMainTorSettings(); tcMain.start(); // Indicate validation failure to user openBridgeErrorDialog(); } else { // Apply default bridge settings by doing hard Tor restart stopAllTorThreads(); applyMainTorSettings(); tcMain.start(); } return; } // Check for any parameters that have changed that require full restart if (changed.contains("LISTENPORT") || changed.contains("SAFE") || changed.contains("AVOID") || changed.contains("LOGLEV") || changed.contains("TORARGS") || changed.contains("TESTSOCKS")) { // Update status message updateProgramStatus(LOCAL.getString("progstatus_applychanges")); // Apply default bridge settings by doing hard Tor restart stopAllTorThreads(); applyMainTorSettings(); tcMain.start(); } } private void applyMainTorSettings() { // Check to see if bridges are active String bridge = sp.getString("PREF_TORBRIDGE"); if (!tcMain.validateBridges(bridge)) { bridge = EMPTYSTR; sp.setString("PREF_TORBRIDGE", bridge); sp.save(); } // Update entry node label on UI if (bridge.isEmpty()) { jLabelGuard.setText(LOCAL.getString("label_guardnode")); } else { jLabelGuard.setText(LOCAL.getString("label_bridgenode")); } tcMain.setBridges(bridge); tcMain.setTestingURL(TESTURL); tcMain.setListenPort(sp.getInt("PREF_LISTENPORT")); tcMain.setEntryNodes(nodeList.getGuardFavouritesAsCSV()); tcMain.setBoolTorOption("SafeSocks", sp.getBool("PREF_SAFESOCKS")); tcMain.setBoolTorOption("TestSocks", sp.getBool("PREF_TESTSOCKS")); tcMain.setBoolTorOption("AvoidDiskWrites", sp.getBool("PREF_AVOIDDISK")); tcMain.setBoolTorOption("SafeLogging", sp.getBool("PREF_SAFELOG")); tcMain.setExternalArgs(sp.getString("PREF_TORARGS")); tcMain.setLogLevel(sp.getInt("PREF_TORLOGLEV")); tcMain.setGeoIP4(geoipPath); tcMain.setGeoIP6(geoip6Path); tmf.setLaunchString("# Via commandline\n" + tcMain.getCLIOptionsAsString() + "\n\n" + "# Via torrc configuration file\n" + tcMain.getTorrcOptionsAsString() ); } /** * Abort actions on all tor client threads */ private void abortAllTorThreads() { if (niActiveExit != null) { niActiveExit.setCircuitHops(null); } if (tcMain != null) { tcMain.abortActions(); } abortTesting(); } /** * Bring all tor threads to a stop */ private void stopAllTorThreads() { abortTesting(); stopTestClients(); if (nodeList != null) { nodeList.terminate(); } if (tcMain != null) { tcMain.stop(); tcMain.clearStdout(); tcMain.setStartupDelay(2000); } } /** * Do nodelist refresh */ private void regenNodelist() { Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { if (boolFirstRun) { updateProgramStatus(LOCAL.getString("progstatus_generate")); nodeList.refreshNodelist(tcMain); // App update check checkForAppUpdates(); } switch (nodeList.getCurrentStatus()) { case NodeList.NODELIST_BUILT: SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { if (boolFirstRun) { dn.setNotificationBody(LOCAL.getString("traymenu_proxymode" + (sp.getInt("PREF_PROXY_MODE") + 1))); applyProxyChanges(sp.getInt("PREF_PROXY_MODE")); } // Update countries combo box String[] countries = nodeList.getValidatedCountries(); DefaultComboBoxModel dcbm = new DefaultComboBoxModel<>(countries); jComboCountry.setModel(dcbm); jComboCountry.setSelectedIndex(-1); String strSelection = strExitISOCode + "," + LOCAL.getDisplayCountry(strExitISOCode); // Check selection exists if (dcbm.getIndexOf(strSelection) < 0) { // Does not exist so default to the first country entry jComboCountry.setSelectedIndex(0); } else { jComboCountry.setSelectedItem(strSelection); } // Check to make shure we have enough guard nodes int activeguards = nodeList.saveGuardWhitelist(); if (activeguards < 3 && activeguards > 0) { openNotEnoughGuardsDialog(); } } }); break; case NodeList.NODELIST_FAILED: SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { Logger.getGlobal().logp(Level.WARNING, SelekTOR.class .getName(), "fetchRemoteData()", "Nodelist Failed"); openFatalErrorDialog(LOCAL.getString("dlg_nodelistfail_body")); cleanupExit(); } }); break; } } }); t.start(); } /** * Check remoteversion to determine if their is a newer application * available * */ private void checkForAppUpdates() { // App update if (!sp.getBool("PREF_UPDATECHECK") || updateCheckDisabled) { Logger.getGlobal().log(Level.WARNING, "Update check is disabled."); return; } TorCircuit tc = tcMain.getLatestCircuit(); if (tc != null) { String finger = tc.getExit(TorCircuit.FINGER); NodeItem ni = nodeList.getNode(finger); if (ni != null) { Logger.getGlobal().log(Level.INFO, "Active Exit is {0}({1}) in {2}", new Object[]{ni.getNickName(), finger, ni.getCountryName()}); } } String url = APPUPDATE + "version.html"; Socket s = tcMain.createTorSocketToURL(url, false); nf.setSocketTimeout(5000); String version = nf.getURLContentAsString(url, s); if (version == null) { Logger.getGlobal().log(Level.WARNING, "Failed to retrieve version info."); return; } Logger.getGlobal().log(Level.INFO, "Sucessfully retrieved version info."); final String remoteversion = version.trim(); SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { if (Utilities.isNewerVersion(APPVER, remoteversion)) { InfoDialog id = createInfoDialog(); id.createInfo(LOCAL.getString("dlg_update_title"), LOCAL.getString("dlg_update_body").replace("$version", remoteversion)); id.setAutoClose(30000); id.pack(); id.setVisible(true); } } }); } /** * Check to see if we need to update geoip * */ private void updateGeoipCheck() { jMenuItemGeoip.setEnabled(true); if (!sp.getBool("PREF_GEOCHECK")) { return; } long lngDate = sp.getLong("PREF_GEODATE"); if (System.currentTimeMillis() > lngDate) { updateGeoip(); } } /** * Pops up the GEOIP update dialog */ private void updateGeoip() { InfoDialog id = new InfoDialog(this) { private final InfoDialog id = this; @Override public void progressTask(int retstatus, final JProgressBar jpb) { Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { String url = APPUPDATE + GEOIPSHA; String destfile = OSFunction.getTempFolder(EMPTYSTR) + APPNAME + "_" + GEOIPZIP; try { setAckEnabled(false); jpb.setString(LOCAL.getString("dload_status_contact")); Socket s; // Grab checksum file from dazzleships if (isCheckBoxSelected()) { if (niActiveExit == null) { // Indicate download failure Logger.getGlobal().log(Level.INFO, "Invalid exit node"); throw new IOException(); } if (niActiveExit.getLatency() > 4000) { // Indicate download failure Logger.getGlobal().log(Level.INFO, "Poor exit node"); throw new IOException(); } s = tcMain.createTorSocketToURL(url, false); } else { s = new Socket(FILEDOMAIN, 80); } nf.setSocketTimeout(5000); nf.setProgressBar(jpb); jpb.setStringPainted(true); if (!id.isVisible()) { throw new IOException(); } Logger.getGlobal().log(Level.INFO, "Starting geoip.sha download"); String chksum = nf.getURLContentAsString(url, s); if (chksum == null || chksum.isEmpty()) { // Indicate download failure Logger.getGlobal().log(Level.INFO, "geoip.sha download failed"); throw new IOException(); } // Grab geodata zip file from dazzleships if (!id.isVisible()) { throw new IOException(); } Logger.getGlobal().log(Level.INFO, "Starting geoip.zip download"); url = APPUPDATE + GEOIPZIP; if (isCheckBoxSelected()) { s = tcMain.createTorSocketToURL(url, false); } else { s = new Socket(FILEDOMAIN, 80); } final SimpleFile sf = new SimpleFile(destfile); // Delete old/previous file if (sf.exists()) { sf.delete(); } // Ensure zip file downloaded nf.saveURLContentToFile(destfile, url, s, true); if (!sf.exists()) { // Indicate download failure Logger.getGlobal().log(Level.INFO, "geoip.zip download failed"); throw new IOException(); } // Do checksum verification String fchk = Utilities.getSha1Sum(destfile); if (!fchk.contentEquals(chksum.trim())) { // Delete corrupt zip file sf.delete(); // Indicate download failure Logger.getGlobal().log(Level.INFO, "geoip.zip checksum does not match"); throw new IOException(); } if (!id.isVisible()) { throw new IOException(); } if (sf.extractZipTo(settingsPath)) { SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { // Set new check time updateGeoipCheckDate(); // Update geoip paths geoipPath = OSFunction.findFile("geoip", settingsPath, defaultGeoipPath); geoip6Path = OSFunction.findFile("geoip6", settingsPath, defaultGeoipPath); // Restart Tor client, to take advantage of new geoip jComboCountry.setEnabled(false); setComponentsEnabled(false); boolFirstRun = true; stopAllTorThreads(); applyMainTorSettings(); tcMain.start(); setVisible(false); dispose(); } }); } } catch (final Exception ex) { // Exits here in case of download fail SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { Logger.getGlobal().log(Level.WARNING, ex.getMessage()); jpb.setString(LOCAL.getString("dload_status_failed")); setAckEnabled(true); } }); } } }); if (retstatus == InfoDialog.OK) { t.start(); } else { updateGeoipCheckDate(); setVisible(false); dispose(); } } }; id.setTitle(APPNAME); id.setCancelButtonText(LOCAL.getString("button_cancel")); id.setContinueButtonText(LOCAL.getString("button_continue")); id.setCloseButtonText(LOCAL.getString("button_close")); id.setCheckBoxText(LOCAL.getString("chkbox_viator")); id.setCheckBoxVisible(true); id.setCheckBoxEnabled(true); id.pack(); id.createProgress(LOCAL.getString("dlg_geo_title"), LOCAL.getString("dlg_geo_body")); id.pack(); id.setVisible(true); } private void updateGeoipCheckDate() { // Set new check time sp.setLong("PREF_GEODATE", System.currentTimeMillis() + ((long) 60000 * 60 * 24 * 90)); sp.save(); } /** * System tray initialisation */ private void initSystemTray() { // Initialise tray utility sti = new SwingTrayIcon(this.getGraphicsConfiguration(), "resources/trayicon.png"); if (desktopname.contentEquals("gnome3") || desktopname.contentEquals("enlightenment") || desktopname.contentEquals("kde5")) { sti.disable(); } // Initialise desktop notification dn = new DesktopNotify(sti, iconPath + ICONFILE); dn.setNotificationTitle(APPNAME); dn.setEnabled(!sp.getBool("PREF_DISABLE_NOTIFY")); if (dn.isEnabled() && !dn.isSupported()) { openLibnotifyDialog(); } // If trayIcon valid add mouse listener TrayPopupMenu tpm = new TrayPopupMenu(); GTKFixes.fixTrayMenuPopupBorder(tpm); tpm.add(jCheckTrayProxyDisable); tpm.add(jCheckTrayProxyByPattern); tpm.add(jCheckTrayProxyAll); tpm.add(new JPopupMenu.Separator()); tpm.add(jMenuItemGUI); tpm.add(jMenuItemQuitx); sti.addMouseListener(new javax.swing.event.MouseInputListener() { @Override public void mouseClicked(MouseEvent e) { } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { toggleGUIVisibility(); } } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } @Override public void mouseDragged(MouseEvent e) { } @Override public void mouseMoved(MouseEvent e) { } }); sti.setTrayPopupMenu(tpm); if (!sp.getBool("PREF_NOSYSTRAY")) { sti.load(); } } private InfoDialog createInfoDialog() { InfoDialog id = new InfoDialog(this); id.setTitle(APPNAME); id.setCancelButtonText(LOCAL.getString("button_cancel")); id.setContinueButtonText(LOCAL.getString("button_continue")); id.setCloseButtonText(LOCAL.getString("button_close")); return id; } private void openInstanceDialog() { InfoDialog id = createInfoDialog(); id.createError(LOCAL.getString("dlg_instancefail_title"), LOCAL.getString("dlg_instancefail_body").replace("$appname", APPNAME)); id.pack(); id.setVisible(true); } private void openNotEnoughGuardsDialog() { InfoDialog id = createInfoDialog(); id.createWarn(LOCAL.getString("dlg_guardwarn_title"), LOCAL.getString("dlg_notenoughguards_body").replace("$appname", APPNAME)); id.setCancelVisible(false); id.setContinueButtonText(LOCAL.getString("button_setguards")); id.pack(); id.setVisible(true); if (id.getReturnStatus() == InfoDialog.OK) { openGuardsSettingDialog(); } } private void openGsettingsDialog() { InfoDialog id = createInfoDialog(); id.createError(LOCAL.getString("dlg_gsetting_title"), LOCAL.getString("dlg_gsetting_body").replace("$appname", APPNAME)); id.pack(); id.setVisible(true); } private void openTorClientDialog() { InfoDialog id = createInfoDialog(); id.createError(LOCAL.getString("dlg_torclient_title"), LOCAL.getString("dlg_torclient_body").replace("$appname", APPNAME)); id.pack(); id.setVisible(true); } private void openLibnotifyDialog() { InfoDialog id = createInfoDialog(); id.createError(LOCAL.getString("dlg_libnotify_title"), LOCAL.getString("dlg_libnotify_body").replace("$appname", APPNAME)); id.setModal(false); id.setAutoClose(10000); id.pack(); id.setVisible(true); } private void openBridgeErrorDialog() { InfoDialog id = createInfoDialog(); id.createError(LOCAL.getString("dlg_bridgerr_title"), LOCAL.getString("dlg_bridgerr_body").replace("$appname", APPNAME)); id.pack(); id.setVisible(true); } /** * Node table and node list initialisation */ private void initNodeTables() { // Create our node list storage object nodeList = new NodeList(settingsPath, EXITFAVOURITES, GUARDWHITELIST); entm = new ExitNodeTableModel(); entm.setColumnName(LOCAL.getString("exittable_col1"), 0); entm.setColumnName(LOCAL.getString("exittable_col2"), 1); entm.setColumnName(LOCAL.getString("exittable_col3"), 2); entm.setColumnName(LOCAL.getString("exittable_col4"), 3); entm.setColumnName(LOCAL.getString("exittable_col5"), 4); entm.addTableModelListener(new javax.swing.event.TableModelListener() { @Override public void tableChanged(TableModelEvent e) { if (e.getType() == TableModelEvent.UPDATE) { if (e.getColumn() == 4) { nodeList.saveExitFavourites(); // Force favourites recalc intThresholdExceeded = 255; // Do node auto selection in 5 secs intAutoSelectCheck = 5; } } } }); nodeList.setExitNodeTableModel(entm); jTableExitNodes.setModel(entm); // Adjust table column widths adjustExitTableColumns(); } private void clearFavourites() { for (int i = 0; i < entm.getRowCount(); i++) { entm.setValueAt(false, i, 4); } } /** * Main tor process initialisation */ private void initTorMain() { intBeginTesting = TESTING_DISABLED; nf = new NetFunctions(); tmf = new TorMonFrame(); tmf.setTitle(LOCAL.getString("wintitle_tormonitor")); tmf.setIconImage(new javax.swing.ImageIcon(iconPath + ICONFILE).getImage()); // Initialise the Tor main client event handler tcMain = new TorController(clientLocation, cachePath) { private int intNodeFailCount; @Override public void controllerEventFired(int event, Object data) { Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "controllerEventFired() on Port=" + getListenPort(), getEventMessage(event) + ", Data=" + data); switch (event) { case TOR_BRIDGE: nodeList.addBridge((String) data); break; case TOR_NOROUTE: if (boolNetEnabled) { boolNetEnabled = false; boolFirstRun = true; updateProgramStatus(LOCAL.getString("progstatus_nonet")); dn.setNotificationBody(LOCAL.getString("progstatus_nonet")); dn.raiseNotification(); setComponentsEnabled(false); } break; case TOR_DIRINFO_STALE: // Deliberate fallthrough here case TOR_NOEXITS: // Ensure client is fully running as multiple TOR_NOEXITS can // be generated at startup especially if folks are torrenting via Tor if (getStatus() < STATUS_IDLE) { break; } updateProgramStatus(LOCAL.getString("circuit_status_none")); intNodeFailCount = 0; resetBestNode(); strRequestedExit = getBestNode(); if (strRequestedExit == null) { strRequestedExit = EMPTYSTR; } stop(); setSilentBootEnabled(true); setStartupDelay(2000); start(TOR_RESTARTED); break; case TOR_CLOCK_ERROR: // Deliberate fallthrough here case TOR_BOOT_FATAL: openFatalErrorDialog((String) data); cleanupExit(); break; case TOR_BOOT_TIMEOUT: stop(); setStartupDelay(2000); start(TOR_BOOTED); break; case TOR_MESSAGE: updateProgramStatus((String) data); break; case TOR_BOOTED: boolNetEnabled = true; regenNodelist(); break; case TOR_RESTARTED: boolNetEnabled = true; activateNode(strRequestedExit); break; case EVENT_CIRCUIT_FAILED: // Deliberate fallthrough here case EVENT_CIRCUITS_FAILED: switch (++intNodeFailCount) { case 1: // Retry updateProgramStatus(LOCAL.getString("progstatus_nodefailretry")); intThresholdExceeded = 254; intAutoSelectCheck = 2; break; case 2: // Get the next best node updateProgramStatus(LOCAL.getString("progstatus_nodefail")); intThresholdExceeded = 4; intAutoSelectCheck = 2; break; case 3: // Get the next best node and trigger test cycle updateProgramStatus(LOCAL.getString("progstatus_nodefail")); intNodeFailCount = 0; intThresholdExceeded = 4; intAutoSelectCheck = 2; if (intBeginTesting > 2) { intBeginTesting = 2; } break; } break; case EVENT_CIRCUITS_BUILT: if (!strRequestedExit.isEmpty()) { NodeItem ni = nodeList.getNode(strRequestedExit); if (ni == null) { activateNode(strRequestedExit = EMPTYSTR); break; } if (ni.getCircuitHops() != null) { tcMain.activateCircuit(ni.getCircuitHops()); break; } } case EVENT_CIRCUIT_BUILT: intNodeFailCount = 0; intThresholdExceeded = 0; intLatencyCheck = 1; // Trigger node testing if (intBeginTesting == TESTING_DISABLED) { intBeginTesting = 2; } if (boolFirstRun) { boolFirstRun = false; // Update geoip check updateGeoipCheck(); } break; case EVENT_LATENCY_DONE: if (niActiveExit != null) { niActiveExit.setStreams(getActiveStreams().size()); niActiveExit.setLatency(getLatency()); updateGUINodeInfo(niActiveGuard, niActiveMiddle, niActiveExit); // Check for threshold override if (intThresholdExceeded >= 100) { break; } if (niActiveExit.getLatency() > lngThreshold) { intThresholdExceeded++; if (niActiveExit.getLatency() > MAXTHRESHOLD) { // If we have 3 (15 sec) of outright latency failures then trigger test cycle if (intThresholdExceeded > 2) { intAutoSelectCheck = 2; if (intBeginTesting > 2) { intBeginTesting = 2; } } break; } // If we have only have one favourite then effectively // ignore latency if (nodeList.getNumberOfFavs() == 1) { intThresholdExceeded = 0; break; } if (niActiveExit.getStreams() > 0) { // If we have active streams then do new selection after 1 minute // of threshold excesses if (intThresholdExceeded > 11) { intAutoSelectCheck = 2; } } else { // If we have no active streams then do new selection after 15 secs // of threshold excesses if (intThresholdExceeded > 2) { intAutoSelectCheck = 2; } } break; } intThresholdExceeded = 0; } break; } } }; // Tor main initial startup conditions tcMain.setTorrcOption("ClientOnly", "1"); tcMain.setTorrcOption("StrictNodes", "1"); tcMain.setTorrcOption("UseMicrodescriptors", "0"); tcMain.setTorrcOption("UseEntryGuards", "1"); tcMain.setTorrcOption("NumEntryGuards", "3"); tcMain.setTorrcOption("ExitNodes", "{FI}"); tcMain.setStdoutTextArea(tmf.getStdoutTextArea()); tcMain.setListenPort(sp.getInt("PREF_LISTENPORT")); tcMain.setOwnershipID(OSFunction.getOurProcessID()); strSecret = Utilities.generateSecretKey(16); strHash = Utilities.getTorHashPassword(strSecret); tcMain.setControlPassword(strSecret, strHash); } /** * Test thread initialisation * * @param nothreads */ private void initTestThreads(int nothreads) { TorController tcTest; // Main testing procedure here, event driven this just handles process declaration // Initialise our tor testing thread prior to booting it while (alTestThreads.size() < nothreads) { tcTest = new TorController(clientLocation, cachePath) { private NodeItem ni; @Override public void controllerEventFired(int event, Object data) { Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "controllerEventFired() on Port=" + getListenPort(), getEventMessage(event) + ", Data=" + data); switch (event) { case TOR_NOROUTE: if (boolNetEnabled) { abortTesting(); stopTestClients(); updateGUINodeInfo(niActiveGuard = null, niActiveMiddle = null, niActiveExit = null); tcMain.stop(); tcMain.setSilentBootEnabled(true); tcMain.setStartupDelay(2000); tcMain.start(TOR_BOOTED); } break; case TOR_BOOT_TIMEOUT: case TOR_BOOT_FATAL: ni = null; stop(); setSilentBootEnabled(true); setStartupDelay(2000); start(TOR_BOOTED); break; case TOR_RESTARTED: // Deliberate fallthrough here case TOR_BOOTED: // Deliberate fallthrough here ni = null; case EVENT_TESTING_DONE: if (ni != null) { if (intActiveNodeTests > 0) { intActiveNodeTests--; } Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "controllerEventFired() on Port=" + getListenPort(), "Completed Testing of " + ni.getNickName()); if (getBestLatency() < LATENCY_FAIL) { ni.setTestStatus(NodeItem.TESTSTATUS_PASSED); // Store best circuit using its latency as a key entm.setTestFieldValues(ni.getFingerprint(), getBestLatency(), LOCAL.getString("circuit_status_passed"), getBestHops()); } else if ((Integer) data > 0) { ni.setTestStatus(NodeItem.TESTSTATUS_FAILED); // If we have circuits that failed testing entm.setTestFieldValues(ni.getFingerprint(), LATENCY_FAIL, LOCAL.getString("circuit_status_failed"), null); } else { // If we have no circuits ni.setTestStatus(NodeItem.TESTSTATUS_FAILED); entm.setTestFieldValues(ni.getFingerprint(), LATENCY_FAIL, LOCAL.getString("circuit_status_none"), null); stop(); setSilentBootEnabled(true); setStartupDelay(2000); start(TOR_RESTARTED); break; } } ni = null; // Ensure test thread is ready if (getStatus() != STATUS_IDLE) { break; } // No more nodes to test if (alTestQueue.isEmpty()) { // Check to see that all testing threads have completed if (intActiveNodeTests <= 0) { stopTestClients(); // Re-Enable testing menu button jMenuTesting.setEnabled(true); // intActiveNodeTests will be -1 if testing was aborted if (intActiveNodeTests == 0) { // Start next test in 10 minutes intBeginTesting = 600; // Force change on next Autoselection check intThresholdExceeded = 255; // Force Autoselection check in 1 second intAutoSelectCheck = 1; } return; } return; } // Fetch node item from queue while (!alTestQueue.isEmpty()) { String finger = alTestQueue.get(0); alTestQueue.remove(0); ni = nodeList.getNode(finger); if (ni != null) { intActiveNodeTests++; entm.setValueAt(LOCAL.getString("circuit_status_creating_3hop"), ni.getFingerprint(), 3); Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "controllerEventFired() on Port=" + getListenPort(), "Begun testing node " + ni.getNickName()); testNode(ni.getFingerprint()); } else { Logger.getGlobal().logp(Level.INFO, SelekTOR.class.getName(), "controllerEventFired() on Port=" + getListenPort(), finger + " node not found in nodelist "); entm.setValueAt(LOCAL.getString("circuit_status_failed"), finger, 3); } break; } break; case EVENT_CIRCUIT_BUILT: if (ni != null) { entm.setValueAt(LOCAL.getString("circuit_status_testing"), ni.getFingerprint(), 3); } break; case EVENT_ABORTED: if (intActiveNodeTests > 0) { intActiveNodeTests--; } if (ni != null) { entm.setValueAt(LOCAL.getString("circuit_status_aborted"), ni.getFingerprint(), 3); ni.setTestStatus(NodeItem.TESTSTATUS_UNKNOWN); ni = null; } break; case TOR_DIRINFO_STALE: case TOR_NOEXITS: if (intActiveNodeTests > 0) { intActiveNodeTests--; } if (ni != null) { entm.setTestFieldValues(ni.getFingerprint(), LATENCY_FAIL, LOCAL.getString("circuit_status_noroute"), null); ni.setTestStatus(NodeItem.TESTSTATUS_FAILED); ni = null; stop(); setSilentBootEnabled(true); setStartupDelay(2000); start(TOR_RESTARTED); } break; } } }; tcTest.setTorrcOption("ClientOnly", "1"); tcTest.setTorrcOption("StrictNodes", "1"); tcTest.setTorrcOption("UseMicrodescriptors", "0"); tcTest.setTorrcOption("UseEntryGuards", "1"); tcTest.setTorrcOption("NumEntryGuards", "3"); tcTest.setOwnershipID(tcMain.getOwnershipID()); tcTest.setControlPassword(strSecret, strHash); tcTest.setCLIOption("quiet", EMPTYSTR); // Add this this tor process thread to our thread queue alTestThreads.add(tcTest); } strSecret = strHash = null; } /** * Auto select next best node based on latency * */ private void autoSelectNode() { String finger; switch (intThresholdExceeded) { case 255: intThresholdExceeded = 0; // Recaculate best nodes calcBestNodes(); resetBestNode(); finger = getBestNode(); break; case 254: // this will re-apply previously selected node finger = strRequestedExit; strRequestedExit = EMPTYSTR; break; default: // Indicate node has failed testing NodeItem ni = null; if (niActiveExit != null && nodeList.getNumberOfFavs() != 1) { ni = nodeList.getNode(niActiveExit.getFingerprint()); if (ni != null) { ni.setTestStatus(NodeItem.TESTSTATUS_FAILED); } } // Get next best node finger = getBestNode(); break; } intThresholdExceeded = 0; // Check to see if finger is valid if (finger != null && !finger.isEmpty()) { if (!finger.contentEquals(strRequestedExit)) { strRequestedExit = finger; updateProgramStatus(LOCAL.getString("progstatus_autoswitch") + " " + activateNode(strRequestedExit) + "."); } } else { updateProgramStatus(LOCAL.getString("progstatus_nodefailtorchoose")); strRequestedExit = EMPTYSTR; activateNode(strRequestedExit); } } /** * Set latency threshold value and update its corresponding label * * @param threshold */ private void setThreshold(long threshold) { lngThreshold = threshold; jTableExitNodes.setToolTipText(LOCAL.getString("ttip_threshold") + ": " + lngThreshold + " ms"); } /** * Calculate best nodes based on latency and also generate the latency * threshold value */ private void calcBestNodes() { long l; long summation = 0; long mean = TorController.LATENCY_FAIL; int i = 0; ArrayList alBestNodes = new ArrayList<>(); ArrayList alBestFavs = new ArrayList<>(); TableRowSorter trs = new TableRowSorter<>(entm); trs.toggleSortOrder(2); for (int idx = 0; idx < entm.getRowCount(); idx++) { NodeItem ni = entm.getNodeItemAt(trs.convertRowIndexToModel(idx)); if (ni.getTestStatus() == NodeItem.TESTSTATUS_FAILED) { continue; } if (ni.isFavourite()) { alBestFavs.add(ni.getFingerprint()); } // Calculate our new weighted threshold value l = ni.getTestLatency(); if (l >= mean) { continue; } summation += l; mean = (summation / (i + 1)) * 3; i++; alBestNodes.add(ni.getFingerprint()); } // New threshold result, prevent divide by zero if (i == 0) { setThreshold(MAXTHRESHOLD); } else { setThreshold((summation / i) + 100); } if (alBestFavs.isEmpty()) { while (alBestNodes.size() > 5) { alBestNodes.remove(alBestNodes.remove(alBestNodes.size() - 1)); } strArrBestNodes = alBestNodes.toArray(new String[alBestNodes.size()]); } else { strArrBestNodes = alBestFavs.toArray(new String[alBestFavs.size()]); } } private void resetTestFields() { for (int i = 0; i < entm.getRowCount(); i++) { entm.setValueAt(TorController.LATENCY_FAIL, i, 2); entm.setValueAt(LOCAL.getString("textfield_unknown"), i, 3); entm.setValueAt(null, i, 6); } } /** * Begin the test cycle */ private void runTestingCycle() { // Setting intBeginTesting to -1 prevents re-triggering of testing cycle until it has completed intBeginTesting = TESTING_ACTIVE; // Update table status column to show unknown and reset the latency column to 9999 intActiveNodeTests = 0; jMenuTesting.setEnabled(false); jTableExitNodes.getRowSorter().setSortKeys(null); resetTestFields(); // Add all nodes to the individual test thread queues alTestQueue.addAll(nodeList.getExitNodes(true, false)); // Some more inititalisation of test process threads long delay = 0; int listenport = tcMain.getListenPort(); for (TorController tc : alTestThreads) { listenport += 2; tc.setListenPort(listenport); tc.setCachedDataFolder(tcMain.getListenPort()); tc.setBridges(sp.getString("PREF_TORBRIDGE")); tc.setEntryNodes(tcMain.getEntryGuardsAsCSV()); tc.setTestingURL(TESTURL); tc.setBoolTorOption("SafeSocks", sp.getBool("PREF_SAFESOCKS")); tc.setBoolTorOption("TestSocks", sp.getBool("PREF_TESTSOCKS")); tc.setBoolTorOption("AvoidDiskWrites", sp.getBool("PREF_AVOIDDISK")); tc.setBoolTorOption("SafeLogging", sp.getBool("PREF_SAFELOG")); tc.setGeoIP4(geoipPath); tc.setGeoIP6(geoip6Path); tc.setExternalArgs(sp.getString("PREF_TORARGS")); tc.setLogLevel(sp.getInt("PREF_TORLOGLEV")); tc.setSilentBootEnabled(true); tc.setStartupDelay(delay); delay += 5000; tc.start(); } } /** * Cleanly abort any node testing */ private void abortTesting() { intBeginTesting = TESTING_DISABLED; for (TorController tcTest : alTestThreads) { tcTest.abortActions(); } intActiveNodeTests = -1; alTestQueue.clear(); jMenuTesting.setEnabled(true); } /** * Terminate all test threads cleanly, this is permanent and would require a * call to initTestThreads prior to starting them again */ private void stopTestClients() { for (TorController tc : alTestThreads) { tc.stop(); } } /** * Gets the node with the best circuit hops * * @return String with the best circuit hops or empty string if we don't * have any or null if we have run out of good nodes */ private String getBestNode() { // Check for no table or empty table if (strArrBestNodes == null || strArrBestNodes.length == 0) { intBestNodeIndex = 0; return EMPTYSTR; } // Check for end of table if (intBestNodeIndex > (strArrBestNodes.length - 1)) { intBestNodeIndex = 0; if (intBeginTesting > 2) { intBeginTesting = 2; } return null; } return strArrBestNodes[intBestNodeIndex++]; } /** * Reset to the best node */ private void resetBestNode() { intBestNodeIndex = 0; } /** * Update program status message * * @param message */ private synchronized void updateProgramStatus(String message) { if (message != null) { jLabStatus.setText(message); Logger.getGlobal().log(Level.INFO, "updateProgramStatus {0}", message); } } private void getFreshNodeInfo() { TorCircuit tc = tcMain.getLatestCircuit(); if (tc == null) { return; } // Get active guard node item String finger = tc.getGuard(TorCircuit.FINGER); niActiveGuard = nodeList.getNode(finger).clone(); // Get exitnode info finger = tc.getExit(TorCircuit.FINGER); niActiveExit = (NodeItem) nodeList.getNode(finger).clone(); niActiveExit.setCircuitHops(tc.getHops()); niActiveExit.setLatency(TorController.LATENCY_FAIL); // Get active middle node item finger = tc.getMiddleMan(TorCircuit.FINGER); niActiveMiddle = nodeList.getNode(finger).clone(); } /** * Convenience method to refresh all the GUI labels related to Node * information * * @param niexit Requires the active node item to be provided */ private void updateGUINodeInfo(NodeItem niguard, NodeItem nimiddle, NodeItem niexit) { if (nimiddle == null) { jLabelMiddleStable.setText(LOCAL.getString("textfield_unknown")); jLabelMiddleBw.setText(LOCAL.getString("textfield_unknown")); jLabelMiddleNick.setText(LOCAL.getString("textfield_unknown")); jLabelMiddleIP.setText(LOCAL.getString("textfield_unknown")); jLabelMiddleCountry.setText(LOCAL.getString("textfield_unknown")); jButtonMiddleNodeDetails.setEnabled(false); } else { jLabelMiddleNick.setText(nimiddle.getNickName()); jLabelMiddleIP.setText(nimiddle.getIPAddress()); jLabelMiddleCountry.setText(nimiddle.getCountryName()); jLabelMiddleBw.setText(String.valueOf(nimiddle.getBandwidth()) + " MB\\s"); jLabelMiddleStable.setText(nimiddle.getStability()); jButtonMiddleNodeDetails.setEnabled(true); } if (niexit == null) { intLatencyCheck = 0; intAutoSelectCheck = 0; jLabelExitNick.setText(LOCAL.getString("textfield_unknown")); jLabelExitIP.setText(LOCAL.getString("textfield_unknown")); jLabelExitCountry.setText(LOCAL.getString("textfield_unknown")); jLabelExitBw.setText(LOCAL.getString("textfield_unknown")); jLabelExitStable.setText(LOCAL.getString("textfield_unknown")); jLabelTorLatency.setText(LOCAL.getString("textfield_unknown")); jLabelStreams.setText(LOCAL.getString("textfield_unknown")); jLabelGuardStable.setText(LOCAL.getString("textfield_unknown")); jLabelGuardBw.setText(LOCAL.getString("textfield_unknown")); jLabelGuardNick.setText(LOCAL.getString("textfield_unknown")); jLabelGuardIP.setText(LOCAL.getString("textfield_unknown")); jLabelGuardCountry.setText(LOCAL.getString("textfield_unknown")); jButtonExitNodeDetails.setEnabled(false); jButtonGuardNodeDetails.setEnabled(false); jMenuItemTorCheck.setEnabled(false); } else { jLabelExitNick.setText(niexit.getNickName()); jLabelExitIP.setText(niexit.getIPAddress()); jLabelExitCountry.setText(niexit.getCountryName()); jLabelExitBw.setText(String.valueOf(niexit.getBandwidth()) + " MB\\s"); jLabelExitStable.setText(niexit.getStability()); jButtonExitNodeDetails.setEnabled(true); jLabelGuardNick.setText(niguard.getNickName()); jLabelGuardIP.setText(niguard.getIPAddress()); jLabelGuardCountry.setText(niguard.getCountryName()); jLabelGuardBw.setText(String.valueOf(niguard.getBandwidth()) + " MB\\s"); jLabelGuardStable.setText(niguard.getStability()); jMenuItemTorCheck.setEnabled(true); jButtonGuardNodeDetails.setEnabled(true); if (niexit.getLatency() > 5000) { jLabelTorLatency.setText("> 5000 ms"); } else { jLabelTorLatency.setText(String.valueOf(niexit.getLatency()) + " ms"); } jLabelStreams.setText(String.valueOf(niexit.getStreams())); updateProgramStatus(LOCAL.getString("progstatus_nodeactive3hop").replace("$nodename", niActiveExit.getNickName())); dn.raiseNotification(); } String text = LOCAL.getString("label_country") + " : " + sp.getString("PREF_ISOCOUNTRY"); text += "\n" + LOCAL.getString("traymenu_proxymode" + (sp.getInt("PREF_PROXY_MODE") + 1)); text += "\n" + LOCAL.getString("traytool_guardnode") + " : " + jLabelGuardNick.getText(); text += "\n" + LOCAL.getString("traytool_exitnode") + " : " + jLabelExitNick.getText(); text += "\n" + LOCAL.getString("label_torlatency") + " : " + jLabelTorLatency.getText(); text += "\n" + LOCAL.getString("label_streams") + " : " + jLabelStreams.getText(); sti.setInfoTip(text); } /** * Convenience method to update the exit node table * */ private void updateExitNodeTable() { try { strArrBestNodes = null; intRowSelected = -1; // Set in an empty model while we do the update of its model to avoid event collision issues jTableExitNodes.setModel(new ExitNodeTableModel()); nodeList.refreshExitTableModel(strExitISOCode); jTableExitNodes.setModel(entm); resetTestFields(); calcBestNodes(); } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "updateExitNodeTable()", EMPTYSTR, ex); } updateGUINodeInfo(null, null, null); setComponentsEnabled(true); } /** * Adjust exit table column widths */ private void adjustExitTableColumns() { // Adjust table column widths String col3 = LOCAL.getString("circuit_status_creating_2hop"); if (col3.length() > 6) { col3 = col3.substring(0, col3.length() - 2); } else { col3 = "XXXXXXXXXXXXXXXXXX"; } Utilities.adjustTableColumnWidth(jTableExitNodes, "XXXXXXXXXXXXXXXXXX", jTableExitNodes.getColumnName(1) + "X", jTableExitNodes.getColumnName(2) + "X", col3, jTableExitNodes.getColumnName(4) + "X"); } /** * Returns the selected fingerprint * * @param row * @return Fingerprint as String */ private String getSelectedFinger(int row) { return (String) entm.getValueAt(row, 5); } /** * Tests first to see if node is in the exitnode list * * @param finger * @return true if specified node is in the exit node table */ private boolean isValidExit(String finger) { return nodeList.getExitNodes(true, false).contains(finger); } /** * Activates specified node with fingerprint finger, also returns the node * name * * @param finger * @return Node name */ private String activateNode(String fingerprint) { String result = EMPTYSTR; updateGUINodeInfo(niActiveGuard = null, niActiveMiddle = null, niActiveExit = null); if (boolFirstRun) { tcMain.closeCircuitsExcept("", true); } if (fingerprint.isEmpty()) { // Get a list of exit nodes based on auto node selection mode ArrayList alFingers = nodeList.getExitNodes(false, true); if (alFingers.isEmpty()) { // Get a list of all exit nodes alFingers = nodeList.getExitNodes(true, true); } // Randomly select from given list of nodes Random rand = new Random(); int idx = rand.nextInt(alFingers.size()); fingerprint = alFingers.get(idx); tcMain.activateNodes(fingerprint, 1); } else if (!fingerprint.startsWith("$")) { tcMain.activateNodes(fingerprint, 1); } else { NodeItem ni = nodeList.getNode(fingerprint); tcMain.activateNodes(fingerprint, 1); if (ni != null) { ni.setTestStatus(NodeItem.TESTSTATUS_PASSED); result = ni.getNickName(); } else { result = fingerprint; } } return result; } /** * Called when the country is changed via the combo box change event * */ private void countryChanged() { // Some essential resets of variables niActiveExit = null; // Get selected country String iso = (String) jComboCountry.getSelectedItem(); iso = iso.substring(0, 2); if (!strExitISOCode.contentEquals(iso)) { // Save new country to properties file sp.setString("PREF_ISOCOUNTRY", strExitISOCode = iso); sp.save(); } rebuildPatternPac(); updateExitNodeTable(); adjustExitTableColumns(); updateProgramStatus(LOCAL.getString("progstatus_waitfortor")); activateNode(strRequestedExit = EMPTYSTR); } /** * Cleans up pac files and proxies */ private void pacCleanup() { if (pacFactory != null) { pacFactory.restoreProxyPrefs(false); pacFactory.deleteProxyPrefs(); pacFactory.deleteAllPAC(); } } /** * The main application exit routine also does cleanup before exiting * */ public final void cleanupExit() { try { setVisible(false); // Need to ensure various processes are cleanly terminated before we can exit if (tmr != null) { tmr.stop(); } if (sti != null) { sti.dispose(); } if (nodeList != null) { nodeList.terminate(); } if (tmf != null) { tmf.dispose(); } // Terminate all tor threads if (tcMain != null) { tcMain.stop(); } stopTestClients(); pacCleanup(); if (sp.getBool("PREF_CACHEDELETE")) { SimpleFile.secureWipeFolder(cachePath); } } catch (Exception ex) { } Logger.getGlobal().log(Level.INFO, "Cleanup completed, shutting down"); dispose(); System.exit(0); } /** * Change visibilty of gUI * */ private void initGUIVisibility() { // Bring up gui pack(); setLocationRelativeTo(this); Utilities.registerWindow(); if (sp.getBool("PREF_HIDETOTRAY")) { if (sp.getBool("PREF_HIDE_MIN") && sti.isLoaded()) { setVisible(false); } else { setVisible(true); SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { repaint(); setExtendedState(Frame.ICONIFIED); } }); } } else { setVisible(true); } } /** * Toggle GUI visibility */ private void toggleGUIVisibility() { if (OSFunction.isLinux()) { requestFocus(); } SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { if (!isVisible()) { setVisible(true); setExtendedState(Frame.NORMAL); return; } if ((getExtendedState() & Frame.ICONIFIED) != 0) { setExtendedState(Frame.NORMAL); toFront(); } else { if (OSFunction.isLinux()) { switch (desktopname) { case "kde4": if (compositor.contentEquals("kwin")) { if (getFocusOwner() == null) { setVisible(false); setVisible(true); return; } } break; case "mate": if (compositor.contentEquals("compiz")) { if (getFocusOwner() == null) { setExtendedState(Frame.NORMAL); toFront(); return; } } else if (getFocusOwner() == null) { setVisible(false); setVisible(true); return; } break; default: if (getFocusOwner() == null) { setExtendedState(Frame.NORMAL); toFront(); return; } break; } } if (sp.getBool("PREF_HIDE_MIN") && sti.isLoaded()) { setVisible(false); } else { setExtendedState(Frame.ICONIFIED); } } } }); } /** * Open the about dialog */ private void openAboutDialog() { AboutDialog ad = new AboutDialog(this, true); ad.setButtonCloseText(LOCAL.getString("button_close")); ad.setButtonVisitText(LOCAL.getString("button_visitus")); ad.setButtonContactText(LOCAL.getString("button_contactus")); ad.setTitle(LOCAL.getString("wintitle_about").replace("$appname", APPNAME)); ad.setContactURL(CONTACT); ad.setHomeURL(HOMEPAGE_SSL); ad.setAppLogo(new javax.swing.ImageIcon(iconPath + ICONFILE)); String desc = LOCAL.getString("appdesc").replace("$appname", APPNAME); desc = desc.replace("$appver", APPVER) + "\n\nCopyright 2009-2017\nAlistair Neil"; ad.setAppDescription(desc); ad.setLocationRelativeTo(this); ad.pack(); ad.setVisible(true); } /** * Open the licensing dialog */ private void openLicenseDialog() { TextResourceDialog trd = new TextResourceDialog(this, true); trd.setTitle(LOCAL.getString("dlg_license_title")); trd.setURLButtonText(LOCAL.getString("button_translations")); trd.setButtonURL(LOCAL.getString("gpltransurl")); trd.setCloseButtonText(LOCAL.getString("button_close")); trd.setTitle(LOCAL.getString("dlg_license_title").replace("$appname", APPNAME)); trd.setText(Utilities.getTextFromResource("/resources/license.txt")); trd.setLocationRelativeTo(this); trd.setVisible(true); } /** * Open the licensing dialog */ private void openCreditsDialog() { TextResourceDialog trd = new TextResourceDialog(this, true); trd.setTitle(LOCAL.getString("dlg_credits_title")); trd.setButtonURL(PATREON); trd.setURLButtonText(LOCAL.getString("button_patreon")); trd.setCloseButtonText(LOCAL.getString("button_close")); trd.setTitle(LOCAL.getString("dlg_credits_title").replace("$appname", APPNAME)); trd.setText(LOCAL.getString("dlg_credits_body") + "\n\n" + Utilities.getTextFromResource("/resources/credits.txt")); trd.setLocationRelativeTo(this); trd.setVisible(true); } /** * Open the user pattern export file chooser */ private void openPatternExport() { File[] files = pacFactory.getPatternsFiles(); if (files.length == 0) { InfoDialog id = createInfoDialog(); id.createWarn(LOCAL.getString("dlg_exportuser_title"), LOCAL.getString("dlg_exportuser_body")); id.setContinueButtonText(LOCAL.getString("button_close")); id.setCancelVisible(false); id.pack(); id.setVisible(true); return; } // Lets choose our zip filename or overwrite an existing zip file JFileChooser jfc = new JFileChooser(); jfc.setDialogTitle(LOCAL.getString("dlg_saveuser_title")); if (jfc.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) { return; } pacFactory.exportUserPatterns(jfc.getSelectedFile().getAbsolutePath(), files); } /** * Open the pattern import file chooser */ private void openPatternImport() { JFileChooser jfc = new JFileChooser(); ExtensionFileFilter filter = new ExtensionFileFilter(LOCAL.getString("fileext_pattern"), new String[]{"zip"}); jfc.setFileFilter(filter); jfc.setDialogTitle(LOCAL.getString("dlg_import_title")); if (jfc.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) { return; } InfoDialog id = createInfoDialog(); if (pacFactory.importPatterns(jfc.getSelectedFile().getAbsolutePath())) { rebuildPatternPac(); id.createWarn(LOCAL.getString("dlg_import_success_title"), LOCAL.getString("dlg_import_success_body")); id.setCancelVisible(false); id.pack(); id.setVisible(true); } else { id.createWarn(LOCAL.getString("dlg_import_fail_title"), LOCAL.getString("dlg_import_fail_body")); id.setCancelVisible(false); id.pack(); id.setVisible(true); } } /** * Open the pattern editor */ private void openPatternEditorDialog() { PatternsEditor pe = new PatternsEditor(this, true, pacFactory); pe.populateCountryComboBox(nodeList.getValidatedCountries()); pe.setSelectedCountry((String) jComboCountry.getSelectedItem()); pe.setTitle(LOCAL.getString("wintitle_patternedit").replace("$appname", APPNAME)); pe.pack(); pe.setLocationRelativeTo(this); pe.setVisible(true); sp.setString("PREF_DONOT_PROXY", pacFactory.getDoNotProxy()); if (sp.getChangedProperties().contains("PREF_DONOT_PROXY")) { sp.save(); } if (pe.getReturnStatus() == PatternsEditor.APPLY) { rebuildPatternPac(); } } /** * Open Quick Add pattern dialog */ private void openQuickAddDialog() { QuickAddDialog qad = new QuickAddDialog(this, true); qad.pack(); qad.setLocationRelativeTo(this); qad.setVisible(true); if (qad.getReturnStatus() == QuickAddDialog.APPLY && strExitISOCode != null) { pacFactory.addToPatternFile(strExitISOCode, qad.getDescription(), qad.getPattern()); rebuildPatternPac(); } } /** * Open Tor client to old dialog */ private void openToOldDialog() { openFatalErrorDialog(LOCAL.getString("dlg_toold_body")); } /** * Open the fatal error dialog * * @param errmessage */ private void openFatalErrorDialog(String errmessage) { String text = "\n\n" + LOCAL.getString("dlg_error_body").replace("$appname", APPNAME); InfoDialog id = createInfoDialog(); id.setSize(500, 450); id.createInfo(LOCAL.getString("dlg_error_title"), errmessage + text); id.setModal(true); id.pack(); id.setLocationRelativeTo(this); id.pack(); id.setVisible(true); } /** * Open the guards node setting dialog */ private void openGuardsSettingDialog() { GuardNodeDialog gnd = new GuardNodeDialog(this, true); gnd.setNodeList(nodeList); gnd.pack(); gnd.setLocationRelativeTo(this); gnd.setVisible(true); if (gnd.getReturnStatus() == GuardNodeDialog.APPLY) { if (sp.getString("PREF_TORBRIDGE").isEmpty()) { updateProgramStatus(LOCAL.getString("progstatus_applychanges")); abortAllTorThreads(); applyMainTorSettings(); tcMain.start(); } } } /** * Open the standard out dialog */ private void openTorMonitor() { tmf.setLocationRelativeTo(this); tmf.setVisible(true); } /** * Called when proxy mode is changed by the user * * @param mode Proxy mode */ private void proxyModeChanged(int mode) { sp.setInt("PREF_PROXY_MODE", mode); sp.save(); dn.setNotificationBody(LOCAL.getString("traymenu_proxymode" + (sp.getInt("PREF_PROXY_MODE") + 1))); applyProxyChanges(mode); } /** * Apply any proxy changes based on current proxy mode * * @param mode Proxy mode */ private void applyProxyChanges(int mode) { if (tcMain == null) { return; } switch (mode) { case PacFactory.PROXY_DISABLED: pacFactory.restoreProxyPrefs(true); pacFactory.deleteAllPAC(); break; case PacFactory.PROXY_PATTERN: pacFactory.createPacFile(strExitISOCode, tcMain.getListenPort()); break; case PacFactory.PROXY_ALL: pacFactory.createPacFile("proxyall", tcMain.getListenPort()); break; } } /** * Rebuilds pattern pacfile but only if we are in pattern mode */ private void rebuildPatternPac() { if (sp.getInt("PREF_PROXY_MODE") == PacFactory.PROXY_PATTERN) { applyProxyChanges(sp.getInt("PREF_PROXY_MODE")); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { popupTable = new javax.swing.JPopupMenu(); jMenuNodeDetails = new javax.swing.JMenuItem(); jMenuWhois = new javax.swing.JMenuItem(); jMenuTesting = new javax.swing.JMenuItem(); jMenuItemGUI = new javax.swing.JMenuItem(); jMenuItemQuitx = new javax.swing.JMenuItem(); buttonGroupProxy = new javax.swing.ButtonGroup(); buttonGroupProxyTray = new javax.swing.ButtonGroup(); jCheckTrayProxyDisable = new javax.swing.JCheckBoxMenuItem(); jCheckTrayProxyByPattern = new javax.swing.JCheckBoxMenuItem(); jCheckTrayProxyAll = new javax.swing.JCheckBoxMenuItem(); jPanelMain = new javax.swing.JPanel(); jLabelCountry = new javax.swing.JLabel(); jComboCountry = new javax.swing.JComboBox<>(); jScrollPaneExitNodes = new javax.swing.JScrollPane(); jTableExitNodes = new javax.swing.JTable(); jPanelNodeInfo = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jLabelGuardBw = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabelGuardStable = new javax.swing.JLabel(); jLabelGuard = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabelGuardNick = new javax.swing.JLabel(); jLabelGuardIP = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabelGuardCountry = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabelExitNick = new javax.swing.JLabel(); jLabelExitIP = new javax.swing.JLabel(); jLabelMiddle = new javax.swing.JLabel(); jLabelExit = new javax.swing.JLabel(); jLabelMiddleNick = new javax.swing.JLabel(); jLabelMiddleIP = new javax.swing.JLabel(); jLabelMiddleCountry = new javax.swing.JLabel(); jButtonExitNodeDetails = new javax.swing.JButton(); jButtonGuardNodeDetails = new javax.swing.JButton(); jButtonMiddleNodeDetails = new javax.swing.JButton(); jLabelMiddleBw = new javax.swing.JLabel(); jLabelExitBw = new javax.swing.JLabel(); jLabelMiddleStable = new javax.swing.JLabel(); jLabelExitStable = new javax.swing.JLabel(); jLabelExitCountry = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabelTorLatency = new javax.swing.JLabel(); jLabelStreams = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jButtonSetGuards = new javax.swing.JButton(); jLabStatus = new javax.swing.JLabel(); jButtonClearFavs = new javax.swing.JButton(); jMenuBar = new javax.swing.JMenuBar(); jMenuMenu = new javax.swing.JMenu(); jMenuItemPrefs = new javax.swing.JMenuItem(); jMenuItemAddPattern = new javax.swing.JMenuItem(); jMenuItemPatternEdit = new javax.swing.JMenuItem(); jMenuItemStdout = new javax.swing.JMenuItem(); jMenuItemExport = new javax.swing.JMenuItem(); jMenuItemImport = new javax.swing.JMenuItem(); jMenuItemGeoip = new javax.swing.JMenuItem(); jMenuItemQuit = new javax.swing.JMenuItem(); jMenuProxy = new javax.swing.JMenu(); jCheckProxyDisable = new javax.swing.JCheckBoxMenuItem(); jCheckProxyByPattern = new javax.swing.JCheckBoxMenuItem(); jCheckProxyAll = new javax.swing.JCheckBoxMenuItem(); jMenuHelp = new javax.swing.JMenu(); jMenuItemDebugLog = new javax.swing.JMenuItem(); jMenuItemHelp = new javax.swing.JMenuItem(); jMenuItemTorMan = new javax.swing.JMenuItem(); jMenuItemTorCheck = new javax.swing.JMenuItem(); jMenuItemAbout = new javax.swing.JMenuItem(); jMenuItemLicense = new javax.swing.JMenuItem(); popupTable.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { popupTablePopupMenuWillBecomeVisible(evt); } public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) { } public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { } }); jMenuNodeDetails.setText(LOCAL.getString("table_popup_details")); // NOI18N jMenuNodeDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuNodeDetailsActionPerformed(evt); } }); popupTable.add(jMenuNodeDetails); jMenuWhois.setText(LOCAL.getString("table_popup_whois")); // NOI18N jMenuWhois.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuWhoisActionPerformed(evt); } }); popupTable.add(jMenuWhois); jMenuTesting.setText(LOCAL.getString("table_popup_begintest")); // NOI18N jMenuTesting.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuTestingActionPerformed(evt); } }); popupTable.add(jMenuTesting); jMenuItemGUI.setBackground(new Color(jMenuBar.getBackground().getRGB())); jMenuItemGUI.setForeground(new Color(jMenuBar.getForeground().getRGB())); jMenuItemGUI.setText(LOCAL.getString("traymenu_showgui")); // NOI18N jMenuItemGUI.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemGUIActionPerformed(evt); } }); jMenuItemQuitx.setText(LOCAL.getString("menu_quit")); // NOI18N jMenuItemQuitx.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemQuitxActionPerformed(evt); } }); jCheckTrayProxyDisable.setText(LOCAL.getString("combo_proxymode1")); // NOI18N jCheckTrayProxyDisable.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckTrayProxyDisableItemStateChanged(evt); } }); jCheckTrayProxyByPattern.setText(LOCAL.getString("combo_proxymode2")); // NOI18N jCheckTrayProxyByPattern.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckTrayProxyByPatternItemStateChanged(evt); } }); jCheckTrayProxyAll.setText(LOCAL.getString("combo_proxymode3")); // NOI18N jCheckTrayProxyAll.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckTrayProxyAllItemStateChanged(evt); } }); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jPanelMain.setFont(jPanelMain.getFont().deriveFont(jPanelMain.getFont().getStyle() | java.awt.Font.BOLD, jPanelMain.getFont().getSize()+1)); jLabelCountry.setFont(jLabelCountry.getFont().deriveFont(jLabelCountry.getFont().getStyle() | java.awt.Font.BOLD)); jLabelCountry.setText(LOCAL.getString("label_activecountry")); // NOI18N jComboCountry.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jComboCountryItemStateChanged(evt); } }); jTableExitNodes.setAutoCreateRowSorter(true); jTableExitNodes.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {}, {}, {}, {} }, new String [] { } )); jTableExitNodes.setToolTipText(LOCAL.getString("ttip_threshold") +" : "+ LOCAL.getString("textfield_unknown") ); jTableExitNodes.setComponentPopupMenu(popupTable); jTableExitNodes.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jTableExitNodes.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableExitNodesMouseClicked(evt); } }); jScrollPaneExitNodes.setViewportView(jTableExitNodes); jPanelNodeInfo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_info"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelMain.getFont())); // NOI18N jPanelNodeInfo.setFont(jPanelNodeInfo.getFont().deriveFont(jPanelNodeInfo.getFont().getStyle() | java.awt.Font.BOLD)); jLabel5.setFont(jLabel5.getFont().deriveFont(jLabel5.getFont().getStyle() | java.awt.Font.BOLD)); jLabel5.setText(LOCAL.getString("label_bandwidth")); // NOI18N jLabelGuardBw.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelGuardBw.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel10.setFont(jLabel10.getFont().deriveFont(jLabel10.getFont().getStyle() | java.awt.Font.BOLD)); jLabel10.setText(LOCAL.getString("label_stable")); // NOI18N jLabelGuardStable.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelGuardStable.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelGuard.setFont(jLabelGuard.getFont().deriveFont(jLabelGuard.getFont().getStyle() | java.awt.Font.BOLD)); jLabelGuard.setText(LOCAL.getString("label_guard")); // NOI18N jLabel8.setFont(jLabel8.getFont().deriveFont(jLabel8.getFont().getStyle() | java.awt.Font.BOLD)); jLabel8.setText(LOCAL.getString("label_ip")); // NOI18N jLabelGuardNick.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelGuardNick.setBorder(javax.swing.BorderFactory.createEtchedBorder()); java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("resources/MessagesBundle"); // NOI18N jLabelGuardIP.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelGuardIP.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel9.setFont(jLabel9.getFont().deriveFont(jLabel9.getFont().getStyle() | java.awt.Font.BOLD)); jLabel9.setText(LOCAL.getString("label_country")); // NOI18N jLabelGuardCountry.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelGuardCountry.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel12.setFont(jLabel12.getFont().deriveFont(jLabel12.getFont().getStyle() | java.awt.Font.BOLD)); jLabel12.setText(LOCAL.getString("label_nickname")); // NOI18N jLabelExitNick.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelExitNick.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelExitIP.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelExitIP.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelMiddle.setFont(jLabelMiddle.getFont().deriveFont(jLabelMiddle.getFont().getStyle() | java.awt.Font.BOLD)); jLabelMiddle.setText(LOCAL.getString("label_middle")); // NOI18N jLabelExit.setFont(jLabelExit.getFont().deriveFont(jLabelExit.getFont().getStyle() | java.awt.Font.BOLD)); jLabelExit.setText(LOCAL.getString("label_exit")); // NOI18N jLabelMiddleNick.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelMiddleNick.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelMiddleIP.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelMiddleIP.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelMiddleCountry.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelMiddleCountry.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jButtonExitNodeDetails.setText(LOCAL.getString("button_details")); // NOI18N jButtonExitNodeDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonExitNodeDetailsActionPerformed(evt); } }); jButtonGuardNodeDetails.setText(LOCAL.getString("button_details")); // NOI18N jButtonGuardNodeDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGuardNodeDetailsActionPerformed(evt); } }); jButtonMiddleNodeDetails.setText(LOCAL.getString("button_details")); // NOI18N jButtonMiddleNodeDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonMiddleNodeDetailsActionPerformed(evt); } }); jLabelMiddleBw.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelMiddleBw.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelExitBw.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelExitBw.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelMiddleStable.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelMiddleStable.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelExitStable.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelExitStable.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelExitCountry.setText(bundle.getString("textfield_unknown")); // NOI18N jLabelExitCountry.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel4.setFont(jLabel4.getFont().deriveFont(jLabel4.getFont().getStyle() | java.awt.Font.BOLD)); jLabel4.setText(LOCAL.getString("label_torlatency")); // NOI18N jLabelTorLatency.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelTorLatency.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabelStreams.setText(LOCAL.getString("textfield_unknown")); // NOI18N jLabelStreams.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel6.setFont(jLabel6.getFont().deriveFont(jLabel6.getFont().getStyle() | java.awt.Font.BOLD)); jLabel6.setText(LOCAL.getString("label_streams")); // NOI18N javax.swing.GroupLayout jPanelNodeInfoLayout = new javax.swing.GroupLayout(jPanelNodeInfo); jPanelNodeInfo.setLayout(jPanelNodeInfoLayout); jPanelNodeInfoLayout.setHorizontalGroup( jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10) .addComponent(jLabel9) .addComponent(jLabel8) .addComponent(jLabel12) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabelGuard) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonGuardNodeDetails)) .addComponent(jLabelGuardIP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelGuardCountry, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelGuardBw, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelGuardStable, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelGuardNick, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelTorLatency, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabelMiddle) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonMiddleNodeDetails)) .addComponent(jLabelMiddleIP, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelMiddleCountry, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelMiddleBw, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelMiddleStable, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelMiddleNick, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabelExitStable, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelExitBw, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelExitCountry, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addComponent(jLabelExitIP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelStreams, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabelExit) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonExitNodeDetails)) .addComponent(jLabelExitNick, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)) .addContainerGap()) ); jPanelNodeInfoLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel12, jLabel5, jLabel8, jLabel9}); jPanelNodeInfoLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabelExitBw, jLabelExitCountry, jLabelExitIP, jLabelExitNick, jLabelExitStable, jLabelMiddleBw, jLabelMiddleCountry, jLabelMiddleIP, jLabelMiddleStable}); jPanelNodeInfoLayout.setVerticalGroup( jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(jLabelGuard) .addComponent(jButtonGuardNodeDetails) .addComponent(jLabelMiddle) .addComponent(jButtonMiddleNodeDetails) .addComponent(jLabelExit) .addComponent(jButtonExitNodeDetails)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabelExitNick) .addGap(0, 0, 0) .addComponent(jLabelExitIP) .addGap(0, 0, 0) .addComponent(jLabelExitCountry) .addGap(0, 0, 0) .addComponent(jLabelExitBw) .addGap(0, 0, 0) .addComponent(jLabelExitStable)) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addComponent(jLabelMiddleNick) .addGap(0, 0, 0) .addComponent(jLabelMiddleIP) .addGap(0, 0, 0) .addComponent(jLabelMiddleCountry) .addGap(0, 0, 0) .addComponent(jLabelMiddleBw) .addGap(0, 0, 0) .addComponent(jLabelMiddleStable)) .addGroup(jPanelNodeInfoLayout.createSequentialGroup() .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabelGuardNick) .addComponent(jLabel12)) .addGap(0, 0, 0) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabelGuardIP) .addComponent(jLabel8)) .addGap(0, 0, 0) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jLabelGuardCountry)) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jLabelGuardBw)) .addGap(0, 0, 0) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabelGuardStable) .addComponent(jLabel10)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelNodeInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelStreams, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabelTorLatency, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap()) ); jPanelNodeInfoLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabelExitBw, jLabelExitCountry, jLabelExitIP, jLabelExitNick, jLabelExitStable, jLabelGuardBw, jLabelGuardCountry, jLabelGuardIP, jLabelGuardNick, jLabelGuardStable, jLabelMiddleBw, jLabelMiddleCountry, jLabelMiddleIP, jLabelMiddleNick, jLabelMiddleStable}); jButtonSetGuards.setText(LOCAL.getString("button_setguards")); // NOI18N jButtonSetGuards.setToolTipText(LOCAL.getString("button_setguards")); // NOI18N jButtonSetGuards.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSetGuardsActionPerformed(evt); } }); jLabStatus.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabStatus.setText(LOCAL.getString("textfield_unknown")); // NOI18N jButtonClearFavs.setText(LOCAL.getString("button_clearfavs")); // NOI18N jButtonClearFavs.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonClearFavsActionPerformed(evt); } }); javax.swing.GroupLayout jPanelMainLayout = new javax.swing.GroupLayout(jPanelMain); jPanelMain.setLayout(jPanelMainLayout); jPanelMainLayout.setHorizontalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPaneExitNodes) .addComponent(jPanelNodeInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanelMainLayout.createSequentialGroup() .addGroup(jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addComponent(jComboCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButtonSetGuards) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButtonClearFavs)) .addComponent(jLabelCountry)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanelMainLayout.setVerticalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelCountry) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jComboCountry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonSetGuards) .addComponent(jButtonClearFavs)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPaneExitNodes, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelNodeInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabStatus) .addContainerGap()) ); jMenuMenu.setMnemonic(LOCAL.getString("menu_menu").charAt(0)); jMenuMenu.setText(LOCAL.getString("menu_menu")); // NOI18N jMenuItemPrefs.setMnemonic('P'); jMenuItemPrefs.setText(LOCAL.getString("menu_prefs")); // NOI18N jMenuItemPrefs.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPrefsActionPerformed(evt); } }); jMenuMenu.add(jMenuItemPrefs); jMenuItemAddPattern.setText(LOCAL.getString("menu_quickadd")); // NOI18N jMenuItemAddPattern.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemAddPatternActionPerformed(evt); } }); jMenuMenu.add(jMenuItemAddPattern); jMenuItemPatternEdit.setText(LOCAL.getString("menu_patternedit")); // NOI18N jMenuItemPatternEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPatternEditActionPerformed(evt); } }); jMenuMenu.add(jMenuItemPatternEdit); jMenuItemStdout.setText(LOCAL.getString("menu_tormonitor")); // NOI18N jMenuItemStdout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemStdoutActionPerformed(evt); } }); jMenuMenu.add(jMenuItemStdout); jMenuItemExport.setText(LOCAL.getString("menu_export")); // NOI18N jMenuItemExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemExportActionPerformed(evt); } }); jMenuMenu.add(jMenuItemExport); jMenuItemImport.setText(LOCAL.getString("menu_import")); // NOI18N jMenuItemImport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemImportActionPerformed(evt); } }); jMenuMenu.add(jMenuItemImport); jMenuItemGeoip.setText(LOCAL.getString("menu_geoip")); // NOI18N jMenuItemGeoip.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemGeoipActionPerformed(evt); } }); jMenuMenu.add(jMenuItemGeoip); jMenuItemQuit.setMnemonic('Q'); jMenuItemQuit.setText(LOCAL.getString("menu_quit")); // NOI18N jMenuItemQuit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemQuitActionPerformed(evt); } }); jMenuMenu.add(jMenuItemQuit); jMenuBar.add(jMenuMenu); jMenuProxy.setMnemonic(LOCAL.getString("menu_proxy").charAt(0)); jMenuProxy.setText(LOCAL.getString("menu_proxy")); // NOI18N jCheckProxyDisable.setText(LOCAL.getString("combo_proxymode1")); // NOI18N jCheckProxyDisable.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckProxyDisableItemStateChanged(evt); } }); jMenuProxy.add(jCheckProxyDisable); jCheckProxyByPattern.setText(LOCAL.getString("combo_proxymode2")); // NOI18N jCheckProxyByPattern.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckProxyByPatternItemStateChanged(evt); } }); jMenuProxy.add(jCheckProxyByPattern); jCheckProxyAll.setText(LOCAL.getString("combo_proxymode3")); // NOI18N jCheckProxyAll.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckProxyAllItemStateChanged(evt); } }); jMenuProxy.add(jCheckProxyAll); jMenuBar.add(jMenuProxy); jMenuHelp.setMnemonic(LOCAL.getString("menu_help").charAt(0)); jMenuHelp.setText(LOCAL.getString("menu_help")); // NOI18N jMenuItemDebugLog.setVisible(false); jMenuItemDebugLog.setText(LOCAL.getString("menu_debuglog")); // NOI18N jMenuItemDebugLog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemDebugLogActionPerformed(evt); } }); jMenuHelp.add(jMenuItemDebugLog); jMenuItemHelp.setMnemonic('C'); jMenuItemHelp.setText(LOCAL.getString("menu_helpcontents")); // NOI18N jMenuItemHelp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemHelpActionPerformed(evt); } }); jMenuHelp.add(jMenuItemHelp); jMenuItemTorMan.setText(LOCAL.getString("menu_tormanual")); // NOI18N jMenuItemTorMan.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemTorManActionPerformed(evt); } }); jMenuHelp.add(jMenuItemTorMan); jMenuItemTorCheck.setMnemonic('T'); jMenuItemTorCheck.setText(LOCAL.getString("menu_torcheck")); // NOI18N jMenuItemTorCheck.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemTorCheckActionPerformed(evt); } }); jMenuHelp.add(jMenuItemTorCheck); jMenuItemAbout.setMnemonic('A'); jMenuItemAbout.setText(LOCAL.getString("menu_about")); // NOI18N jMenuItemAbout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemAboutActionPerformed(evt); } }); jMenuHelp.add(jMenuItemAbout); jMenuItemLicense.setText(LOCAL.getString("menu_license")); // NOI18N jMenuItemLicense.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemLicenseActionPerformed(evt); } }); jMenuHelp.add(jMenuItemLicense); jMenuBar.add(jMenuHelp); setJMenuBar(jMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// //GEN-END:initComponents private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing if (sp.getBool("PREF_MINONCLOSE")) { // Used to provide clean shut down when a WM_CLOSE and Taskkill are called // posted externally if (!isVisible() && OSFunction.isWindows()) { cleanupExit(); return; } if (sp.getBool("PREF_HIDE_MIN") && sti.isLoaded()) { setVisible(false); } else { setExtendedState(Frame.ICONIFIED); } } else { cleanupExit(); } }//GEN-LAST:event_formWindowClosing private void jComboCountryItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboCountryItemStateChanged switch (evt.getStateChange()) { case ItemEvent.DESELECTED: abortTesting(); break; case ItemEvent.SELECTED: countryChanged(); break; } }//GEN-LAST:event_jComboCountryItemStateChanged private void jMenuItemPrefsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemPrefsActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openPreferencesDialog(); } }); }//GEN-LAST:event_jMenuItemPrefsActionPerformed private void jMenuItemAddPatternActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAddPatternActionPerformed openQuickAddDialog(); }//GEN-LAST:event_jMenuItemAddPatternActionPerformed private void jMenuItemPatternEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemPatternEditActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openPatternEditorDialog(); } }); }//GEN-LAST:event_jMenuItemPatternEditActionPerformed private void jMenuItemImportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemImportActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openPatternImport(); } }); }//GEN-LAST:event_jMenuItemImportActionPerformed private void jMenuItemQuitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemQuitActionPerformed cleanupExit(); }//GEN-LAST:event_jMenuItemQuitActionPerformed private void jMenuItemDebugLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemDebugLogActionPerformed Utilities.editFile(settingsPath + "status.log"); }//GEN-LAST:event_jMenuItemDebugLogActionPerformed private void jMenuItemHelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemHelpActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { Utilities.openFileExternally(DOCSPATH + "help-" + OSFunction.getLangCode() + ".html"); } }); }//GEN-LAST:event_jMenuItemHelpActionPerformed private void jMenuItemTorCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTorCheckActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { String link = TORCHECK + "?lang=" + LOCAL.toWebLanguageTag(); Utilities.openFileExternally(link); } }); }//GEN-LAST:event_jMenuItemTorCheckActionPerformed private void jMenuItemAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAboutActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openAboutDialog(); } }); }//GEN-LAST:event_jMenuItemAboutActionPerformed private void jMenuItemLicenseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemLicenseActionPerformed openLicenseDialog(); }//GEN-LAST:event_jMenuItemLicenseActionPerformed private void jMenuWhoisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuWhoisActionPerformed String finger = (String) entm.getValueAt(intRowSelected, 5); NodeItem ni = nodeList.getNode(finger); if (ni != null) { Utilities.openFileExternally("https://www.networksolutions.com/whois/results.jsp?ip=" + ni.getIPAddress()); } }//GEN-LAST:event_jMenuWhoisActionPerformed private void jMenuTestingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuTestingActionPerformed abortTesting(); intBeginTesting = 4; }//GEN-LAST:event_jMenuTestingActionPerformed private void popupTablePopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_popupTablePopupMenuWillBecomeVisible jMenuWhois.setEnabled(intRowSelected > -1); jMenuNodeDetails.setEnabled(intRowSelected > -1); }//GEN-LAST:event_popupTablePopupMenuWillBecomeVisible private void jMenuNodeDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuNodeDetailsActionPerformed String finger = (String) entm.getValueAt(intRowSelected, 5); finger = finger.replace("$", EMPTYSTR); Utilities.openFileExternally(ATLAS + "#details/" + finger); }//GEN-LAST:event_jMenuNodeDetailsActionPerformed private void jButtonExitNodeDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonExitNodeDetailsActionPerformed String finger = niActiveExit.getFingerprint(); finger = finger.replace("$", EMPTYSTR); Utilities.openFileExternally(ATLAS + "#details/" + finger); }//GEN-LAST:event_jButtonExitNodeDetailsActionPerformed private void jMenuItemStdoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemStdoutActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openTorMonitor(); } }); }//GEN-LAST:event_jMenuItemStdoutActionPerformed private void jMenuItemTorManActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemTorManActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { Utilities.openFileExternally(TORPROJECT + "docs/tor-manual.html"); } }); }//GEN-LAST:event_jMenuItemTorManActionPerformed private void jButtonGuardNodeDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGuardNodeDetailsActionPerformed String finger = niActiveGuard.getFingerprint(); finger = finger.replace("$", EMPTYSTR); Utilities.openFileExternally(ATLAS + "#details/" + finger); }//GEN-LAST:event_jButtonGuardNodeDetailsActionPerformed private void jButtonSetGuardsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSetGuardsActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openGuardsSettingDialog(); } }); }//GEN-LAST:event_jButtonSetGuardsActionPerformed private void jMenuItemGUIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemGUIActionPerformed toggleGUIVisibility(); }//GEN-LAST:event_jMenuItemGUIActionPerformed private void jMenuItemQuitxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemQuitxActionPerformed cleanupExit(); }//GEN-LAST:event_jMenuItemQuitxActionPerformed private void jButtonMiddleNodeDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMiddleNodeDetailsActionPerformed String finger = niActiveMiddle.getFingerprint(); finger = finger.replace("$", EMPTYSTR); Utilities.openFileExternally(ATLAS + "#details/" + finger); }//GEN-LAST:event_jButtonMiddleNodeDetailsActionPerformed private void jMenuItemExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemExportActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { openPatternExport(); } }); }//GEN-LAST:event_jMenuItemExportActionPerformed private void jCheckProxyDisableItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckProxyDisableItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckTrayProxyDisable.setSelected(true); if (jCheckProxyDisable.isEnabled()) { proxyModeChanged(PacFactory.PROXY_DISABLED); } } }//GEN-LAST:event_jCheckProxyDisableItemStateChanged private void jCheckProxyByPatternItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckProxyByPatternItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckTrayProxyByPattern.setSelected(true); if (jCheckProxyByPattern.isEnabled()) { proxyModeChanged(PacFactory.PROXY_PATTERN); } } }//GEN-LAST:event_jCheckProxyByPatternItemStateChanged private void jCheckProxyAllItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckProxyAllItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckTrayProxyAll.setSelected(true); if (jCheckProxyAll.isEnabled()) { proxyModeChanged(PacFactory.PROXY_ALL); } } }//GEN-LAST:event_jCheckProxyAllItemStateChanged private void jCheckTrayProxyDisableItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckTrayProxyDisableItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckProxyDisable.setSelected(true); } }//GEN-LAST:event_jCheckTrayProxyDisableItemStateChanged private void jCheckTrayProxyByPatternItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckTrayProxyByPatternItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckProxyByPattern.setSelected(true); } }//GEN-LAST:event_jCheckTrayProxyByPatternItemStateChanged private void jCheckTrayProxyAllItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckTrayProxyAllItemStateChanged if (evt.getStateChange() == ItemEvent.SELECTED) { jCheckProxyAll.setSelected(true); } }//GEN-LAST:event_jCheckTrayProxyAllItemStateChanged private void jMenuItemGeoipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemGeoipActionPerformed SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { updateGeoip(); } }); }//GEN-LAST:event_jMenuItemGeoipActionPerformed private void jButtonClearFavsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonClearFavsActionPerformed clearFavourites(); }//GEN-LAST:event_jButtonClearFavsActionPerformed private void jTableExitNodesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableExitNodesMouseClicked if (evt.getButton() != MouseEvent.BUTTON1) { return; } try { // Get row selection intRowSelected = jTableExitNodes.getSelectedRow(); if (intRowSelected > -1) { intRowSelected = jTableExitNodes.convertRowIndexToModel(intRowSelected); } } catch (Exception ex) { } }//GEN-LAST:event_jTableExitNodesMouseClicked // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.ButtonGroup buttonGroupProxy; private javax.swing.ButtonGroup buttonGroupProxyTray; private javax.swing.JButton jButtonClearFavs; private javax.swing.JButton jButtonExitNodeDetails; private javax.swing.JButton jButtonGuardNodeDetails; private javax.swing.JButton jButtonMiddleNodeDetails; private javax.swing.JButton jButtonSetGuards; private javax.swing.JCheckBoxMenuItem jCheckProxyAll; private javax.swing.JCheckBoxMenuItem jCheckProxyByPattern; private javax.swing.JCheckBoxMenuItem jCheckProxyDisable; private javax.swing.JCheckBoxMenuItem jCheckTrayProxyAll; private javax.swing.JCheckBoxMenuItem jCheckTrayProxyByPattern; private javax.swing.JCheckBoxMenuItem jCheckTrayProxyDisable; private javax.swing.JComboBox jComboCountry; private javax.swing.JLabel jLabStatus; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JLabel jLabelCountry; private javax.swing.JLabel jLabelExit; private javax.swing.JLabel jLabelExitBw; private javax.swing.JLabel jLabelExitCountry; private javax.swing.JLabel jLabelExitIP; private javax.swing.JLabel jLabelExitNick; private javax.swing.JLabel jLabelExitStable; private javax.swing.JLabel jLabelGuard; private javax.swing.JLabel jLabelGuardBw; private javax.swing.JLabel jLabelGuardCountry; private javax.swing.JLabel jLabelGuardIP; private javax.swing.JLabel jLabelGuardNick; private javax.swing.JLabel jLabelGuardStable; private javax.swing.JLabel jLabelMiddle; private javax.swing.JLabel jLabelMiddleBw; private javax.swing.JLabel jLabelMiddleCountry; private javax.swing.JLabel jLabelMiddleIP; private javax.swing.JLabel jLabelMiddleNick; private javax.swing.JLabel jLabelMiddleStable; private javax.swing.JLabel jLabelStreams; private javax.swing.JLabel jLabelTorLatency; private javax.swing.JMenuBar jMenuBar; private javax.swing.JMenu jMenuHelp; private javax.swing.JMenuItem jMenuItemAbout; private javax.swing.JMenuItem jMenuItemAddPattern; private javax.swing.JMenuItem jMenuItemDebugLog; private javax.swing.JMenuItem jMenuItemExport; private javax.swing.JMenuItem jMenuItemGUI; private javax.swing.JMenuItem jMenuItemGeoip; private javax.swing.JMenuItem jMenuItemHelp; private javax.swing.JMenuItem jMenuItemImport; private javax.swing.JMenuItem jMenuItemLicense; private javax.swing.JMenuItem jMenuItemPatternEdit; private javax.swing.JMenuItem jMenuItemPrefs; private javax.swing.JMenuItem jMenuItemQuit; private javax.swing.JMenuItem jMenuItemQuitx; private javax.swing.JMenuItem jMenuItemStdout; private javax.swing.JMenuItem jMenuItemTorCheck; private javax.swing.JMenuItem jMenuItemTorMan; private javax.swing.JMenu jMenuMenu; private javax.swing.JMenuItem jMenuNodeDetails; private javax.swing.JMenu jMenuProxy; private javax.swing.JMenuItem jMenuTesting; private javax.swing.JMenuItem jMenuWhois; private javax.swing.JPanel jPanelMain; private javax.swing.JPanel jPanelNodeInfo; private javax.swing.JScrollPane jScrollPaneExitNodes; private javax.swing.JTable jTableExitNodes; private javax.swing.JPopupMenu popupTable; // End of variables declaration//GEN-END:variables } selektor-3.13.73/src/client/GuardNodeTableModel.java0000644000175000017500000001166313302030722021550 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.swing.table.DefaultTableModel; /** * * @author Alistair Neil */ public class GuardNodeTableModel extends DefaultTableModel { private final List salFinger = Collections.synchronizedList(new ArrayList()); private final String[] columnNames = {"GuardNode", "Country", "BW (MB\\s)", "Trusted"}; private NodeItem ni; private int enabledcount; public GuardNodeTableModel() { } public int getEnabledCount() { return enabledcount; } /** * Clear the table model of all data */ public void clear() { getDataVector().clear(); salFinger.clear(); enabledcount = 0; } /** * Get the number of columns * * @return columns as integer */ @Override public int getColumnCount() { return columnNames.length; } /** * Test if the cell is editable * * @param row Cell row * @param col Cell column * @return True if editable */ @Override public boolean isCellEditable(int row, int col) { return col == 3; } /** * Set value with given fingerprint at given column * * @param value Value * @param finger Fingerprint * @param col Column */ public void setValueAt(Object value, String finger, int col) { setValueAt(value, salFinger.indexOf(finger), col); } /** * Set cell value at row,col * * @param value * @param row * @param col */ @Override public void setValueAt(Object value, int row, int col) { try { ni = (NodeItem) super.getValueAt(row, 0); if (col == 3) { ni.setGuardEnabled((Boolean) value); if (ni.isGuardEnabled()) { enabledcount++; } else { if (enabledcount > 0) { enabledcount--; } } fireTableCellUpdated(row, col); } } catch (Exception ex) { } } /** * Get cell value as object at row,col * * @param row * @param col * @return value as object */ @Override public Object getValueAt(int row, int col) { ni = (NodeItem) super.getValueAt(row, 0); Object obj = null; switch (col) { case 0: obj = ni.getNickName(); break; case 1: obj = ni.getCountryName(); break; case 2: obj = ni.getBandwidth(); break; case 3: obj = ni.isGuardEnabled(); break; case 4: obj = ni.getFingerprint(); break; } return obj; } /** * Add rowdata with given data object array * * @param rowData */ @Override public void addRow(Object[] rowData) { super.addRow(rowData); ni = (NodeItem) rowData[0]; if (ni.isGuardEnabled()) { enabledcount++; } salFinger.add(ni.getFingerprint()); } /** * Get column name at given index * * @param index * @return name as string */ @Override public String getColumnName(int index) { return columnNames[index]; } /** * Set the column name at the specified index * * @param name * @param index */ public void setColumnName(String name, int index) { if (index < columnNames.length) { columnNames[index] = name; } } /** * Get column class at given index * * @param index * @return Class */ @Override public Class getColumnClass(int index) { Class cl; switch (index) { case 2: cl = Float.class; break; case 3: cl = Boolean.class; break; default: cl = String.class; break; } return cl; } } selektor-3.13.73/src/client/TorCircuit.java0000644000175000017500000001245213302030722020033 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.util.regex.Pattern; /** * * @author Alistair Neil */ public final class TorCircuit { public static final int FINGER = 0; public static final int NICKNAME = 1; private String[] dataCirc; private String[] dataHops; private String circuitinfo; /** * Constructor */ public TorCircuit() { } /** * Constructor, Create circuit object with given circuit * * @param circuit */ public TorCircuit(String circuit) { setCircuit(circuit); } /** * Set circuit to supplied circuit * * @param circuit */ public void setCircuit(String circuit) { circuitinfo = circuit; Pattern pattern = Pattern.compile(" "); dataCirc = pattern.split(circuit); setHops(dataCirc[2]); } /** * Get circuit * * @return circuit as string */ public String getCircuit() { return circuitinfo; } /** * Set hops * * @param hops */ public void setHops(String hops) { Pattern pattern = Pattern.compile(","); dataHops = pattern.split(hops); } /** * Get current circuit ID * * @return ID as string */ public String getID() { return dataCirc[0]; } /** * Get current circuit status * * @return status as string */ public String getStatus() { return dataCirc[1]; } /** * Get current circuits build flags * * @return build flags as string */ public String getBuildFlags() { return dataCirc[3].substring(12); } /** * Get current circuits purpose * * @return purpose as string */ public String getPurpose() { return dataCirc[4].substring(8); } /** * Get current circuits timestamp * * @return timestamp as string */ public String getTimestamp() { return dataCirc[5].substring(13); } /** * Get circuit hops * * @return circuit hops as string */ public String getHops() { return dataCirc[2]; } /** * Get current circuits guard or entry node * * @return guard node as string */ public String getGuardHop() { String result = null; try { result = dataHops[0]; } catch (Exception ex) { } return result; } /** * Get current circuits middle node if any, returns exit node for a two hop * circuit * * @return middleman node as string */ public String getMiddleHop() { String result = null; try { if (dataHops.length < 3) { result = ""; } else { result = dataHops[1]; } } catch (Exception ex) { } return result; } /** * Get current circuits exit node * * @return exit node as string */ public String getExitHop() { String result = null; try { result = dataHops[dataHops.length - 1]; } catch (Exception ex) { } return result; } /** * Get Guardnode finger or nick * * @param type 0 = finger, 1 = nick * @return fingerprint as string */ public String getGuard(int type) { return getFromNodeHop(getGuardHop(), type); } /** * Get Middleman * * @param type 0 = finger, 1 = nick * @return fingerprint as string */ public String getMiddleMan(int type) { return getFromNodeHop(getMiddleHop(), type); } /** * Get Exitnode * * @param type 0 = finger, 1 = nick * @return fingerprint as string */ public String getExit(int type) { return getFromNodeHop(getExitHop(), type); } /** * Get fingerprint of given node Nodeinfo is in the format of * fingerprint~name or fingerprint=name * * @param nodeinfo * @param type 0 = finger, 1 = nickname * @return fingerprint as string */ public static String getFromNodeHop(String nodeinfo, int type) { Pattern pattern; try { if (nodeinfo.contains("~")) { pattern = Pattern.compile("~"); } else { pattern = Pattern.compile("="); } String[] result = pattern.split(nodeinfo); if (result.length > 0) { return result[type]; } } catch (Exception ex) { } return null; } } selektor-3.13.73/src/client/TorMonFrame.form0000644000175000017500000002277613302030722020171 0ustar bannorbannor
selektor-3.13.73/src/client/SelekTOR.form0000644000175000017500000020372013302030722017416 0ustar bannorbannor
selektor-3.13.73/src/client/NodeList.java0000644000175000017500000006047513302030722017475 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.text.Collator; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.regex.Pattern; import lib.Localisation; import lib.SimpleFile; /** * * @author Alistair Neil */ public class NodeList { public static final int NODELIST_IDLE = 0; public static final int NODELIST_BUILDING = 1; public static final int NODELIST_BUILT = 2; public static final int NODELIST_FAILED = 3; public static final int NODELIST_TERMINATED = 4; private static final String EMPTYSTRING = ""; private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); private ExitNodeTableModel entm; private GuardNodeTableModel gntm; private int intStatus = NODELIST_IDLE; private HashMap hmNode; private final HashMap hmBridges; private final ArrayList alCountries; private TorController tc; private final String exitFavouritesFile; private final String guardFavouritesFile; private final String filepath; private volatile boolean boolAbortActions; private final Pattern pattspace = Pattern.compile(" "); private int nooffavs; public NodeList(String filepath, String exitfavourites, String guardfavouritesfile) { this.hmNode = new HashMap<>(); this.hmBridges = new HashMap<>(); this.filepath = filepath; this.alCountries = new ArrayList<>(); this.exitFavouritesFile = exitfavourites; this.guardFavouritesFile = guardfavouritesfile; } /** * Get node item from its fingerprint * * @param key or fingerprint * @return NodeItem */ public final NodeItem getNode(String key) { String temp; NodeItem ni = hmNode.get(key); if (ni == null) { // No bridge found so must be a new node not currently in nodelist ArrayList alRouterInfo = getRouterDesc(key); if (alRouterInfo != null) { alRouterInfo.addAll(getRouterStatus(key)); ni = new NodeItem(); temp = filterRouterInfo(alRouterInfo, "router "); if (temp == null) { return null; } String[] data = pattspace.split(temp); ni.setFingerprint(key); ni.setNickName(data[0]); ni.setIPAddress(data[1]); String isocode = tc.getCountryFromIP(ni.getIPAddress()); if (isocode == null || isocode.contentEquals("??")) { isocode = "U1"; } ni.setCountryCode(isocode); ni.setCountryName(LOCAL.getDisplayCountry(isocode)); temp = filterRouterInfo(alRouterInfo, "bandwidth "); data = pattspace.split(temp); ni.setBandwidth(getLowestBandwidth(data)); temp = filterRouterInfo(alRouterInfo, "s "); if (temp == null) { // We probably have a bridge ni.setType(NodeItem.TYPE_GUARD); ni.setStable(LOCAL.getString("text_yes")); return ni; } if (temp.contains("Guard")) { ni.setType(NodeItem.TYPE_GUARD); } if (temp.contains("Stable")) { ni.setStable(LOCAL.getString("text_yes")); } else { ni.setStable(LOCAL.getString("text_no")); } if (temp.contains("Exit") && !temp.contains("BadExit")) { ni.setType(NodeItem.TYPE_EXIT); temp = filterRouterInfo(alRouterInfo, "p "); if (temp.startsWith("accept")) { temp = temp.replace("accept ", ""); if (!containsPort(temp, 80) && !containsPort(temp, 443)) { return ni; } } else { temp = temp.replace("reject ", ""); if (containsPort(temp, 80) || containsPort(temp, 443)) { return ni; } } ni.setHttpSupported(true); } } } return ni; } public ArrayList getRouterDesc(String finger) { ArrayList alResult = tc.getInfo("desc/id/" + finger); if (alResult == null) { return null; } alResult.remove("250 OK"); if (alResult.isEmpty()) { return null; } return alResult; } public ArrayList getRouterStatus(String finger) { ArrayList alResult = tc.getInfo("ns/id/" + finger); if (alResult == null) { return null; } alResult.remove("250 OK"); if (alResult.isEmpty()) { return null; } return alResult; } public String filterRouterInfo(ArrayList alInfo, String field) { for (String s : alInfo) { if (s.startsWith(field)) { return s.replace(field, ""); } } return null; } /** * Get the process status * * @return status */ public final int getCurrentStatus() { return intStatus; } /** * Generate the nodelist * * @param tc */ public final void refreshNodelist(TorController tc) { boolAbortActions = false; intStatus = NODELIST_BUILDING; this.tc = tc; boolean boolSuccess = populateNodeMap(); if (boolSuccess) { boolSuccess = fetchFingerData(); } if (boolSuccess) { intStatus = NODELIST_BUILT; } else if (boolAbortActions) { intStatus = NODELIST_TERMINATED; } else { intStatus = NODELIST_FAILED; } } /** * Update internal node mappings * */ private boolean populateNodeMap() { String strFlags; String data[]; String temp; String strNick; String strIP; String strCountryName; String strCountryCode; String strPerms; String strDirPort; String strOrPort; NodeItem ni; SimpleFile sfConsensus = new SimpleFile(tc.getDataFolder() + SimpleFile.getSeparator() + "cached-consensus"); hmNode.clear(); alCountries.clear(); sfConsensus.openBufferedRead(); while (!boolAbortActions) { temp = sfConsensus.readLine(); // Test for end of node info file if (temp.startsWith("directory-footer")) { break; } // Test for node info line if (temp.startsWith("r ")) { data = pattspace.split(temp); strNick = data[1]; strIP = data[6]; strOrPort = data[7]; strDirPort = data[8]; // Read flags line while (true) { strFlags = sfConsensus.readLine(); if (strFlags.startsWith("s ")) { break; } } // Ignore certain types of node if (!strFlags.contains("Running") || !strFlags.contains("Valid")) { continue; } // Read port permissions line while (true) { strPerms = sfConsensus.readLine(); if (strPerms.startsWith("p ")) { break; } } // Check if Tor is fully active if (tc.getStatus() < TorController.STATUS_IDLE) { boolAbortActions = false; alCountries.clear(); break; } // Get country code from ip address strCountryCode = tc.getCountryFromIP(strIP); if (strCountryCode == null || strCountryCode.contains("??")) { strCountryCode = "U1"; } // If we get GEOIP errors then abort if (strCountryCode.startsWith("551 GEOIP")) { alCountries.clear(); break; } // Get country name strCountryName = LOCAL.getDisplayCountry(strCountryCode); ni = new NodeItem(); // Update our node item fields now that we have validated our node ni.setCountryCode(strCountryCode); ni.setCountryName(strCountryName); ni.setNickName(strNick); ni.setIPAddress(strIP); // Get stableflag if (strFlags.contains("Stable")) { ni.setStable(LOCAL.getString("text_yes")); } else { ni.setStable(LOCAL.getString("text_no")); } hmNode.put(strOrPort + strDirPort + ":" + strIP, ni); // Check if a guard node if (strFlags.contains("Guard")) { ni.setType(NodeItem.TYPE_GUARD); } // Check if an exit node also exclude nodes flagged as bad exits if (strFlags.contains("Exit") && !strFlags.contains("BadExit")) { ni.setType(NodeItem.TYPE_EXIT); // Simple test on port permissions, we will only allow node // if it accepts connections on port 80 and 443 for web browsing if (strPerms.startsWith("p accept")) { strPerms = strPerms.replace("p accept ", ""); if (!containsPort(strPerms, 80)) { continue; } if (!containsPort(strPerms, 443)) { continue; } } else { strPerms = strPerms.replace("p reject ", ""); if (containsPort(strPerms, 80)) { continue; } if (containsPort(strPerms, 443)) { continue; } } ni.setHttpSupported(true); // Ensure we only add exit country info in once to validated countries list if (!alCountries.contains(strCountryCode + "," + strCountryName)) { alCountries.add(strCountryCode + "," + strCountryName); } } } } sfConsensus.closeFile(); // Sort our country validation list if (alCountries.isEmpty()) { return false; } else { Collections.sort(alCountries, Collator.getInstance()); } return !boolAbortActions; } /** * Update internal finger mappings * */ private boolean fetchFingerData() { int idx; String line; String data[]; String ipaddress; String finger; String strOrPort; String strDirPort; String key; boolean result; String guardwhitelist = getGuardFavouritesAsCSV(); NodeItem ni; HashMap hmNodeReplacement = new HashMap<>(); SimpleFile sfDescriptors = new SimpleFile(tc.getDataFolder() + SimpleFile.getSeparator() + "cached-descriptors"); SimpleFile sfDescriptorsNew = new SimpleFile(tc.getDataFolder() + SimpleFile.getSeparator() + "cached-descriptors.new"); if (!sfDescriptorsNew.exists() || sfDescriptorsNew.getFile().length() == 0) { sfDescriptorsNew = null; } sfDescriptors.openBufferedRead(); try { while (!boolAbortActions) { line = sfDescriptors.readLine(); // If line is null we have then processed the main descriptors file if (line == null) { // Check if their is a descriptors new file if (sfDescriptorsNew == null) { break; } else { sfDescriptors.closeFile(); sfDescriptors = sfDescriptorsNew; sfDescriptors.openBufferedRead(); sfDescriptorsNew = null; continue; } } if (line.startsWith("router ")) { data = pattspace.split(line); ipaddress = data[2]; strOrPort = data[3]; strDirPort = data[5]; key = strOrPort + strDirPort + ":"; if (!hmNode.containsKey(key + ipaddress)) { continue; } // Get fingerprint while (true) { line = sfDescriptors.readLine(); idx = line.indexOf("fingerprint"); if (idx > -1) { line = line.substring(idx + 12); break; } } finger = "$" + line.replace(" ", EMPTYSTRING); // Get bandwidth while (true) { line = sfDescriptors.readLine(); idx = line.indexOf("bandwidth"); if (idx > -1) { line = line.substring(idx + 10); break; } } data = pattspace.split(line); ni = hmNode.get(key + ipaddress); ni.setFingerprint(finger); ni.setGuardEnabled(guardwhitelist.contains(finger)); ni.setBandwidth(getLowestBandwidth(data)); hmNodeReplacement.put(finger, ni); } } result = !boolAbortActions; } catch (Exception ex) { result = false; } sfDescriptors.closeFile(); // Replace our original ipaddress keyed nodemap with our fingerprint keyed nodemap hmNode = hmNodeReplacement; return result; } /** * Return the lowest bandwidth * * @param data * @return bandwidth as float */ private float getLowestBandwidth(String[] data) { float bw = 1000000; float tmp; for (String s : data) { tmp = Float.parseFloat(s) / 1000000; if (tmp < bw) { bw = tmp; } } return bw; } /** * Add newly learned bridge to nodelist * * @param bridgedata */ public void addBridge(String bridgedata) { Pattern pat = Pattern.compile(" "); bridgedata = bridgedata.substring(bridgedata.indexOf('$')); String[] data = pat.split(bridgedata); int index = data[0].indexOf('~'); if (index < 0) { index = data[0].indexOf('='); } NodeItem ni = new NodeItem(); ni.setFingerprint(data[0].substring(0, index)); ni.setIPAddress(data[2]); ni.setNickName(data[0].substring(index + 1)); hmBridges.put(ni.getFingerprint(), ni); } /** * Clear any learned bridges */ public void clearBridges() { hmBridges.clear(); } /** * Test to check supplied data contains the specified port * * @param data * @param port * @return True if data contains specified port */ private boolean containsPort(String data, int port) { String strRanges[]; String[] strPorts; int rangemin; int rangemax; Pattern pattcomma = Pattern.compile(","); Pattern pattminus = Pattern.compile("-"); strRanges = pattcomma.split(data); for (String s : strRanges) { // Test to see if its a range of ports if (s.contains("-")) { strPorts = pattminus.split(s); rangemin = Integer.parseInt(strPorts[0]); rangemax = Integer.parseInt(strPorts[1]); if (port >= rangemin && port <= rangemax) { return true; } } else { // We have a single port rangemin = Integer.parseInt(s); if (port == rangemin) { return true; } } } return false; } /** * Gets validated countries, a valid country is any country with active exit * nodes * * @return String array of countries */ public final String[] getValidatedCountries() { return alCountries.toArray(new String[alCountries.size()]); } /** * Gets validated country codes, a valid country is any country with active * exit nodes * * @return String array of country abbreviations */ public final String[] getValidatedCountryCodes() { String[] result = new String[alCountries.size()]; int idx = 0; for (String s : alCountries) { result[idx++] = s.substring(0, 2); } return result; } /** * Set the guard node view table model * * @param gntm */ public final void setGuardNodeTableModel(GuardNodeTableModel gntm) { this.gntm = gntm; } /** * Set the exit node view table model * * @param entm */ public final void setExitNodeTableModel(ExitNodeTableModel entm) { this.entm = entm; } /** * Get a list of exitnodes, if all is false then it returns only favourited * nodes, if omitfailednodes is true then don't include nodes that failed * testing * * @param all * @param omitfailednodes * @return ArrayList of exit nodes */ public final ArrayList getExitNodes(boolean all, boolean omitfailednodes) { ArrayList al = new ArrayList<>(); for (int i = 0; i < entm.getRowCount(); i++) { int teststatus = (Integer) entm.getValueAt(i, 7); if (omitfailednodes && teststatus == NodeItem.TESTSTATUS_FAILED) { continue; } boolean fave = (Boolean) entm.getValueAt(i, 4) | all; if (fave) { al.add((String) entm.getValueAt(i, 5)); } } return al; } /** * Get a string of comma separated exitnodes, if all is false then it * returns only favourited nodes, if omitfailednodes is true then don't * include nodes that failed testing * * @param all * @param omitfailednodes * @return String of exitnodes in csv format */ public final String getExitNodesAsString(boolean all, boolean omitfailednodes) { String result = getExitNodes(all, omitfailednodes).toString(); result = result.replace("[", "").replace(" ", "").replace("]", ""); return result; } /** * Get a list of all guard nodes guard nodes * * @return ArrayList of guard nodes */ public final ArrayList getGuardNodes() { ArrayList al = new ArrayList<>(); if (gntm == null) { return al; } for (int i = 0; i < gntm.getRowCount(); i++) { al.add((String) gntm.getValueAt(i, 3)); } return al; } /** * Get guard favourites * * @return CSV string of guard entry fingerprints */ public final String getGuardFavouritesAsCSV() { StringBuilder sbResult = new StringBuilder(); String line; String sep = ""; if (guardFavouritesFile == null) { return sbResult.toString(); } SimpleFile sf = new SimpleFile(filepath + guardFavouritesFile); if (!sf.exists()) { return sbResult.toString(); } sf.openBufferedRead(); while ((line = sf.readLine()) != null) { sbResult.append(sep); sbResult.append(line); if (sep.isEmpty()) { sep = ","; } } sf.closeFile(); return sbResult.toString(); } /** * Update the guard node table model */ public final void refreshGuardTableModel() { if (gntm == null) { return; } NodeItem ni; gntm.clear(); // Populate model for (String s : hmNode.keySet()) { ni = hmNode.get(s); if (ni.isGuard()) { Object[] rowData = new Object[]{ni}; gntm.addRow(rowData); } } } /** * Update the table model based on supplied country * * * @param isocountry in the format "GB,Great Britain" */ public final void refreshExitTableModel(String isocountry) { if (entm == null) { return; } NodeItem ni; entm.clear(); String abbrv = isocountry; String favourites = ""; if (exitFavouritesFile != null) { SimpleFile sf = new SimpleFile(filepath + exitFavouritesFile); if (sf.exists()) { sf.openBufferedRead(); favourites = sf.readEntireFile().trim(); sf.closeFile(); } } // Populate model nooffavs = 0; for (String s : hmNode.keySet()) { ni = hmNode.get(s); if (ni.isExit() && ni.isHttpSupported() && ni.getCountryCode().contentEquals(abbrv)) { ni.setLatency(9999); ni.setTestingMessage(LOCAL.getString("textfield_unknown")); // Whitelisting here ni.setFavouriteEnabled(favourites.contains(ni.getIPAddress())); if (ni.isFavourite()) { nooffavs++; } Object[] rowData = new Object[]{ni}; entm.addRow(rowData); } } } /** * Get the number of active favourites * * @return number of favs as int */ public int getNumberOfFavs() { return nooffavs; } /** * Ensures any threaded actions will terminate themselves */ public final void terminate() { boolAbortActions = true; } /** * Save exit node whitelist */ public void saveExitFavourites() { if (exitFavouritesFile == null) { return; } SimpleFile sf = new SimpleFile(filepath + exitFavouritesFile); sf.openBufferedWrite(); NodeItem ni; nooffavs = 0; for (String s : hmNode.keySet()) { ni = hmNode.get(s); if (ni.isExit() && ni.isFavourite()) { nooffavs++; sf.writeFile(ni.getIPAddress(), 1); } } sf.closeFile(); } /** * Save exit node blacklist * * @return number of active guards */ public int saveGuardWhitelist() { int activeguards = 0; if (guardFavouritesFile == null) { return activeguards; } SimpleFile sf = new SimpleFile(filepath + guardFavouritesFile); sf.openBufferedWrite(); NodeItem ni; for (String s : hmNode.keySet()) { ni = hmNode.get(s); if (ni.isGuard() && ni.isGuardEnabled()) { sf.writeFile(ni.getFingerprint(), 1); activeguards++; } } sf.closeFile(); return activeguards; } } selektor-3.13.73/src/client/PacFactory.java0000644000175000017500000005361613302030722020006 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.io.File; import java.util.ArrayList; import java.util.Random; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; import lib.OSFunction; import lib.SimpleFile; /** * * @author Alistair Neil */ public class PacFactory { public static final String FILEUSER = "user"; private static final String FILEEXT = ".txt"; public static final int PROXY_DISABLED = 0; public static final int PROXY_PATTERN = 1; public static final int PROXY_ALL = 2; private static final String PACFILE_EXT = ".pac"; private static final String PATTERNFIRSTLINE = "### Pattern File, Do not remove or modify this line ###"; private String strKDEProxyPrefsBackup; private String strGnome3ProxyPrefsBackup; private String strPACPath; private String strBackupFolder; private String strPatternsFolder; private String strTempFolder; private String strDefaultProxy = ""; private String strDoNotProxy = ""; private String strActiveCountry; private String strActivePacName = ""; private final Random randgen; public PacFactory() { randgen = new Random(System.currentTimeMillis()); } /** * Get the active country code * * @return Active country */ public String getActiveCountry() { return strActiveCountry; } /** * Create and/or activate a pacfile for a specific country * * @param isocountry * @param port */ public void createPacFile(String isocountry, int port) { // Generate a pseudo random pac name String pacname = createRandomName() + PACFILE_EXT; savePACFile(pacname, getPacRules(isocountry, String.valueOf(port))); setProxyAutoConfigURL("file://" + strPACPath.replace("\\", "/") + pacname); strActiveCountry = isocountry; if (!strActivePacName.isEmpty()) { this.deletePAC(strActivePacName); } strActivePacName = pacname; } /** * Get pac rules for a specific country Can also be used for getting direct * rule and proxy all rules, by setting countrycode to "direct" or * "proxyall" * * @param countrycode * @param port * @return An arraylist of rules */ private ArrayList getPacRules(String country, String port) { ArrayList result = new ArrayList<>(); // If country code is null then generate proxy all traffic rules if (country.contentEquals("proxyall")) { addSocksRule(result, "127.0.0.1", port); return result; } if (country.contentEquals("direct")) { addDirectMatchingRule(result, null); return result; } Pattern pat = Pattern.compile(","); String[] split; // Create our pattern rules storage list ArrayList patternrules = new ArrayList<>(); // Add in do not proxy rules if (!strDoNotProxy.isEmpty()) { split = pat.split(strDoNotProxy); for (String s : split) { if (!s.isEmpty()) { addDirectMatchingRule(result, "*" + s + "*"); } } } // Get default patterns loadPatternsList(country, patternrules); for (String s : patternrules) { split = pat.split(s); if (split.length < 3) { break; } if (split[2].contentEquals("true")) { if (split[1].contentEquals("*")) { addSocksRule(result, "127.0.0.1", port); return result; } else { addSocksMatchingRule(result, split[1], "127.0.0.1", port); } } } if (strDefaultProxy.isEmpty()) { addDirectMatchingRule(result, null); } else { addProxyRule(result, strDefaultProxy); } return result; } /** * * @param rules * @param proxy */ public void addProxyRule(ArrayList rules, String proxy) { rules.add("\treturn \"PROXY " + proxy + "\";"); } /** * Add a socks rule to a supplied list * * @param rules * @param host * @param port */ public void addSocksRule(ArrayList rules, String host, String port) { String rule = "\treturn \"SOCKS5 " + host + ":" + port + "\";"; rules.add(rule); } /** * * @param rules * @param pattern */ public void addDirectMatchingRule(ArrayList rules, String pattern) { String rule; if (pattern == null) { rule = "\treturn \"DIRECT\";"; } else { rule = "\tif (shExpMatch(url, \"" + pattern + "\"))\n" + "\t{\n" + "\t\treturn \"DIRECT\";\n" + "\t}"; } rules.add(rule); } /** * Add socks pattern mayching rule to a supllied list * * @param rules * @param pattern * @param host * @param port */ public void addSocksMatchingRule(ArrayList rules, String pattern, String host, String port) { String rule = "\tif (shExpMatch(url, \"" + pattern + "\"))\n" + "\t{\n" + "\t\treturn \"SOCKS5 " + host + ":" + port + "\";\n" + "\t}"; rules.add(rule); } /** * Load a patterns list from a file * * @param country * @param list */ public void loadPatternsList(String country, ArrayList list) { String line; int idxs, idxe; SimpleFile sfPatternFile = new SimpleFile(strPatternsFolder + country.substring(0, 2) + "_" + FILEUSER + FILEEXT); if (sfPatternFile.exists()) { sfPatternFile.openBufferedRead(); while ((line = sfPatternFile.readLine()) != null) { idxs = line.indexOf('<'); idxe = line.indexOf('>'); if (idxs == 0 && idxe == (line.length() - 1)) { list.add(line.substring(idxs + 1, idxe) + "," + FILEUSER); } } sfPatternFile.closeFile(); } } /** * Delete patterns file for a given country and type, where type is either * "def" or "user" * * @param country * @param type */ public void deletePatternsFile(String country, String type) { SimpleFile sfPatternFile = new SimpleFile(strPatternsFolder + country.substring(0, 2) + "_" + type + FILEEXT); sfPatternFile.delete(); } /** * Save a patterns list by filename * * @param country * @param list * @param type */ public void savePatternsList(String country, String type, ArrayList list) { SimpleFile sfPatternFile = new SimpleFile(strPatternsFolder + country.substring(0, 2) + "_" + type + FILEEXT); sfPatternFile.openBufferedWrite(); sfPatternFile.writeFile(PATTERNFIRSTLINE, 1); for (String s : list) { sfPatternFile.writeFile("<" + s + ">", 1); } sfPatternFile.closeFile(); } /** * Create folder in which pattern files will be stored * * @param folder */ public final void setPatternsFolder(String folder) { strPatternsFolder = folder + SimpleFile.getSeparator(); SimpleFile.createFolder(strPatternsFolder); } /** * Set folder where pac files will be generated * * @param folder */ public final void setPACFolder(String folder) { strPACPath = folder; SimpleFile.createFolder(folder); } /** * Set folder where system proxy settings will be backed up * * @param folder */ public final void setBackupFolder(String folder) { strBackupFolder = folder + SimpleFile.getSeparator(); SimpleFile.createFolder(strBackupFolder); if (OSFunction.getGsettingsPath() != null) { strGnome3ProxyPrefsBackup = strBackupFolder + "gnome3_proxy.txt"; } else { strGnome3ProxyPrefsBackup = null; } if (OSFunction.getKDEProxyPath() != null) { strKDEProxyPrefsBackup = strBackupFolder + "kde_proxy.txt"; } else { strKDEProxyPrefsBackup = null; } } /** * Set the temp folder for file extractions * * @param path */ public final void setTempFolder(String path) { strTempFolder = path; } /** * Generic backup of proxy settings * */ public void backupProxyPrefs() { backupGnomeProxyPrefs(); backupKDEProxyPrefs(); } /** * Gnome backup of proxy settings * */ private void backupGnomeProxyPrefs() { if (strBackupFolder == null) { return; } SimpleFile sfProxyPrefs; try { if (strGnome3ProxyPrefsBackup != null) { sfProxyPrefs = new SimpleFile(strGnome3ProxyPrefsBackup); if (!sfProxyPrefs.exists()) { sfProxyPrefs.openBufferedWrite(); sfProxyPrefs.writeFile(OSFunction.getGnome3Pref("org.gnome.system.proxy", "mode"), 1); sfProxyPrefs.writeFile(OSFunction.getGnome3Pref("org.gnome.system.proxy", "autoconfig-url"), 1); sfProxyPrefs.closeFile(); } } } catch (Exception ex) { Logger.getGlobal().logp(Level.SEVERE, this.getClass().getName(), "backupGnomeProxyPrefs()", "", ex); } } /** * KDE backup of proxy settings * */ private void backupKDEProxyPrefs() { if (strBackupFolder == null) { return; } SimpleFile sfProxyPrefs; try { if (strKDEProxyPrefsBackup != null) { sfProxyPrefs = new SimpleFile(strKDEProxyPrefsBackup); if (!sfProxyPrefs.exists()) { sfProxyPrefs.openBufferedWrite(); sfProxyPrefs.writeFile(OSFunction.getKDEPref("Proxy Settings", "Proxy Config Script", ""), 1); sfProxyPrefs.writeFile(OSFunction.getKDEPref("Proxy Settings", "ProxyType", "0"), 1); sfProxyPrefs.closeFile(); } } } catch (Exception ex) { Logger.getGlobal().logp(Level.SEVERE, this.getClass().getName(), "backupKDEProxyPrefs()", "", ex); } } /** * Generic restore of proxy settings, for ease of use * */ public void restoreProxyPrefs(boolean resetonfail) { restoreGnomeProxyPrefs(resetonfail); restoreKDEProxyPrefs(resetonfail); } /** * Gnome specific restore of proxy settings * */ private void restoreGnomeProxyPrefs(boolean resetonfail) { SimpleFile sfProxyPrefs; try { // Restore gnome3 proxy prefs if (strGnome3ProxyPrefsBackup != null) { sfProxyPrefs = new SimpleFile(strGnome3ProxyPrefsBackup); if (sfProxyPrefs.exists()) { sfProxyPrefs.openBufferedRead(); String mode = sfProxyPrefs.readLine(); String url = sfProxyPrefs.readLine(); sfProxyPrefs.closeFile(); if (url != null && mode != null && !mode.isEmpty()) { // Restore original settings from file OSFunction.setGnome3Pref("org.gnome.system.proxy", "mode", mode); OSFunction.setGnome3Pref("org.gnome.system.proxy", "autoconfig-url", url); } } else { if (resetonfail) { setGnomeProxyAutoConfigURL(null); } } } } catch (Exception ex) { Logger.getGlobal().logp(Level.SEVERE, this.getClass().getName(), "restoreGnomeProxyPrefs()", "", ex); } } /** * KDE specific restore of proxy settings * */ private void restoreKDEProxyPrefs(boolean resetonfail) { SimpleFile sfProxyPrefs; try { // Restore kde proxy prefs if (strKDEProxyPrefsBackup != null) { sfProxyPrefs = new SimpleFile(strKDEProxyPrefsBackup); if (sfProxyPrefs.exists()) { sfProxyPrefs.openBufferedRead(); String url = sfProxyPrefs.readLine(); String type = sfProxyPrefs.readLine(); sfProxyPrefs.closeFile(); if (url != null && type != null) { if (!SimpleFile.exists(url)) { url = ""; } OSFunction.setKDEPref("Proxy Settings", "Proxy Config Script", url); OSFunction.setKDEPref("Proxy Settings", "ProxyType", type); } } else { if (resetonfail) { setKDEProxyAutoConfigURL(null); } } } } catch (Exception ex) { Logger.getGlobal().logp(Level.SEVERE, this.getClass().getName(), "restoreKDEProxyPrefs()", "", ex); } } /** * Generic proxy prefs delete, for ease of use */ public void deleteProxyPrefs() { deleteGnomeProxyPrefs(); deleteKDEProxyPrefs(); } /** * Generic delete of backed up gnome proxy settings * * @return boolean True if successful */ private boolean deleteGnomeProxyPrefs() { if (strBackupFolder == null) { return false; } boolean result = true; // Delete Gnome3 prefs if (strGnome3ProxyPrefsBackup != null) { result = SimpleFile.delete(strGnome3ProxyPrefsBackup); } return result; } /** * Generic delete of backed up KDE proxy settings * * @return boolean True if successful */ private boolean deleteKDEProxyPrefs() { if (strBackupFolder == null) { return false; } boolean result = true; // Delete Kde prefs if (strKDEProxyPrefsBackup != null) { result = SimpleFile.delete(strKDEProxyPrefsBackup); } return result; } /** * Generic set proxy config * * @param url */ public void setProxyAutoConfigURL(String url) { setGnomeProxyAutoConfigURL(url); setKDEProxyAutoConfigURL(url); } /** * Set Gnome proxy config * * @param url */ private void setGnomeProxyAutoConfigURL(String url) { if (strGnome3ProxyPrefsBackup != null) { if (url == null) { OSFunction.resetGnome3Pref("org.gnome.system.proxy", "mode"); OSFunction.resetGnome3Pref("org.gnome.system.proxy", "autoconfig-url"); } else { OSFunction.setGnome3Pref("org.gnome.system.proxy", "mode", "auto"); OSFunction.setGnome3Pref("org.gnome.system.proxy", "autoconfig-url", url); } } } /** * Set KDE proxy config * * @param url */ private void setKDEProxyAutoConfigURL(String url) { if (strKDEProxyPrefsBackup != null) { if (url == null) { OSFunction.setKDEPref("Proxy Settings", "Proxy Config Script", ""); OSFunction.setKDEPref("Proxy Settings", "ProxyType", 0); } else { OSFunction.setKDEPref("Proxy Settings", "Proxy Config Script", url); OSFunction.setKDEPref("Proxy Settings", "ProxyType", 2); } } } /** * Save pac file using given filename * * @param filename * @param ruleslist */ private void savePACFile(String filename, ArrayList ruleslist) { SimpleFile sfPacFile = new SimpleFile(strPACPath + filename); sfPacFile.openBufferedWrite(); sfPacFile.writeFile("//" + filename, 1); String temp = "function FindProxyForURL(url, host) {"; sfPacFile.writeFile(temp, 1); for (String s : ruleslist) { sfPacFile.writeFile(s, 1); } sfPacFile.writeFile("}", 1); sfPacFile.closeFile(); } /** * Delete specified pac file * * @param filename * @return boolean true if action successful */ public boolean deletePAC(String filename) { return SimpleFile.delete(strPACPath + filename); } /** * Delete all pac files */ public void deleteAllPAC() { SimpleFile sf = new SimpleFile(strPACPath); sf.setFileFilter(PACFILE_EXT); sf.deleteFileList(sf.getFileList()); } /** * Get a pseudo random numerical name * * @return String */ private String createRandomName() { // Create new filename with a random number to modify filename from // previous one to force auto reload of pac settings in browser int pacNumber = randgen.nextInt(); if (pacNumber < 0) { pacNumber = 0 - pacNumber; } return String.valueOf(pacNumber); } /** * Set default proxy url * * @param proxyurl */ public void setDefaultProxy(String proxyurl) { strDefaultProxy = proxyurl; } /** * Set do not proxy * * @param hostcsv */ public void setDoNotProxy(String hostcsv) { strDoNotProxy = hostcsv; } /** * Get value of comma separated host or ip list * * @return String value */ public String getDoNotProxy() { return strDoNotProxy; } /** * Adds pattern to an existing pattern file * * @param country * @param description * @param pattern */ public void addToPatternFile(String country, String description, String pattern) { if (strPatternsFolder == null || pattern.isEmpty()) { return; } SimpleFile sfPatternFile = new SimpleFile(strPatternsFolder + SimpleFile.getSeparator() + country.substring(0, 2) + "_" + FILEUSER + FILEEXT); sfPatternFile.openBufferedAppend(); sfPatternFile.writeFile("<" + description + "," + pattern + ",true>", 1); sfPatternFile.closeFile(); } /** * Get an array of user pattern files * * @return array of files */ public File[] getPatternsFiles() { SimpleFile sf = new SimpleFile(strPatternsFolder); sf.setFileFilter(FILEUSER + FILEEXT); return sf.getFileList(); } /** * Export user patterns * * @param filename * @param files */ public void exportUserPatterns(String filename, File[] files) { // Append .zip extension if we need to if (!filename.endsWith(".zip")) { filename += ".zip"; } // Add user pattern files to zip SimpleFile sf = new SimpleFile(filename); sf.openZipStream(9); sf.addFilesToZip(files); sf.closeZipStream(); } /** * Import patterns * * @param filename * @return true if succesful */ public boolean importPatterns(String filename) { // Import patterns boolean success = false; SimpleFile sf = new SimpleFile(filename); String destpath; // Check existence if (sf.exists()) { // Get temporary path to extraction folder if (strTempFolder == null) { destpath = OSFunction.getTempFolder(null) + getClass().getName(); } else { destpath = strTempFolder + getClass().getName(); } // Create temp extraction folder SimpleFile.createFolder(destpath); // Extract files to temp folder success = sf.extractZipTo(destpath); if (success) { // Get list of files sf.setFileName(destpath); sf.setFileFilter(".txt"); File[] files = sf.getFileList(); // Verify each file before copying them over String firstLine; try { if (files.length == 0) { throw new Exception(); } for (File f : files) { // Verify valid pattern file by checking first line of file sf.setFile(f); sf.openBufferedRead(); firstLine = sf.readLine(); sf.closeFile(); if (firstLine != null) { if (firstLine.toLowerCase().contains("pattern file")) { SimpleFile.copyFromTo(f.getAbsolutePath(), strPatternsFolder + f.getName()); } else { success = false; break; } } } } catch (Exception ex) { success = false; } } // Delete temporary files SimpleFile.deleteFolder(destpath); } return success; } } selektor-3.13.73/src/client/PatternsEditor.form0000644000175000017500000002746213302030722020744 0ustar bannorbannor
selektor-3.13.73/src/client/ExitNodeTableModel.java0000644000175000017500000001446113302030722021416 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.swing.table.DefaultTableModel; /** * * @author Alistair Neil */ public class ExitNodeTableModel extends DefaultTableModel { private final List salFinger = Collections.synchronizedList(new ArrayList()); private final String[] columnNames = new String[5]; private NodeItem ni; public ExitNodeTableModel() { } /** * Clear the table model of all data */ public void clear() { getDataVector().clear(); salFinger.clear(); } /** * Get the number of columns * * @return columns as integer */ @Override public int getColumnCount() { return columnNames.length; } /** * Test if the cell is editable * * @param row Cell row * @param col Cell column * @return True if editable */ @Override public boolean isCellEditable(int row, int col) { return col == 4; } /** * Set value with given fingerprint at given column * * @param value Value * @param finger Fingerprint * @param col Column */ public void setValueAt(Object value, String finger, int col) { setValueAt(value, salFinger.indexOf(finger), col); } /** * Convenience method to set the testing field cell values for a specific * fingerprint, the hops field is hidden and does npt show up in table * * @param finger Fingerprint * @param latency Latency value * @param status Status value * @param hops Hops value */ public synchronized void setTestFieldValues(String finger, long latency, String status, String hops) { int row = salFinger.indexOf(finger); if (row > -1) { ni = (NodeItem) super.getValueAt(row, 0); ni.setTestLatency(latency); ni.setTestingMessage(status); ni.setCircuitHops(hops); fireTableRowsUpdated(row, row); } } /** * Get row nodeitem * * @param row * @return a nodeitem */ public NodeItem getNodeItemAt(int row) { return (NodeItem) super.getValueAt(row, 0); } /** * Set cell value at row,col * * @param value * @param row * @param col */ @Override public void setValueAt(Object value, int row, int col) { try { ni = (NodeItem) super.getValueAt(row, 0); switch (col) { case 1: ni.setBandwidth((Float) value); break; case 2: ni.setTestLatency((Long) value); break; case 3: ni.setTestingMessage((String) value); break; case 4: ni.setFavouriteEnabled((Boolean) value); break; case 5: salFinger.set(row, (String) value); ni.setFingerprint((String) value); return; case 6: ni.setCircuitHops((String) value); return; } fireTableCellUpdated(row, col); } catch (Exception ex) { } } /** * Get cell value as object at row,col * * @param row * @param col * @return value as object */ @Override public Object getValueAt(int row, int col) { ni = (NodeItem) super.getValueAt(row, 0); Object obj = null; switch (col) { case 0: obj = ni.getNickName(); break; case 1: obj = ni.getBandwidth(); break; case 2: obj = ni.getTestLatency(); break; case 3: obj = ni.getTestingMessage(); break; case 4: obj = ni.isFavourite(); break; case 5: obj = ni.getFingerprint(); break; case 6: obj = ni.getCircuitHops(); break; case 7: obj = ni.getTestStatus(); break; } return obj; } /** * Add rowdata with given data object array * * @param rowData */ @Override public void addRow(Object[] rowData) { super.addRow(rowData); salFinger.add(((NodeItem) rowData[0]).getFingerprint()); } /** * Get column name at given index * * @param index * @return name as string */ @Override public String getColumnName(int index) { return columnNames[index]; } /** * Set the column name at the specified index * * @param name * @param index */ public void setColumnName(String name, int index) { if (index < columnNames.length) { columnNames[index] = name; } } /** * Get column class at given index * * @param index * @return Class */ @Override public Class getColumnClass(int index) { Class cl; switch (index) { case 1: cl = Float.class; break; case 2: cl = Long.class; break; case 4: cl = Boolean.class; break; default: cl = String.class; break; } return cl; } } selektor-3.13.73/src/client/GuardNodeDialog.form0000644000175000017500000002364613302030722020765 0ustar bannorbannor
selektor-3.13.73/src/client/TorController.java0000644000175000017500000011042713302030722020555 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; import lib.SimpleFile; /** * * @author Alistair Neil */ public class TorController extends TorProcess { // Event constants, which supplement the ones provide by TorProcess public static final int EVENT_CIRCUITS_BUILT = 15; public static final int EVENT_CIRCUITS_FAILED = 16; public static final int EVENT_CIRCUIT_BUILT = 17; public static final int EVENT_CIRCUIT_FAILED = 18; public static final int EVENT_LATENCY_DONE = 19; public static final int EVENT_TESTING_DONE = 20; public static final int EVENT_CIRCUIT_CHANGED = 21; public static final int EVENT_ABORTED = 22; private static final String LOCALHOST = "127.0.0.1"; private static final String[] EVENTMESSAGES = new String[]{ "EVENT_CIRCUITS_BUILT", "EVENT_CIRCUITS_FAILED", "EVENT_CIRCUIT_BUILT", "EVENT_CIRCUIT_FAILED", "EVENT_LATENCY_DONE", "EVENT_TESTING_DONE", "EVENT_CIRCUIT_CHANGED", "EVENT_ABORTED" }; // Status constants public static final int STATUS_DEAD = 0; public static final int STATUS_BOOTING = 1; public static final int STATUS_IDLE = 2; public static final int STATUS_CIRCUIT_CREATION = 3; public static final int STATUS_LATENCY_CHECKING = 4; // Other constants public static final long LATENCY_FAIL = 9999; public static final int STREAM_IP = 5; public static final int NODE_GUARD = 0; public static final int NODE_MIDDLE = 1; public static final int NODE_EXIT = 2; private static final int DEFBUILDTIME = 20; private volatile Socket sockControl; private volatile BufferedReader brSocket; private volatile PrintWriter pwSocket; private String strLatencyURL; private final ConcurrentHashMap chmUseableCircuits; private ArrayList alActiveStreams; private int intStatus = STATUS_DEAD; private volatile Socket sockProxy; private long lngLatency; private String strBestHops; private long lngBestLatency; private String entrynodes = ""; private Thread tActive; private boolean haveEntryNode; /** * Constructor * * @param clientpath Path to Tor client * @param configfolder Location of configuration file torrc */ public TorController(String clientpath, String configfolder) { super(clientpath, configfolder); this.chmUseableCircuits = new ConcurrentHashMap<>(); this.alActiveStreams = new ArrayList<>(); } /** * Tor process event * * @param event * @param data */ @Override public final void torProcessEventFired(int event, String data) { Logger.getGlobal().logp(Level.FINE, TorProcess.class.getName(), "torProcessEventFired() on Port=" + getListenPort(), getEventMessage(event) + ", Data=" + data); switch (event) { case TOR_BRIDGE: haveEntryNode = true; break; case TOR_STOPPED: setStatus(STATUS_DEAD); break; case TOR_BOOTED: case TOR_RESTARTED: openControlSocket(); // Authenticate our control authenticateTor(getSecret()); takeOwnership(); waitForBridgeNodes(20); setStatus(STATUS_IDLE); break; } controllerEventFired(event, data); } @Override public String getEventMessage(int event) { if (event < EVENT_CIRCUITS_BUILT) { return super.getEventMessage(event); } else { return EVENTMESSAGES[event - EVENT_CIRCUITS_BUILT]; } } /** * Handle for controllerEventFired should be overridden by parent class * * @param event * @param data */ public void controllerEventFired(int event, Object data) { } /** * Set status flag * * @param status */ public synchronized void setStatus(int status) { intStatus = status; } /** * Get current status * * @return status integer constant, see defined status constants */ public synchronized int getStatus() { return intStatus; } /** * Convenience test for idle status * * @return true if idle */ public boolean isIdle() { return (getStatus() <= STATUS_IDLE); } /** * Stop the tor controller process completely * */ public final void stop() { haveEntryNode = false; abortActions(); Logger.getGlobal().logp(Level.INFO, TorController.class.getName(), "stop() on Port=" + getListenPort(), "Stop requested"); sendCommand("QUIT"); closeControlSocket(); stopProcess(); setStatus(STATUS_DEAD); } /** * Start tor controller process and issue the TOR_BOOTED event * */ public final void start() { createDefaultConfig(); start(TOR_BOOTED); } /** * Start tor controller process and issue the given event * * @param bootevent */ public final void start(int bootevent) { if (getStatus() == STATUS_DEAD) { setInitialBootEvent(bootevent); setStatus(STATUS_BOOTING); startProcess(); return; } if (getStatus() > STATUS_BOOTING) { setStatus(STATUS_IDLE); controllerEventFired(bootevent, null); } } /** * Abort all current actions */ public final void abortActions() { if (getStatus() < STATUS_IDLE) { return; } setStatus(STATUS_IDLE); // Abort latency checking abortLatencyCheck(); // Interrupt sleep thread if active Thread t = getActiveThread(); if (t != null) { t.interrupt(); } } /** * Abort latency checking */ public final void abortLatencyCheck() { // Kill off latency checking proxy socket if (sockProxy != null) { try { sockProxy.close(); } catch (IOException ex) { } } sockProxy = null; } /** * Save configuration file */ public void saveConf() { SimpleFile sf = new SimpleFile(getConfigFilePath()); sf.delete(); sendCommand("SAVECONF"); } /** * Load configuration file */ public void loadConf() { SimpleFile sf = new SimpleFile(getConfigFilePath()); sf.openBufferedRead(); String text = sf.readEntireFile(); sf.closeFile(); sendCommand("+loadconf\r\n" + text + "\r\n."); } /** * Attempts to return the Country associated with an ip address * * @param ip * @return Country or null if not found */ public String getCountryFromIP(String ip) { // Get country from ip address String cmd = "ip-to-country/" + ip; ArrayList infoList = getInfo(cmd); try { if (infoList != null) { return infoList.get(0).toUpperCase(); } } catch (Exception ex) { } return null; } /** * Set the url used for latency checking * * @param url */ public void setTestingURL(String url) { strLatencyURL = url; } /** * Take ownership of the Tor client process so that it shuts down if the * process is destroyed, particular useful for linux desktops that dont * issue proper terminations. */ private void takeOwnership() { sendCommand("TAKEOWNERSHIP"); sendCommand("RESETCONF __OwningControllerProcess"); } /** * Authenticate a password protected tor control socket * * @param password */ private void authenticateTor(String password) { if (password == null) { sendCommand("AUTHENTICATE"); } else { sendCommand("AUTHENTICATE " + "\"" + password + "\""); } } /** * Enable/Disable predictive circuit building * * @param enabled */ public void enablePredictiveCircuits(boolean enabled) { if (enabled) { setConf("__DisablePredictedCircuits=0"); } else { setConf("__DisablePredictedCircuits=1"); } } /** * Get tor status information for a given property. See TOR control-spec * documentation for valid properties * * @param property * @return Arraylist containg the result of the command */ public final ArrayList getInfo(String property) { return sendCommand("GETINFO " + property); } /** * Close a circuit with ID * * @param id */ public final void closeCircuit(String id) { sendCommand("CLOSECIRCUIT " + id); } /** * Set a tor configuration property * * @param property * @return Arraylist containg the result of the command */ public final ArrayList setConf(String property) { return sendCommand("SETCONF " + property); } /** * reset a tor configuration property * * @param property * @return Arraylist containing the result of the command */ public final ArrayList resetConf(String property) { return sendCommand("RESETCONF " + property); } /** * Send signal to tor * * @param cmd * @return Arraylist containing the result of the command */ public final ArrayList signal(String cmd) { return sendCommand("SIGNAL " + cmd); } /** * Get entry guards chosen by tor client * * @return entry guards as comma separated fingerprints */ public String getEntryGuardsAsCSV() { ArrayList al = getInfo("entry-guards"); StringBuilder sbResult = new StringBuilder(); if (!al.contains("250 OK")) { return sbResult.toString(); } // Remove 250 OK entry al.remove("250 OK"); String sep = ""; for (String s : al) { if (s.contains("~")) { sbResult.append(sep); sbResult.append(s.substring(0, s.indexOf('~'))); if (sep.isEmpty()) { sep = ","; } } } return sbResult.toString(); } /** * Triggers a socks latency check, EVENT_LATENCY_CHECK is fired on * completion * * @param timeout */ public final void doLatencyCheck(final int timeout) { Thread t = new Thread(new java.lang.Runnable() { long latency; @Override public void run() { latency = getTorLatency(timeout); SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { lngLatency = latency; controllerEventFired(EVENT_LATENCY_DONE, null); } }); } }); if (getStatus() < STATUS_IDLE) { return; } alActiveStreams = getInfo("stream-status"); alActiveStreams.remove("250 OK"); t.start(); } /** * Get current latency * * @return latency in ms as long */ public final long getLatency() { return lngLatency; } /** * Returns measured latency for the active circuit without creating a * stream, this blocks so be careful * * @param timeout * @return latency */ public long getTorLatency(int timeout) { long lngResult = LATENCY_FAIL; DataInputStream dis = null; try { sockProxy = createTorSocketToURL(strLatencyURL, true); if (sockProxy != null) { sockProxy.setSoTimeout(timeout); dis = new DataInputStream(sockProxy.getInputStream()); long lngStart = System.currentTimeMillis(); dis.skipBytes(1); lngResult = System.currentTimeMillis() - lngStart; } } catch (IOException ex) { Logger.getGlobal().logp(Level.INFO, TorController.class.getName(), "getTorLatency Exception " + getListenPort(), ex.getMessage()); } try { if (!sockProxy.isClosed()) { sockProxy.close(); } sockProxy = null; } catch (Exception ex) { } try { if (dis != null) { dis.close(); } } catch (Exception ex) { } return lngResult; } /** * Close open circuits except circuit specified by id * * @param id * @param filtered */ public void closeCircuitsExcept(String id, boolean filtered) { Logger.getGlobal().logp(Level.FINEST, TorController.class.getName(), "closeCircuitsExcept() Port=" + getListenPort(), ""); Set keys = getBuiltCircuits(filtered).keySet(); Iterator i = keys.iterator(); String hopid; while (i.hasNext()) { hopid = (String) i.next(); if (!hopid.contentEquals(id)) { closeCircuit(hopid); } } } private String getCircuitIdFromStream(String stream) { String data[]; Pattern pat = Pattern.compile(" "); data = pat.split(stream); return data[2]; } /** * Get list of active streams * * @return active streams as a list */ public final ArrayList getActiveStreams() { return alActiveStreams; } /** * Set the csv list of exit node fingers to be used by tor, a single exit * node may also be specified, this does not block * * @param fingers * @param nocircs */ public final void activateNodes(final String fingers, final int nocircs) { Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { activateNodesBlocking(fingers, nocircs); SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { if (isIdle()) { controllerEventFired(EVENT_ABORTED, null); return; } setStatus(STATUS_IDLE); if (chmUseableCircuits.isEmpty()) { controllerEventFired(EVENT_CIRCUITS_FAILED, 0); } else { controllerEventFired(EVENT_CIRCUITS_BUILT, chmUseableCircuits.size()); } } }); } }); if (getStatus() < STATUS_IDLE) { return; } abortActions(); setStatus(STATUS_CIRCUIT_CREATION); t.start(); } /** * Activate given circuit, does not block * * @param hops */ public final void activateCircuit(final String hops) { Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { activateCircuitBlocking(hops); SwingUtilities.invokeLater(new java.lang.Runnable() { @Override public void run() { if (isIdle()) { controllerEventFired(EVENT_ABORTED, null); return; } setStatus(STATUS_IDLE); if (chmUseableCircuits.isEmpty()) { controllerEventFired(EVENT_CIRCUIT_FAILED, null); } else { controllerEventFired(EVENT_CIRCUIT_BUILT, null); } } }); } }); if (getStatus() < STATUS_IDLE) { return; } setStatus(STATUS_CIRCUIT_CREATION); t.start(); } /** * Set entry nodes * * @param fingers */ public void setEntryNodes(String fingers) { entrynodes = ""; if (fingers == null || !getBridges().isEmpty()) { return; } entrynodes = fingers; } /** * Get configured entry nodes * * @return entry nodes in CSV format */ public String getEntryNodes() { return entrynodes; } /** * Set the csv list of exit node fingers to be used by tor, a single exit * node may also be specified, this blocks * * @param fingers * @param nocircs */ public void activateNodesBlocking(String fingers, int nocircs) { chmUseableCircuits.clear(); enablePredictiveCircuits(true); setConf("EntryNodes=" + entrynodes); setConf("ExitNodes=" + fingers); if (fingers.isEmpty() || fingers.contains("{")) { fingers = null; } waitForCircuits(DEFBUILDTIME, nocircs, fingers); enablePredictiveCircuits(false); } /** * Activate given circuit, blocks * * @param hops */ private void activateCircuitBlocking(String hops) { chmUseableCircuits.clear(); sendCommand("EXTENDCIRCUIT 0 " + hops + " PURPOSE=GENERAL"); waitForCircuit(DEFBUILDTIME, hops); } /** * Wait so many seconds for valid bridges to appear if bridges are set * * @param secs */ private void waitForBridgeNodes(int secs) { long timeout = System.currentTimeMillis() + (secs * 1000); while (!haveValidEntryNode()) { try { Thread.sleep(250); if (System.currentTimeMillis() > timeout) { break; } } catch (InterruptedException ex) { break; } } } public boolean haveValidEntryNode() { if (getBridges().isEmpty()) { return true; } return haveEntryNode; } private void waitForCircuits(long secs, int nocircs, String reqFinger) { long timeout = System.currentTimeMillis() + (secs * nocircs * 1000); setActiveThread(Thread.currentThread()); while (chmUseableCircuits.size() < nocircs) { try { Thread.sleep(250); } catch (InterruptedException ex) { break; } if (System.currentTimeMillis() > timeout) { Logger.getGlobal().logp(Level.INFO, TorController.class .getName(), "waitForCircuits() on Port=" + getListenPort(), "Timed Out"); break; } if (isIdle()) { Logger.getGlobal().logp(Level.INFO, TorController.class .getName(), "waitForCircuits() on Port=" + getListenPort(), "Aborting"); chmUseableCircuits.clear(); break; } TorCircuit tc = getLatestCircuit(); if (tc != null) { // If we have a node request then ensure that the circuit contains the requested node fingerprint if (reqFinger != null && !reqFinger.contains(tc.getExit(TorCircuit.FINGER))) { continue; } // If we have custom guards, then ensure circuit contains guard if (entrynodes.isEmpty()) { chmUseableCircuits.put(tc.getID(), tc); } else if (entrynodes.contains(tc.getGuard(TorCircuit.FINGER))) { chmUseableCircuits.put(tc.getID(), tc); } } } } private void waitForCircuit(long secs, String reqHops) { long timeout = System.currentTimeMillis() + (secs * 1000); setActiveThread(Thread.currentThread()); while (chmUseableCircuits.size() < 1) { try { Thread.sleep(250); } catch (InterruptedException ex) { break; } if (System.currentTimeMillis() > timeout) { Logger.getGlobal().logp(Level.INFO, TorController.class .getName(), "waitForCircuit() on Port=" + getListenPort(), "Timed Out"); break; } if (isIdle()) { Logger.getGlobal().logp(Level.INFO, TorController.class .getName(), "waitForCircuit() on Port=" + getListenPort(), "Aborting"); chmUseableCircuits.clear(); break; } TorCircuit tcActive = getLatestCircuit(); if (tcActive != null) { String hops = tcActive.getHops(); if (hops.contains(reqHops)) { chmUseableCircuits.put(tcActive.getID(), tcActive); } } } } private synchronized void setActiveThread(Thread t) { tActive = t; } private synchronized Thread getActiveThread() { return tActive; } /** * Test specified node, non blocking * * @param finger */ public void testNode(final String finger) { SwingWorker sw = new SwingWorker() { private long bestLatency = LATENCY_FAIL; private String bestHops = null; @Override protected Void doInBackground() { closeCircuitsExcept("", true); activateNodesBlocking(finger, 1); if (isIdle()) { return null; } if (chmUseableCircuits.size() > 0) { String id = chmUseableCircuits.keys().nextElement(); TorCircuit tc = chmUseableCircuits.get(id); closeCircuitsExcept("", true); activateCircuitBlocking(tc.getHops()); publish(EVENT_CIRCUIT_BUILT); long latency = getTorLatency(5000); if (latency < bestLatency) { bestLatency = latency; bestHops = tc.getHops(); } } return null; } @Override protected void process(List chunks) { for (Integer i : chunks) { controllerEventFired(i, chmUseableCircuits.size()); } } @Override protected void done() { if (isIdle()) { lngBestLatency = LATENCY_FAIL; strBestHops = null; controllerEventFired(EVENT_ABORTED, null); } else { setStatus(STATUS_IDLE); lngBestLatency = bestLatency; strBestHops = bestHops; controllerEventFired(EVENT_TESTING_DONE, chmUseableCircuits.size()); } } }; setStatus(STATUS_CIRCUIT_CREATION); strBestHops = null; lngBestLatency = LATENCY_FAIL; sw.execute(); } /** * Get best latency * * @return best latency value in ms as long */ public final long getBestLatency() { return lngBestLatency; } /** * Get best hops * * @return hops info as string */ public final String getBestHops() { return strBestHops; } /** * Get built circuits * * @param filtered Filter out unwanted circuits * @return HashMap of built circuits keyed to their circuit id */ public final HashMap getBuiltCircuits(boolean filtered) { HashMap hm = new HashMap<>(); ArrayList circuits = getInfo("circuit-status"); circuits.remove("250 OK"); for (String circuit : circuits) { if (circuit.contains("BUILT")) { if (filtered) { if (circuit.contains("ONEHOP_TUNNEL")) { continue; } if (circuit.contains("IS_INTERNAL")) { continue; } if (!circuit.contains("PURPOSE=GENERAL")) { continue; } } TorCircuit tc = new TorCircuit(circuit); hm.put(tc.getID(), tc); // Debug purposes // if (getListenPort() == 9054) { // System.out.println("Circuit=" + circuit); // } } } return hm; } /** * Verify we have comms on the control socket * * @return true if its good */ public final boolean verifyControlComms() { ArrayList circuits = getInfo("circuit-status"); return !circuits.isEmpty(); } /** * Get the latest circuit * * @return circuit */ public final TorCircuit getLatestCircuit() { HashMap hm = getBuiltCircuits(true); Iterator i = getBuiltCircuits(true).keySet().iterator(); String strId; TorCircuit tcRecent = null; int hid = 0; int id; while (i.hasNext()) { strId = (String) i.next(); id = Integer.parseInt(strId); if (id > hid) { hid = id; tcRecent = hm.get(strId); } } return tcRecent; } private void openControlSocket() { try { sockControl = new Socket(LOCALHOST, getControlPort()); sockControl.setKeepAlive(true); sockControl.setSoTimeout(2000); pwSocket = new PrintWriter(sockControl.getOutputStream()); brSocket = new BufferedReader(new InputStreamReader(sockControl.getInputStream()), 1024); } catch (IOException ex) { Logger.getGlobal().throwing(TorController.class .getName(), "openControlSocket() on Port=" + getListenPort(), ex); } } private void closeControlSocket() { try { if (sockControl != null) { sockControl.setKeepAlive(false); sockControl.close(); sockControl = null; pwSocket.close(); brSocket.close(); pwSocket = null; brSocket = null; } } catch (IOException ex) { Logger.getGlobal().throwing(TorController.class .getName(), "closeControlSocket() on Port=" + getListenPort(), ex); } } /** * Send a command to tor client * * @param command * @return Arraylist containing the result of the command */ public final synchronized ArrayList sendCommand(String command) { ArrayList result = new ArrayList<>(); if (sockControl == null) { Logger.getGlobal().logp(Level.WARNING, TorController.class .getName(), "sendCommand() Port=" + getListenPort(), "Cmd=" + command + ", Non-existent socket"); return result; } if (sockControl.isClosed()) { Logger.getGlobal().logp(Level.WARNING, TorController.class .getName(), "sendCommand() Port=" + getListenPort(), "Cmd=" + command + ", Socket is closed."); return result; } flushReadBuffer(); // Write out the command if (pwSocket.checkError()) { Logger.getGlobal().logp(Level.FINEST, TorController.class .getName(), "sendCommand() Port=" + getListenPort(), "Cmd=" + command + ", Write Socket Error"); return result; } pwSocket.write(command + "\r\n"); pwSocket.flush(); // Dont wait for command response if quitting if (command.contentEquals("QUIT")) { return result; } result = getCommandResponse(); if (!result.isEmpty()) { Logger.getGlobal().logp(Level.FINEST, TorController.class .getName(), "sendCommand() Port=" + getListenPort(), "Cmd=" + command + ", Response=" + result.toString()); } else { Logger.getGlobal().logp(Level.WARNING, TorController.class .getName(), "sendCommand() Port=" + getListenPort(), "Cmd=" + command + ", Response=Timed out"); } return result; } private ArrayList getCommandResponse() { boolean boolMultiReply = false; String response; ArrayList result = new ArrayList<>(); try { while (true) { response = brSocket.readLine(); if (response == null) { break; } // Check to see if we are in the middle of a multi line reply if (boolMultiReply) { // A multiline extended reply is part terminated by a fullstop if (response.startsWith(".")) { boolMultiReply = false; } else { result.add(response); } continue; } // Check for the start of a multi line reply if (response.startsWith("250+")) { boolMultiReply = true; response = response.substring(response.indexOf('=') + 1).trim(); if (!response.isEmpty()) { result.add(response); } continue; } // Check for single line reply if (response.startsWith("250-")) { response = response.substring(response.indexOf('=') + 1).trim(); if (!response.isEmpty()) { result.add(response); } continue; } result.add(response); if (response.startsWith("250 ") || response.startsWith("251 ") || response.startsWith("4") || response.startsWith("5")) { break; } } } catch (IOException ex) { result.clear(); } return result; } private void flushReadBuffer() { try { while (brSocket.ready()) { brSocket.readLine(); } } catch (IOException ex) { } } /** * Create a socks4a socket to this URL on this tor connection, if nowww is * true then remove www. from domain * * @param url * @param nowww * @return socket */ public Socket createTorSocketToURL(String url, boolean nowww) { try { URI uri = new URI(url); String host = uri.getHost().toLowerCase(); if (nowww) { host = host.replace("www.", ""); } String protocol = uri.getScheme(); int port = uri.getPort(); if (port == -1) { switch (protocol) { default: port = 80; break; case "https": port = 443; break; } } return createSocks4aSocket(LOCALHOST, getListenPort(), host, port); } catch (URISyntaxException ex) { Logger.getLogger(TorController.class .getName()).log(Level.SEVERE, null, ex); } return null; } /** * Create a Socks4a socket Taken from Wikipedia SOCKS4a is a simple * extension to SOCKS4 protocol that allows a client that cannot resolve the * destination host's domain name to specify it. * * The client should set the first three bytes of DSTIP to NULL and the last * byte to a non-zero value. (This corresponds to IP address 0.0.0.x, with x * nonzero, an inadmissible destination address and thus should never occur * if the client can resolve the domain name.) Following the NULL byte * terminating USERID, the client must send the destination domain name and * terminate it with another NULL byte. This is used for both "connect" and * "bind" requests. * * Client to SOCKS server: field 1: SOCKS version number, 1 byte, must be * 0x04 for this version field 2: command code, 1 byte: 0x01 = establish a * TCP/IP stream connection 0x02 = establish a TCP/IP port binding field 3: * network byte order port number, 2 bytes field 4: deliberate invalid IP * address, 4 bytes, first three must be 0x00 and the last one must not be * 0x00 field 5: the user ID string, variable length, terminated with a null * (0x00) field 6: the domain name of the host we want to contact, variable * length, terminated with a null (0x00) * * * Server to SOCKS client: field 1: null byte field 2: status, 1 byte: 0x5a * = request granted 0x5b = request rejected or failed 0x5c = request failed * because client is not running identd (or not reachable from the server) * 0x5d = request failed because client's identd could not confirm the user * ID string in the request field 3: network byte order port number, 2 bytes * field 4: network byte order IP address, 4 bytes * * A server using protocol SOCKS4A must check the DSTIP in the request * packet. If it represents address 0.0.0.x with nonzero x, the server must * read in the domain name that the client sends in the packet. The server * should resolve the domain name and make connection to the destination * host if it can. * * @param socksaddr Socks ip address * @param socksport Socks port * @param remotehost Remote host * @param remoteport Remote port * @return Socket */ public Socket createSocks4aSocket(String socksaddr, int socksport, String remotehost, int remoteport) { try { Socket s = new Socket(socksaddr, socksport); DataOutputStream dos = new DataOutputStream(s.getOutputStream()); dos.writeByte(0x04); // Version 4 Socks dos.writeByte(0x01); // Connect command code dos.writeShort(remoteport); // Remote Port number dos.writeInt(0x01); // IP address of 0.0.0.1 means use Socks 4a dos.writeByte(0x00); // Null terminator dos.writeBytes(remotehost); // Remote host IP address dos.writeByte(0x00); // Null terminator return s; } catch (IOException ex) { Logger.getGlobal().logp(Level.FINE, this.getClass().getName(), "createSocks4aSocket", "", ex); } return null; } } selektor-3.13.73/src/client/GuardNodeDialog.java0000644000175000017500000003071513302030722020736 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import java.awt.event.MouseEvent; import javax.swing.event.TableModelEvent; import lib.GTKFixes; import lib.Localisation; import lib.Utilities; /** * * @author Alistair Neil */ public class GuardNodeDialog extends javax.swing.JDialog { public static final int CANCEL = 0; public static final int APPLY = 1; public static final int RESET = 2; private static final String ATLAS = "https://atlas.torproject.org/"; private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); private int intRowSelected = -1; private int returnStatus = CANCEL; private final GuardNodeTableModel gntm; private NodeList nl; /** * Creates new form GuardNodeDialog * * @param parent * @param modal */ public GuardNodeDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); GTKFixes.fixTextAreaColor(jTextArea1); jTableGuards.setComponentPopupMenu(popupTable); gntm = new GuardNodeTableModel(); gntm.setColumnName(LOCAL.getString("guardtable_col1"), 0); gntm.setColumnName(LOCAL.getString("guardtable_col2"), 1); gntm.setColumnName(LOCAL.getString("guardtable_col3"), 2); gntm.setColumnName(LOCAL.getString("guardtable_col4"), 3); gntm.addTableModelListener(new javax.swing.event.TableModelListener() { @Override public void tableChanged(TableModelEvent e) { if (gntm.getEnabledCount() >= 3 || gntm.getEnabledCount() == 0) { jButtonApply.setEnabled(true); } else { jButtonApply.setEnabled(false); } } }); jTableGuards.setModel(gntm); adjustGuardTableColumns(); } /** * Set the nodelist * * @param nl */ public void setNodeList(NodeList nl) { this.nl = nl; this.nl.setGuardNodeTableModel(gntm); this.nl.refreshGuardTableModel(); adjustGuardTableColumns(); } /** * Adjust guard table column widths */ private void adjustGuardTableColumns() { // Adjust table column widths Utilities.adjustTableColumnWidth(jTableGuards, "XXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXX"); } private void clearSelections() { for (int row = 0; row < jTableGuards.getRowCount(); row++) { jTableGuards.setValueAt(false, row, 3); } } private void doClose(int retStatus) { returnStatus = retStatus; setVisible(false); dispose(); } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public int getReturnStatus() { return returnStatus; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { popupTable = new javax.swing.JPopupMenu(); jMenuNodeDetails = new javax.swing.JMenuItem(); jMenuWhois = new javax.swing.JMenuItem(); jScrollPane1 = new javax.swing.JScrollPane(); jTableGuards = new javax.swing.JTable(); jButtonClear = new javax.swing.JButton(); jButtonApply = new javax.swing.JButton(); jButtonClose = new javax.swing.JButton(); jTextArea1 = new javax.swing.JTextArea(); popupTable.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { popupTablePopupMenuWillBecomeVisible(evt); } public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) { } public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { } }); jMenuNodeDetails.setText(LOCAL.getString("table_popup_details")); // NOI18N jMenuNodeDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuNodeDetailsActionPerformed(evt); } }); popupTable.add(jMenuNodeDetails); jMenuWhois.setText(LOCAL.getString("table_popup_whois")); // NOI18N jMenuWhois.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuWhoisActionPerformed(evt); } }); popupTable.add(jMenuWhois); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(LOCAL.getString("wintitle_guardnodes")); // NOI18N setResizable(false); jTableGuards.setAutoCreateRowSorter(true); jTableGuards.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jTableGuards.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableGuardsMouseClicked(evt); } }); jScrollPane1.setViewportView(jTableGuards); jButtonClear.setText(LOCAL.getString("button_clearguards")); // NOI18N jButtonClear.setToolTipText(LOCAL.getString("ttip_clearguards")); // NOI18N jButtonClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonClearActionPerformed(evt); } }); jButtonApply.setText(LOCAL.getString("button_apply")); // NOI18N jButtonApply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonApplyActionPerformed(evt); } }); jButtonClose.setText(LOCAL.getString("button_close")); // NOI18N jButtonClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCloseActionPerformed(evt); } }); jTextArea1.setEditable(false); jTextArea1.setColumns(40); jTextArea1.setFont(new javax.swing.JLabel().getFont()); jTextArea1.setLineWrap(true); jTextArea1.setRows(2); jTextArea1.setText(LOCAL.getString("label_guard_minimum")); // NOI18N jTextArea1.setWrapStyleWord(true); jTextArea1.setDisabledTextColor(jTextArea1.getForeground()); jTextArea1.setEnabled(false); jTextArea1.setMinimumSize(new java.awt.Dimension(0, 0)); jTextArea1.setOpaque(false); jTextArea1.setRequestFocusEnabled(false); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButtonClear) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonClose) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonApply)) .addComponent(jTextArea1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jTextArea1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonClear) .addComponent(jButtonApply) .addComponent(jButtonClose)) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed doClose(CANCEL); }//GEN-LAST:event_jButtonCloseActionPerformed private void jButtonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed nl.saveGuardWhitelist(); doClose(APPLY); }//GEN-LAST:event_jButtonApplyActionPerformed private void jButtonClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonClearActionPerformed clearSelections(); }//GEN-LAST:event_jButtonClearActionPerformed private void jMenuNodeDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuNodeDetailsActionPerformed String finger = (String) gntm.getValueAt(intRowSelected, 4); finger = finger.replace("$", ""); Utilities.openFileExternally(ATLAS + "#details/" + finger); }//GEN-LAST:event_jMenuNodeDetailsActionPerformed private void jMenuWhoisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuWhoisActionPerformed String finger = (String) gntm.getValueAt(intRowSelected, 4); NodeItem ni = nl.getNode(finger); if (ni != null) { Utilities.openFileExternally("https://www.networksolutions.com/whois/results.jsp?ip=" + ni.getIPAddress()); } }//GEN-LAST:event_jMenuWhoisActionPerformed private void popupTablePopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_popupTablePopupMenuWillBecomeVisible jMenuWhois.setEnabled(intRowSelected > -1); jMenuNodeDetails.setEnabled(intRowSelected > -1); }//GEN-LAST:event_popupTablePopupMenuWillBecomeVisible private void jTableGuardsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableGuardsMouseClicked if (evt.getButton() != MouseEvent.BUTTON1) { return; } intRowSelected = jTableGuards.getSelectedRow(); if (intRowSelected > 0) { intRowSelected = jTableGuards.convertRowIndexToModel(intRowSelected); } }//GEN-LAST:event_jTableGuardsMouseClicked // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonApply; private javax.swing.JButton jButtonClear; private javax.swing.JButton jButtonClose; private javax.swing.JMenuItem jMenuNodeDetails; private javax.swing.JMenuItem jMenuWhois; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTableGuards; private javax.swing.JTextArea jTextArea1; private javax.swing.JPopupMenu popupTable; // End of variables declaration//GEN-END:variables } selektor-3.13.73/src/client/PatternsEditor.java0000644000175000017500000005461013302030722020715 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import lib.InfoDialog; import java.awt.Component; import java.awt.FontMetrics; import java.awt.Frame; import java.awt.event.ItemEvent; import java.util.ArrayList; import java.util.regex.Pattern; import javax.swing.DefaultComboBoxModel; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; import lib.Localisation; /** * * @author Alistair Neil, */ public final class PatternsEditor extends javax.swing.JDialog { public static final int CANCEL = 0; public static final int APPLY = 1; private final PACTableModel pactm = new PACTableModel(); private PacFactory pacFactory = null; private String strChange = null; private Frame parent = null; private String strSelectedCountry = null; private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); /** * Creates a PatternsEditor dialog * * @param parent Parent frame * @param modal Modality * @param pacfactory PacFactory being edited */ public PatternsEditor(java.awt.Frame parent, boolean modal, PacFactory pacfactory) { super(parent, modal); this.parent = parent; pacFactory = pacfactory; initComponents(); pactm.setColumnName(LOCAL.getString("patterntable_col1"), 0); pactm.setColumnName(LOCAL.getString("patterntable_col2"), 1); pactm.setColumnName(LOCAL.getString("patterntable_col3"), 2); jTablePatterns.setModel(pactm); jTablePatterns.setDefaultRenderer(String.class, new CustomTableCellRenderer()); // Adjust our column widths adjustTableColumnWidth(0, "AAAAAAAAAA"); adjustTableColumnWidth(1, "AAAAAAAAAAAAAAAAAAAAAAAA"); adjustTableColumnWidth(2, "AAA"); jTablePatterns.setRowHeight(jLabel1.getHeight() + 1); jTablePatterns.setShowGrid(true); jTextDoNotProxy.setText(pacFactory.getDoNotProxy()); } /** * Populate the country combobox with a list of countries * * @param countries String[] of countries */ public void populateCountryComboBox(String[] countries) { jComboCountry.setModel(new DefaultComboBoxModel<>(countries)); jComboCountry.setSelectedIndex(-1); } /** * Set the selected country * * @param country */ public void setSelectedCountry(String country) { jComboCountry.setSelectedItem(country); } /** * Populate the patterns table * * @param patterns an ArrayList of pattern rules */ private void populatePatternsTable(ArrayList patterns) { // Clear all entries from table while (pactm.getRowCount() > 0) { pactm.removeRow(0); } // If patterns null just return; if (patterns == null) { strChange = pactm.toString() + jTextDoNotProxy.getText(); return; } // Populate table Pattern pat = Pattern.compile(","); String[] split; Object[] obj = new Object[3]; for (String s : patterns) { split = pat.split(s); if (split.length < 4) { continue; } obj[0] = split[0]; obj[1] = split[1]; try { obj[2] = Boolean.valueOf(split[2]); } catch (Exception ex) { obj[2] = true; } pactm.addRow(obj, (split[3]).contains("user")); } strChange = pactm.toString() + jTextDoNotProxy.getText(); } /** * Test to see if patterns table has changed * * @return boolean True if changed */ private boolean isPatternsTableChanged() { if (strChange == null) { return false; } String temp = pactm.toString() + jTextDoNotProxy.getText(); return (!temp.contentEquals(strChange)); } /** * Save patterns and rebuild active country pac if required */ private void savePatterns() { String s; Boolean b; ArrayList listUser = new ArrayList<>(); int rowCount = pactm.getRowCount(); if (rowCount > 0) { for (int i = 0; i < rowCount; i++) { s = pactm.getValueAt(i, 0) + "," + pactm.getValueAt(i, 1); b = (Boolean) pactm.getValueAt(i, 2); if (b) { s += ",true"; } else { s += ",false"; } listUser.add(s); } } if (listUser.isEmpty()) { pacFactory.deletePatternsFile(strSelectedCountry, PacFactory.FILEUSER); } else { pacFactory.savePatternsList(strSelectedCountry, PacFactory.FILEUSER, listUser); } pacFactory.setDoNotProxy(jTextDoNotProxy.getText()); strChange = pactm.toString() + jTextDoNotProxy.getText(); } /** * This is a check to see if any pattern save are required before exiting * the pattern editor */ private int saveOnExitCheck() { int result = CANCEL; if (jButtonSave.isEnabled()) { jComboCountry.hidePopup(); InfoDialog id = new InfoDialog(parent); id.createWarn(LOCAL.getString("dlg_patterneditsave_title"), LOCAL.getString("dlg_patterneditsave_body")); id.setVisible(true); strChange = null; if (id.getReturnStatus() == InfoDialog.OK) { savePatterns(); result = APPLY; } jButtonSave.setEnabled(isPatternsTableChanged()); } return result; } /** * Will adjust table column widths based on fontmetrics * * @param col Column to be adjusted * @param text Text string to adjust for */ private void adjustTableColumnWidth(int col, String text) { FontMetrics ourFontMetrics = getFontMetrics(jTablePatterns.getTableHeader().getFont()); jTablePatterns.getColumn(jTablePatterns.getColumnName(col)).setPreferredWidth(ourFontMetrics.stringWidth(text)); } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public int getReturnStatus() { return returnStatus; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jButtonSave = new javax.swing.JButton(); jButtonCancel = new javax.swing.JButton(); jComboCountry = new javax.swing.JComboBox<>(); jButtonDeletePattern = new javax.swing.JButton(); jButtonAddPattern = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTablePatterns = new javax.swing.JTable(); jLabel17 = new javax.swing.JLabel(); jTextDoNotProxy = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Proxy Pattern Editor"); setIconImage(null); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jButtonSave.setText(LOCAL.getString("button_save")); // NOI18N jButtonSave.setEnabled(false); jButtonSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSaveActionPerformed(evt); } }); jButtonCancel.setText(LOCAL.getString("button_close")); // NOI18N jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancelActionPerformed(evt); } }); jComboCountry.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jComboCountry.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jComboCountryItemStateChanged(evt); } }); jButtonDeletePattern.setText(LOCAL.getString("button_delete")); // NOI18N jButtonDeletePattern.setEnabled(false); jButtonDeletePattern.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDeletePatternActionPerformed(evt); } }); jButtonAddPattern.setText(LOCAL.getString("button_addnew")); // NOI18N jButtonAddPattern.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAddPatternActionPerformed(evt); } }); jLabel1.setText(LOCAL.getString("label_editcountry")); // NOI18N jTablePatterns.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { } )); jTablePatterns.setToolTipText(LOCAL.getString("ttip_patterntable")); // NOI18N jTablePatterns.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN); jTablePatterns.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); jTablePatterns.getTableHeader().setResizingAllowed(false); jTablePatterns.getTableHeader().setReorderingAllowed(false); jTablePatterns.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { jTablePatternsMouseReleased(evt); } }); jTablePatterns.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jTablePatternsKeyReleased(evt); } }); jScrollPane1.setViewportView(jTablePatterns); jLabel17.setText(LOCAL.getString("label_donotproxy")); // NOI18N jTextDoNotProxy.setToolTipText(LOCAL.getString("ttip_donotproxy")); // NOI18N jTextDoNotProxy.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTextDoNotProxyFocusLost(evt); } }); jTextDoNotProxy.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jTextDoNotProxyKeyReleased(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(layout.createSequentialGroup() .addComponent(jComboCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addComponent(jButtonDeletePattern) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonAddPattern) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonCancel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonSave)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel17) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextDoNotProxy))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jComboCountry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextDoNotProxy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel17)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonDeletePattern) .addComponent(jButtonCancel) .addComponent(jButtonSave) .addComponent(jButtonAddPattern)) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveActionPerformed savePatterns(); jButtonSave.setEnabled(isPatternsTableChanged()); doClose(APPLY); }//GEN-LAST:event_jButtonSaveActionPerformed private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed doClose(saveOnExitCheck()); }//GEN-LAST:event_jButtonCancelActionPerformed /** * Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog doClose(CANCEL); }//GEN-LAST:event_closeDialog private void jComboCountryItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboCountryItemStateChanged if (evt.getStateChange() != ItemEvent.SELECTED) { return; } saveOnExitCheck(); // Check for no entries if (jComboCountry.getItemCount() == 0) { jTablePatterns.setEnabled(false); jButtonDeletePattern.setEnabled(false); jButtonAddPattern.setEnabled(false); jButtonSave.setEnabled(false); populatePatternsTable(null); return; } // We reach here if we have selected a valid country jTablePatterns.setEnabled(true); jButtonAddPattern.setEnabled(true); strSelectedCountry = (String) jComboCountry.getSelectedItem(); ArrayList patterns = new ArrayList<>(); pacFactory.loadPatternsList(strSelectedCountry, patterns); populatePatternsTable(patterns); }//GEN-LAST:event_jComboCountryItemStateChanged private void jTablePatternsMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTablePatternsMouseReleased jButtonDeletePattern.setEnabled(jTablePatterns.isCellEditable(jTablePatterns.getSelectedRow(), 0)); jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jTablePatternsMouseReleased private void jButtonDeletePatternActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeletePatternActionPerformed int[] i; while (true) { i = jTablePatterns.getSelectedRows(); if (i.length == 0) { break; } pactm.removeRow(i[0]); } jButtonDeletePattern.setEnabled(false); jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jButtonDeletePatternActionPerformed private void jTablePatternsKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTablePatternsKeyReleased jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jTablePatternsKeyReleased private void jButtonAddPatternActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddPatternActionPerformed QuickAddDialog qad = new QuickAddDialog(parent, true); qad.setTitle("Add new pattern"); qad.setLocationRelativeTo(this); qad.setVisible(true); if (qad.getReturnStatus() == QuickAddDialog.CANCEL) { return; } if (!qad.getPattern().isEmpty()) { pactm.addRow(new Object[]{qad.getDescription(), qad.getPattern(), Boolean.TRUE}, true); } jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jButtonAddPatternActionPerformed private void jTextDoNotProxyKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextDoNotProxyKeyReleased jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jTextDoNotProxyKeyReleased private void jTextDoNotProxyFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextDoNotProxyFocusLost jButtonSave.setEnabled(isPatternsTableChanged()); }//GEN-LAST:event_jTextDoNotProxyFocusLost private void doClose(int retStatus) { returnStatus = retStatus; setVisible(false); dispose(); } /** * CustomTableCellRenderer */ public class CustomTableCellRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); // Only for specific cell if (table.isRowSelected(row)) { return c; } if (column < 2) { if (table.getModel().isCellEditable(row, column)) { c.setBackground(javax.swing.UIManager.getDefaults().getColor("Table.background")); } else { c.setBackground(javax.swing.UIManager.getDefaults().getColor("control")); } } return c; } } /** * PACTableModel class */ public class PACTableModel extends DefaultTableModel { @SuppressWarnings("rawtypes") private final String[] columnNames = {"Description", "Pattern", "Enabled"}; private final Class[] types = new Class[]{ java.lang.String.class, java.lang.String.class, java.lang.Boolean.class }; private final ArrayList rowedit = new ArrayList<>(); public void addRow(Object[] obj, boolean editable) { addRow(obj); rowedit.add(editable); } /** * Constructor */ public PACTableModel() { } /** * Get column count as integer * * @return columns as integer */ @Override public int getColumnCount() { return types.length; } /** * Get column class * * @param columnIndex * @return object Class */ @Override @SuppressWarnings("rawtypes") public Class getColumnClass(int columnIndex) { return types[columnIndex]; } /** * Test if cell at given row, col is editable * * @param row * @param column * @return True if editable */ @Override public boolean isCellEditable(int row, int column) { if (column == 2) { return true; } else { return rowedit.get(row); } } /** * Get column name at given index * * @param index * @return name as string */ @Override public String getColumnName(int index) { return columnNames[index]; } /** * Set the column name at the specified index * * @param name * @param index */ public void setColumnName(String name, int index) { if (index < columnNames.length) { columnNames[index] = name; } } /** * Returns all data as a single string * * @return string */ @Override public String toString() { return getDataVector().toString(); } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonAddPattern; private javax.swing.JButton jButtonCancel; private javax.swing.JButton jButtonDeletePattern; private javax.swing.JButton jButtonSave; private javax.swing.JComboBox jComboCountry; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel17; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTablePatterns; private javax.swing.JTextField jTextDoNotProxy; // End of variables declaration//GEN-END:variables private int returnStatus = CANCEL; } selektor-3.13.73/src/client/PrefsDialog.java0000644000175000017500000007646013302030722020154 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import javax.swing.DefaultComboBoxModel; import lib.Localisation; import lib.SimpleProps; import lib.Utilities; /** * * @author Alistair Neil, */ public final class PrefsDialog extends javax.swing.JDialog { public static final int CANCEL = 0; public static final int APPLY = 1; public static final int RESET = 2; private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); private final SimpleProps sp; private final String disabledprefs; /** * Creates a preferences editor dialog * * @param parent Parent Frame * @param sp * @param disabledprefs */ public PrefsDialog(java.awt.Frame parent, SimpleProps sp, String disabledprefs) { super(parent, true); this.sp = sp; this.disabledprefs = disabledprefs; initComponents(); loadBasicPrefs(false); loadAdvancedPrefs(false); } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public int getReturnStatus() { return returnStatus; } public void loadBasicPrefs(boolean usedefault) { sp.setDefaultModeEnabled(usedefault); jCheckAutostart.setSelected(sp.getBool("PREF_AUTOSTART")); jCheckDisableTray.setSelected(sp.getBool("PREF_NOSYSTRAY")); jCheckHideMin.setEnabled(!jCheckDisableTray.isSelected()); jCheckHideTray.setSelected(sp.getBool("PREF_HIDETOTRAY")); jCheckAppUpdate.setSelected(sp.getBool("PREF_UPDATECHECK")); jCheckMinOnClose.setSelected(sp.getBool("PREF_MINONCLOSE")); jCheckCacheDelete.setSelected(sp.getBool("PREF_CACHEDELETE")); jCheckDisableNotify.setSelected(sp.getBool("PREF_DISABLE_NOTIFY")); jCheckHideMin.setSelected(sp.getBool("PREF_HIDE_MIN")); jCheckGeoUpdate.setSelected(sp.getBool("PREF_GEOCHECK")); if (disabledprefs.contains("jCheckDisableTray")) { jCheckDisableTray.setEnabled(false); jCheckHideMin.setEnabled(false); } jCheckAppUpdate.setVisible(!disabledprefs.contains("jCheckAppUpdate")); sp.setDefaultModeEnabled(false); updatePortRanges(sp.getInt("PREF_TOR_TESTHREADS")); } /** * Load the preferences * * @param usedefault */ public void loadAdvancedPrefs(boolean usedefault) { sp.setDefaultModeEnabled(usedefault); jTextHTTPProxy.setText(sp.getString("PREF_HTTP_PROXY")); jSpinnerMainPort.setValue(sp.getInt("PREF_LISTENPORT")); jTextTorBridge.setText(sp.getString("PREF_TORBRIDGE")); jTextTorArgs.setText(sp.getString("PREF_TORARGS")); jComboLogLev.setSelectedIndex(sp.getInt("PREF_TORLOGLEV")); jCheckSafeSocks.setSelected(sp.getBool("PREF_SAFESOCKS")); jCheckTestSocks.setSelected(sp.getBool("PREF_TESTSOCKS")); jCheckAvoidDisk.setSelected(sp.getBool("PREF_AVOIDDISK")); jCheckSafeLog.setSelected(sp.getBool("PREF_SAFELOG")); sp.setDefaultModeEnabled(false); } /** * Save preferences */ public void savePreferences() { sp.setInt("PREF_LISTENPORT", (Integer) jSpinnerMainPort.getValue()); sp.setInt("PREF_TORLOGLEV", jComboLogLev.getSelectedIndex()); sp.setBool("PREF_AUTOSTART", jCheckAutostart.isSelected()); sp.setBool("PREF_NOSYSTRAY", jCheckDisableTray.isSelected()); sp.setBool("PREF_HIDETOTRAY", jCheckHideTray.isSelected()); sp.setBool("PREF_UPDATECHECK", jCheckAppUpdate.isSelected()); sp.setBool("PREF_MINONCLOSE", jCheckMinOnClose.isSelected()); sp.setBool("PREF_SAFESOCKS", jCheckSafeSocks.isSelected()); sp.setBool("PREF_TESTSOCKS", jCheckTestSocks.isSelected()); sp.setBool("PREF_AVOIDDISK", jCheckAvoidDisk.isSelected()); sp.setBool("PREF_SAFELOG", jCheckSafeLog.isSelected()); sp.setBool("PREF_CACHEDELETE", jCheckCacheDelete.isSelected()); sp.setBool("PREF_DISABLE_NOTIFY", jCheckDisableNotify.isSelected()); sp.setBool("PREF_HIDE_MIN", jCheckHideMin.isSelected()); sp.setBool("PREF_GEOCHECK", jCheckGeoUpdate.isSelected()); sp.setString("PREF_HTTP_PROXY", jTextHTTPProxy.getText()); sp.setString("PREF_TORBRIDGE", jTextTorBridge.getText()); sp.setString("PREF_TORARGS", jTextTorArgs.getText()); } /** * Update displayed port ranges to reflect any port changes */ private void updatePortRanges(int threads) { int intBasePort = sp.getInt("PREF_LISTENPORT"); String strRanges = LOCAL.getString("label_portranges"); strRanges = strRanges.replace("$portmin", String.valueOf(intBasePort)); strRanges = strRanges.replace("$portmax", String.valueOf(intBasePort + (threads * 2) + 1)); jLabelPortRanges.setText(strRanges); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jTabPrefs = new javax.swing.JTabbedPane(); jPanelBasicPrefs = new javax.swing.JPanel(); jPanelGeneralPrefs = new javax.swing.JPanel(); jCheckHideTray = new javax.swing.JCheckBox(); jCheckAppUpdate = new javax.swing.JCheckBox(); jCheckAutostart = new javax.swing.JCheckBox(); jCheckDisableTray = new javax.swing.JCheckBox(); jCheckMinOnClose = new javax.swing.JCheckBox(); jCheckCacheDelete = new javax.swing.JCheckBox(); jCheckDisableNotify = new javax.swing.JCheckBox(); jCheckHideMin = new javax.swing.JCheckBox(); jCheckGeoUpdate = new javax.swing.JCheckBox(); jPanelAdvancedPrefs = new javax.swing.JPanel(); jPanelTorPrefs = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jSpinnerMainPort = new javax.swing.JSpinner(); jLabelPortRanges = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jTextTorBridge = new javax.swing.JTextField(); jButtonGetBridges = new javax.swing.JButton(); jCheckSafeSocks = new javax.swing.JCheckBox(); jLabel12 = new javax.swing.JLabel(); jCheckTestSocks = new javax.swing.JCheckBox(); jLabel13 = new javax.swing.JLabel(); jTextTorArgs = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); jCheckAvoidDisk = new javax.swing.JCheckBox(); jLabel15 = new javax.swing.JLabel(); jComboLogLev = new javax.swing.JComboBox<>(); jCheckSafeLog = new javax.swing.JCheckBox(); jPanel1 = new javax.swing.JPanel(); jLabel16 = new javax.swing.JLabel(); jTextHTTPProxy = new javax.swing.JTextField(); jButtonCancel = new javax.swing.JButton(); jButtonApply = new javax.swing.JButton(); jButtonDefaults = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setIconImage(null); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jTabPrefs.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { jTabPrefsStateChanged(evt); } }); jPanelBasicPrefs.setFont(jPanelBasicPrefs.getFont().deriveFont(jPanelBasicPrefs.getFont().getStyle() | java.awt.Font.BOLD)); jPanelGeneralPrefs.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_general"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelBasicPrefs.getFont(), jPanelBasicPrefs.getForeground())); // NOI18N jCheckHideTray.setText(LOCAL.getString("chkbox_hidetotray")); // NOI18N jCheckHideTray.setToolTipText(LOCAL.getString("ttip_hidetotray")); // NOI18N jCheckAppUpdate.setSelected(true); jCheckAppUpdate.setText(LOCAL.getString("chkbox_checkforupdates")); // NOI18N jCheckAppUpdate.setToolTipText(LOCAL.getString("ttip_checkforupdates")); // NOI18N jCheckAutostart.setText(LOCAL.getString("chkbox_autostart")); // NOI18N jCheckAutostart.setToolTipText(LOCAL.getString("ttip_autostart")); // NOI18N jCheckDisableTray.setText(LOCAL.getString("chkbox_disabletray")); // NOI18N jCheckDisableTray.setToolTipText(LOCAL.getString("ttip_disabletray")); // NOI18N jCheckDisableTray.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { jCheckDisableTrayItemStateChanged(evt); } }); jCheckMinOnClose.setText(LOCAL.getString("chkbox_minonclose")); // NOI18N jCheckMinOnClose.setToolTipText(LOCAL.getString("ttip_minonclose")); // NOI18N jCheckCacheDelete.setText(LOCAL.getString("chkbox_securedelete")); // NOI18N jCheckCacheDelete.setToolTipText(LOCAL.getString("ttip_securedelete")); // NOI18N jCheckDisableNotify.setText(LOCAL.getString("chkbox_disablenotify")); // NOI18N jCheckDisableNotify.setToolTipText(LOCAL.getString("ttip_disablenotify")); // NOI18N jCheckHideMin.setText(LOCAL.getString("chkbox_hidemin")); // NOI18N jCheckHideMin.setToolTipText(LOCAL.getString("ttip_hidemin")); // NOI18N jCheckGeoUpdate.setSelected(true); jCheckGeoUpdate.setText(LOCAL.getString("chkbox_geocheck")); // NOI18N jCheckGeoUpdate.setToolTipText(LOCAL.getString("ttip_geocheck")); // NOI18N javax.swing.GroupLayout jPanelGeneralPrefsLayout = new javax.swing.GroupLayout(jPanelGeneralPrefs); jPanelGeneralPrefs.setLayout(jPanelGeneralPrefsLayout); jPanelGeneralPrefsLayout.setHorizontalGroup( jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelGeneralPrefsLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCheckAutostart) .addComponent(jCheckHideTray) .addComponent(jCheckCacheDelete) .addComponent(jCheckHideMin) .addComponent(jCheckDisableNotify)) .addGap(18, 18, 18) .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCheckAppUpdate) .addComponent(jCheckGeoUpdate) .addComponent(jCheckDisableTray) .addComponent(jCheckMinOnClose)) .addContainerGap(39, Short.MAX_VALUE)) ); jPanelGeneralPrefsLayout.setVerticalGroup( jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelGeneralPrefsLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckAutostart) .addComponent(jCheckGeoUpdate)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckHideTray) .addComponent(jCheckDisableTray)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckHideMin) .addComponent(jCheckMinOnClose)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelGeneralPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckCacheDelete) .addComponent(jCheckAppUpdate)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckDisableNotify) .addContainerGap(132, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanelBasicPrefsLayout = new javax.swing.GroupLayout(jPanelBasicPrefs); jPanelBasicPrefs.setLayout(jPanelBasicPrefsLayout); jPanelBasicPrefsLayout.setHorizontalGroup( jPanelBasicPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBasicPrefsLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanelGeneralPrefs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanelBasicPrefsLayout.setVerticalGroup( jPanelBasicPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBasicPrefsLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanelGeneralPrefs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jTabPrefs.addTab(LOCAL.getString("tab_basic"), jPanelBasicPrefs); // NOI18N jPanelTorPrefs.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_torclientset"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelBasicPrefs.getFont(), jPanelBasicPrefs.getForeground())); // NOI18N jLabel6.setText(LOCAL.getString("label_listenport")); // NOI18N jSpinnerMainPort.setModel(new javax.swing.SpinnerNumberModel(9054, 9054, 9999, 1)); jSpinnerMainPort.setToolTipText(LOCAL.getString("ttip_listenport")); // NOI18N jLabelPortRanges.setText("Currently active port ranges, 9052 to 9063"); jLabel11.setText(LOCAL.getString("label_bridgeaddress")); // NOI18N jTextTorBridge.setToolTipText(LOCAL.getString("ttip_bridgeaddress")); // NOI18N jButtonGetBridges.setText(LOCAL.getString("button_getbridges")); // NOI18N jButtonGetBridges.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGetBridgesActionPerformed(evt); } }); jCheckSafeSocks.setText(LOCAL.getString("chkbox_safesocks")); // NOI18N jCheckSafeSocks.setToolTipText(LOCAL.getString("ttip_safesocks")); // NOI18N jLabel12.setText(LOCAL.getString("label_torlogging")); // NOI18N jCheckTestSocks.setText(LOCAL.getString("chkbox_testsocks")); // NOI18N jCheckTestSocks.setToolTipText(LOCAL.getString("ttip_testsocks")); // NOI18N jLabel13.setText(LOCAL.getString("label_torargs")); // NOI18N jTextTorArgs.setToolTipText(LOCAL.getString("ttip_extraargs")); // NOI18N jLabel14.setText(LOCAL.getString("label_torsocks")); // NOI18N jCheckAvoidDisk.setText(LOCAL.getString("chkbox_diskavoid")); // NOI18N jCheckAvoidDisk.setToolTipText(LOCAL.getString("ttip_avoiddisk")); // NOI18N jLabel15.setText(LOCAL.getString("label_diskoptions")); // NOI18N jComboLogLev.setModel(new DefaultComboBoxModel<>(new String[] {LOCAL.getString("combo_loglev1"),LOCAL.getString("combo_loglev2"),LOCAL.getString("combo_loglev3")})); jComboLogLev.setToolTipText(LOCAL.getString("ttip_combo_loglevel")); // NOI18N jCheckSafeLog.setText(LOCAL.getString("chkbox_safelog")); // NOI18N jCheckSafeLog.setToolTipText(LOCAL.getString("ttip_safelogging")); // NOI18N javax.swing.GroupLayout jPanelTorPrefsLayout = new javax.swing.GroupLayout(jPanelTorPrefs); jPanelTorPrefs.setLayout(jPanelTorPrefsLayout); jPanelTorPrefsLayout.setHorizontalGroup( jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelTorPrefsLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel14) .addComponent(jLabel15) .addComponent(jLabel12) .addComponent(jLabel13) .addComponent(jLabel11) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanelTorPrefsLayout.createSequentialGroup() .addComponent(jCheckSafeSocks) .addGap(18, 18, 18) .addComponent(jCheckTestSocks)) .addComponent(jCheckAvoidDisk) .addGroup(jPanelTorPrefsLayout.createSequentialGroup() .addComponent(jComboLogLev, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jCheckSafeLog)) .addGroup(jPanelTorPrefsLayout.createSequentialGroup() .addComponent(jTextTorBridge, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonGetBridges)) .addGroup(jPanelTorPrefsLayout.createSequentialGroup() .addComponent(jSpinnerMainPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelPortRanges)) .addComponent(jTextTorArgs)) .addContainerGap()) ); jPanelTorPrefsLayout.setVerticalGroup( jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelTorPrefsLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(jLabelPortRanges) .addComponent(jSpinnerMainPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(jTextTorBridge, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonGetBridges)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel14) .addComponent(jCheckSafeSocks) .addComponent(jCheckTestSocks)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12) .addComponent(jComboLogLev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckSafeLog)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel15) .addComponent(jCheckAvoidDisk)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelTorPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel13) .addComponent(jTextTorArgs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_network"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelBasicPrefs.getFont(), jPanelBasicPrefs.getForeground())); // NOI18N jLabel16.setText(LOCAL.getString("label_defaultproxy")); // NOI18N jTextHTTPProxy.setToolTipText(LOCAL.getString("ttip_defaultproxy")); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel16) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextHTTPProxy) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel16) .addComponent(jTextHTTPProxy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout jPanelAdvancedPrefsLayout = new javax.swing.GroupLayout(jPanelAdvancedPrefs); jPanelAdvancedPrefs.setLayout(jPanelAdvancedPrefsLayout); jPanelAdvancedPrefsLayout.setHorizontalGroup( jPanelAdvancedPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelAdvancedPrefsLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelAdvancedPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelTorPrefs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanelAdvancedPrefsLayout.setVerticalGroup( jPanelAdvancedPrefsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelAdvancedPrefsLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanelTorPrefs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jTabPrefs.addTab(LOCAL.getString("tab_advanced"), jPanelAdvancedPrefs); // NOI18N jButtonCancel.setText(LOCAL.getString("button_close")); // NOI18N jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancelActionPerformed(evt); } }); jButtonApply.setText(LOCAL.getString("button_apply")); // NOI18N jButtonApply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonApplyActionPerformed(evt); } }); jButtonDefaults.setText(LOCAL.getString("button_prefdefaults")); // NOI18N jButtonDefaults.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDefaultsActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jButtonDefaults) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonCancel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonApply) .addContainerGap()) .addComponent(jTabPrefs) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jTabPrefs) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonApply) .addComponent(jButtonCancel) .addComponent(jButtonDefaults)) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonApplyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed savePreferences(); updatePortRanges(sp.getInt("PREF_TOR_TESTHREADS")); doClose(APPLY); }//GEN-LAST:event_jButtonApplyActionPerformed private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed doClose(CANCEL); }//GEN-LAST:event_jButtonCancelActionPerformed /** * Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog doClose(CANCEL); }//GEN-LAST:event_closeDialog private void jButtonGetBridgesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGetBridgesActionPerformed Utilities.openFileExternally("https://bridges.torproject.org/bridges?lang=" + LOCAL.toWebLanguageTag()); }//GEN-LAST:event_jButtonGetBridgesActionPerformed private void jButtonDefaultsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDefaultsActionPerformed switch (jTabPrefs.getSelectedIndex()) { // Basic tab case 0: loadBasicPrefs(true); break; // Advanced tab case 1: loadAdvancedPrefs(true); break; } }//GEN-LAST:event_jButtonDefaultsActionPerformed private void jTabPrefsStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabPrefsStateChanged switch (jTabPrefs.getSelectedIndex()) { case 0: jButtonDefaults.setToolTipText(LOCAL.getString("ttip_resetbasicprefs")); break; case 1: jButtonDefaults.setToolTipText(LOCAL.getString("ttip_resetadvprefs")); break; } }//GEN-LAST:event_jTabPrefsStateChanged private void jCheckDisableTrayItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckDisableTrayItemStateChanged jCheckHideMin.setEnabled(!jCheckDisableTray.isSelected()); }//GEN-LAST:event_jCheckDisableTrayItemStateChanged private void doClose(int retStatus) { returnStatus = retStatus; setVisible(false); dispose(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonApply; private javax.swing.JButton jButtonCancel; private javax.swing.JButton jButtonDefaults; private javax.swing.JButton jButtonGetBridges; private javax.swing.JCheckBox jCheckAppUpdate; private javax.swing.JCheckBox jCheckAutostart; private javax.swing.JCheckBox jCheckAvoidDisk; private javax.swing.JCheckBox jCheckCacheDelete; private javax.swing.JCheckBox jCheckDisableNotify; private javax.swing.JCheckBox jCheckDisableTray; private javax.swing.JCheckBox jCheckGeoUpdate; private javax.swing.JCheckBox jCheckHideMin; private javax.swing.JCheckBox jCheckHideTray; private javax.swing.JCheckBox jCheckMinOnClose; private javax.swing.JCheckBox jCheckSafeLog; private javax.swing.JCheckBox jCheckSafeSocks; private javax.swing.JCheckBox jCheckTestSocks; private javax.swing.JComboBox jComboLogLev; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabelPortRanges; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanelAdvancedPrefs; private javax.swing.JPanel jPanelBasicPrefs; private javax.swing.JPanel jPanelGeneralPrefs; private javax.swing.JPanel jPanelTorPrefs; private javax.swing.JSpinner jSpinnerMainPort; private javax.swing.JTabbedPane jTabPrefs; private javax.swing.JTextField jTextHTTPProxy; private javax.swing.JTextField jTextTorArgs; private javax.swing.JTextField jTextTorBridge; // End of variables declaration//GEN-END:variables private int returnStatus = CANCEL; } selektor-3.13.73/src/client/TorMonFrame.java0000644000175000017500000002121113302030722020126 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package client; import javax.swing.JTextArea; import lib.GTKFixes; import lib.Localisation; import lib.OSFunction; /** * * @author Alistair Neil */ public class TorMonFrame extends javax.swing.JFrame { private static final Localisation LOCAL = new Localisation("resources/MessagesBundle"); /** * Creates new form TorMonFrame */ public TorMonFrame() { initComponents(); jTextAreaLaunch.setOpaque(OSFunction.isWindows()); jTextAreaStdOut.setOpaque(OSFunction.isWindows()); GTKFixes.fixTextAreaColor(jTextAreaLaunch); GTKFixes.fixTextAreaColor(jTextAreaStdOut); } /** * Set launch command text * * @param command */ public void setLaunchString(String command) { jTextAreaLaunch.setText(command); jTextAreaLaunch.setCaretPosition(0); } public JTextArea getStdoutTextArea() { return jTextAreaStdOut; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { jPanelMain = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextAreaLaunch = new javax.swing.JTextArea(); jPanel2 = new javax.swing.JPanel(); jScrollPaneStdOut = new javax.swing.JScrollPane(); jTextAreaStdOut = new javax.swing.JTextArea(); jButtonClose = new javax.swing.JButton(); setMinimumSize(new java.awt.Dimension(554, 492)); jPanelMain.setFont(jPanelMain.getFont().deriveFont(jPanelMain.getFont().getStyle() | java.awt.Font.BOLD)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_startupargs"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelMain.getFont())); // NOI18N jTextAreaLaunch.setEditable(false); jTextAreaLaunch.setColumns(38); jTextAreaLaunch.setLineWrap(true); jTextAreaLaunch.setRows(7); jScrollPane1.setViewportView(jTextAreaLaunch); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LOCAL.getString("panel_stdout"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, jPanelMain.getFont())); // NOI18N jTextAreaStdOut.setEditable(false); jTextAreaStdOut.setColumns(38); jTextAreaStdOut.setRows(8); jScrollPaneStdOut.setViewportView(jTextAreaStdOut); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPaneStdOut) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPaneStdOut) .addContainerGap()) ); jButtonClose.setText(LOCAL.getString("button_close")); // NOI18N jButtonClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCloseActionPerformed(evt); } }); javax.swing.GroupLayout jPanelMainLayout = new javax.swing.GroupLayout(jPanelMain); jPanelMain.setLayout(jPanelMainLayout); jPanelMainLayout.setHorizontalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelMainLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jButtonClose))) .addContainerGap()) ); jPanelMainLayout.setVerticalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonClose) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// //GEN-END:initComponents private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed this.setVisible(false); }//GEN-LAST:event_jButtonCloseActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonClose; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanelMain; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPaneStdOut; private javax.swing.JTextArea jTextAreaLaunch; private javax.swing.JTextArea jTextAreaStdOut; // End of variables declaration//GEN-END:variables } selektor-3.13.73/src/resources/0000755000175000017500000000000013302030722015631 5ustar bannorbannorselektor-3.13.73/src/resources/MessagesBundle_pt_BR.properties0000644000175000017500000004046213302030722023744 0ustar bannorbannor# Portuguese BR, Default language file, provide by Paulo Roberto Alves de Oliveira (aka kretcheu) Licensed by GPL-2+ appdesc=$appname $appver, N\u00f3s de sa\u00edda Tor com simplicidade. text_yes=Sim text_no=N\u00e3o text_mode=N\u00f3 wintitle_prefs = Prefer\u00eancias $appname wintitle_about = Sobre $appname wintitle_patternedit = Editor de modelos $appname wintitle_guardnodes=Sele\u00e7\u00e3o de n\u00f3s guarda wintitle_tormonitor=Monitor do cliente Tor textfield_unknown=Desconhecido progstatus_initial=Iniciando... progstatus_generate=Gerando lista de n\u00f3s, por favor aguarde. progstatus_cachedated=Descri\u00e7\u00f5es armazenadas desatualizadas, iremos atualiz\u00e1-las. progstatus_nonet=Acesso a Internet n\u00e3o dispon\u00edvel. progstatus_checkrecommended=Verificando os \u00faltimos n\u00f3s recomendados. progstatus_gotrecommended=Lista de n\u00f3s recomendados recuperados. progstatus_torfailretry=O Tor falhou ao iniciar, tentando novamente. progstatus_nodefail=Ativa\u00e7\u00e3o requisitada do n\u00f3 falhou. progstatus_nodefailretry=Ativa\u00e7\u00e3o requisitada do n\u00f3 falhou, tentaremos novamente, por favor aguarde. progstatus_nodefailtorchoose=N\u00f3 requisitado fora de alcance, deixaremos o Tor escolher. progstatus_nodeactive3hop=Circuito de 3 saltos do n\u00f3 de sa\u00edda $nodename est\u00e1 ativo. progstatus_nodeactive2hop=Cirtuito de 2 saltos do n\u00f3 de sa\u00edda $nodename est\u00e1 ativo. progstatus_autoswitch=Troca autom\u00e1tica de n\u00f3 progstatus_manswitch=Trocando para n\u00f3 manualmente selecionado. progstatus_waitfortor=Aguardando ativa\u00e7\u00e3o do n\u00f3 pelo Tor. progstatus_switchtonode=Trocando para o n\u00f3 $nodename. progstatus_applychanges=Aplicando novas prefer\u00eancias. circuit_status_creating_2hop=Criando circuito de 2 saltos. circuit_status_creating_3hop=Criando circuito de 3 saltos. circuit_status_testing=Testanto circuito. circuit_status_aborted=Teste cancelado. circuit_status_built=Circuito $1 constru\u00eddo. circuit_status_passed=Circuito passou. circuit_status_failed=Circuito falhou. circuit_status_none=Nenhum circuito dispon\u00edvel. circuit_status_noroute=Todos roteadores fora. combo_proxymode1=Desabilitado combo_proxymode2=Proxy por modelo combo_proxymode3=Proxy para todo tr\u00e1fego combo_loglev1=Depura\u00e7\u00e3o combo_loglev2=Informa\u00e7\u00e3o combo_loglev3=Aviso traymenu_proxymode1=Modo: Proxy Desabilitado traymenu_proxymode2=Modo: Proxy por modelo traymenu_proxymode3=Modo: Proxy para todo tr\u00e1fego traymenu_showgui=Esconde/Mostra GUI traytool_guardnode=N\u00f3 guarda traytool_exitnode=N\u00f3 de sa\u00edda exittable_col1=N\u00f3 de sa\u00edda exittable_col2=Largura de Banda (MB\/s) exittable_col3=Lat\u00eancia (ms) exittable_col4=Estado exittable_col5=Favorito guardtable_col1=N\u00f3 guarda guardtable_col2=Pa\u00eds guardtable_col3=Largura de Banda (MB\/s) guardtable_col4=Confi\u00e1vel patterntable_col1=Descri\u00e7\u00e3o patterntable_col2=Modelo patterntable_col3=Habilitado menu_menu=Menu menu_prefs=Prefer\u00eancias menu_quickadd=Adicione modelo rapidamente menu_patternedit=Editor de modelo de proxy menu_export=Exporta\u00e7\u00e3o de modelos menu_import=Importa\u00e7\u00e3o de modelos menu_quit=Sair menu_defaultpatterns=Modelos padr\u00e3o menu_userpatterns=Modelos de usu\u00e1rio menu_help=Ajuda menu_debuglog=Ver log de depura\u00e7\u00e3o menu_helpcontents=Conte\u00fado de ajuda menu_torcheck=Verificar roteamento Tor menu_about=Sobre menu_license=Licen\u00e7a menu_tormanual=Manual oficial do Tor menu_tormonitor=Monitor de cliente Tor menu_close=Menu fechar menu_proxy=Modo Proxy menu_leaktest=Testar vazamento de DNS menu_credits=Cr\u00e9ditos label_latency_url=URL de verifica\u00e7\u00e3o de lat\u00eancia do Tor: label_guardnode=Guarda: label_bridgenode=Ponte: label_activecountry=Pa\u00eds de sa\u00edda: label_proxymode=Modo do proxy: label_exitnode=N\u00f3 de sa\u00edda: label_torlatency=Lat\u00eancia label_fingerprint=Impress\u00e3o digital: label_bandwidth=Largura de banda label_streams=Fluxos label_stable=Est\u00e1vel label_status=Estado do cliente: label_listenport=Porta de escuta do Tor: label_defaultproxy=Proxy HTTP padr\u00e3o: label_bridgeaddress=Endere\u00e7o de ponte Tor: label_portranges=Intervalo atual de portas, $portmin at\u00e9 $portmax label_editcountry=Selecione o pa\u00eds para ver seu modelo label_quickadd_desc=Descri\u00e7\u00e3o: label_quickadd_pattern=Modelo: label_threshold=Limite label_exitip=IP de sa\u00edda: label_guardip=IP do n\u00f3 guarda: label_guardcountry=Pa\u00eds do n\u00f3 guarda: label_torlogging=N\u00edvel de log: label_torargs=Par\u00e2metros iniciais: label_torsocks=Configura\u00e7\u00e3o do Socks: label_diskoptions=Op\u00e7\u00f5es de disco: label_guard_minimum=Voc\u00ea pode tanto n\u00e3o ter n\u00f3s guarda selecionados, nesse caso o cliente Tor ir\u00e1 escolher ou ter 3 ou mais n\u00f3s guarda selecionados. label_nickname=Apelido label_ip=IP label_country=Pa\u00eds label_exit=Sa\u00edda: label_middle=Meio: label_donotproxy=Sem proxy: button_details=Detalhes do atlas button_whois=WhoIs button_close=Fechar button_apply=Aplicar button_delete=Apagar button_addnew=Adicionar novo button_save=Salvar button_cancel=Cancelar button_continue=Continuar button_getbridges=Obter pontes button_mozillarestart=Reiniciar $browser button_visitus=Visite-nos button_contactus=Contacte-nos button_translations=Tradu\u00e7\u00f5es n\u00e3o oficiais button_prefdefaults=Restaurar padr\u00f5es button_setguards=Definir n\u00f3s guarda button_clearguards=Limpar n\u00f3s guarda selecionados button_clearfavs=Limpar Favoritos button_support=Apoie o SelekTOR button_patreon=Apoie o SelekTOR com Patreon panel_info=Circuito ativo panel_general=Configura\u00e7\u00f5es gerais panel_network=Configura\u00e7\u00f5es de rede panel_management=Configura\u00e7\u00f5es de gest\u00e3o de n\u00f3s panel_torclientset=Configura\u00e7\u00f5es do cliente Tor panel_startupargs=Par\u00e2metros iniciais panel_stdout=Monitor de sa\u00edda chkbox_autoselect=Sele\u00e7\u00e3o autom\u00e1tica de n\u00f3s chkbox_autostart=Iniciar automaticamente o SelekTOR chkbox_checkforupdates=Verificar por atualiza\u00e7\u00f5es ao iniciar chkbox_disabletray=Desabilitar \u00edcone da bandeja. chkbox_autopatterns=Instalar automaticamente os \u00faltimos modelos. chkbox_mozillawarn=Desabilitar alerta Mozilla chkbox_recnodesonly=Usar n\u00f3s recomendados no modelo chkbox_hidetotray=Minimizar ao iniciar chkbox_minonclose=Minimizar ao inv\u00e9s de sair ao fechar chkbox_twohop=Usar circuitos de 2 saltos para n\u00f3 de sa\u00edda no modelo chkbox_safesocks=Socks seguro chkbox_warnunsafesocks=Avisar se inseguro chkbox_diskavoid=Evitar escrita no disco chkbox_testsocks=Testar Socks chkbox_safelog=Logging seguro chkbox_guardwarn1=Alertar se um n\u00f3 guarda n\u00e3o especificado for usado chkbox_securedelete=Apagar dados armazenados do Tor ao sair chkbox_guardwarn2=Alertar se menos de 3 n\u00f3s guardas forem selecionados ttip_autostart=Ir\u00e1 iniciar o SelekTOR automaticamente no boot/login. ttip_hidetotray=SelekTOR iniciar\u00e1 na bandeja do sistema ttip_checkforupdates=SelekTOR verificar\u00e1 por nova vers\u00e3o ao iniciar ttip_autoinstall=Buscar\u00e1 \u00faltimos modelos de Dazzleships.Net. ttip_disabletray=Desabilitar \u00edcone na bandeja do sistema ttip_mozillawarn=Desabilitar alerta do navegador Mozilla ttip_listenport=Cliente Tor escutando na porta. ttip_defaultproxy=Todo tr\u00e1fego n\u00e3o roteado pelo Tor ir\u00e1 ser redirecionado por esse proxy HTTP. ttip_donotproxy=Qualquer URL que contenha uma ou mais dessas entradas, separadas por v\u00edrgula, ser\u00e1 conectada diretamente. ttip_bridgeaddress=Para evitar bloqueio do provedor adicione um endere\u00e7o v\u00e1lido de ponte aqui. ttip_forcedns=Force pesquisa de DNS via Tor, precisa reiniciar o navegador. ttip_forcenode=Quando marcado o n\u00f3 \u00e9 ativado independente de atividade atual ttip_enhanon=Usar\u00e1 3 saltos de n\u00f3s ao inv\u00e9s de 2 saltos. ttip_recnodesonly=Usuar\u00e1 n\u00f3s recomendados do modelo ttip_minonclose=A aplica\u00e7\u00e3o ir\u00e1 minimizar ao inv\u00e9s de sair ao fechar a janela principal ttip_threshold=Limite de lat\u00eancia ttip_safesocks=Quando habilitado, o Tor ir\u00e1 rejeitar conex\u00f5es que usam varia\u00e7\u00f5es inseguras do protocolo socks. ttip_warnunsafe=Quando habilitado, o Tor ir\u00e1 avisar sempre que uma requisi\u00e7\u00e3o recebida contiver apenas IP ao inv\u00e9s de um nome de m\u00e1quina. ttip_testsocks=Quando habilitado, o Tor ir\u00e1 gerar um log de n\u00edvel aviso para cada conex\u00e3o, indicando se foi usado o protocolo socks seguro ou inseguro. ttip_safelogging=Quando habilitado, o Tor ir\u00e1 limpar o texto potencialmente cr\u00edtico das mensagens de log. ttip_avoiddisk=Quando habilitado, o Tor tentar\u00e1 escrever no disco com menos frequ\u00eancia. ttip_extraargs=Especifique par\u00e2metros adicionais, veja o manual do Tor. ttip_combo_loglevel=N\u00edvel de log do Tor. ttip_twohop=Usar circuitos de 2 saltos ao inv\u00e9s de 3 saltos, padr\u00e3o do Tor, reduz a lat\u00eancia mas diminui o anonimato. ttip_resetbasicprefs=Restaurar as prefer\u00eancias b\u00e1sicas para seus padr\u00f5es. ttip_resetadvprefs=Restaurar as prefer\u00eancias avan\u00e7adas para seus padr\u00f5es. ttip_securedelete=Quando habilitado, o armazenamento do Tor ser\u00e1 sobrescrito por zeros quanto apagado. ttip_autonode=Quando habilitado, o SelekTOR tentar\u00e1 escolher o n\u00f3 de melhor performance. ttip_guardwarn=Quando habilitado, um alerta ser\u00e1 usado para indicar que um n\u00f3 guarda n\u00e3o especificado est\u00e1 ativo. ttip_clearguards=Limpar n\u00f3s guarda selecionados. ttip_guardwarn2=Quando habilitado, um alerta ser\u00e1 usado para indicar insufici\u00eancia de n\u00f3s guarda selecionados. dlg_update_title=Atualiza\u00e7\u00e3o dispon\u00edvel. dlg_update_body=Vers\u00e3o $version est\u00e1 dispon\u00edvel para download. dlg_restoreproxy_title=Configura\u00e7\u00e3o original do proxy dlg_restoreproxy_body=Selecione continue para restaurar as configura\u00e7\u00f5es originais do proxy antes da instala\u00e7\u00e3o do SelekTOR. dlg_resetproxy_title=Configura\u00e7\u00e3o padr\u00e3o do proxy dlg_resetproxy_body=Selecione continuar para limpar as configura\u00e7\u00f5es de proxy para o padr\u00e3o do sistema. dlg_gsetting_title=Gsettings n\u00e3o encontrado dlg_gsetting_body=$appname n\u00e3o funciona sem o bin\u00e1rio gsettings instalado, em algumas distribui\u00e7\u00f5es pode ser encontrado no pacote libglib2.0-bin. dlg_torclient_title=Cliente TOR n\u00e3o encontrado dlg_torclient_body=$appname n\u00e3o funciona sem um cliente Tor instalado, por favor instale os pacotes tor e tor-geoipdb da sua distribui\u00e7\u00e3o. dlg_mozillarestart_title=Alerta: O navegador $browser est\u00e1 ativo. dlg_mozillarestart_body=O $appname detectou que o navegador $browser j\u00e1 est\u00e1 em execu\u00e7\u00e3o.\nReiniciar o navegador \u00e9 necess\u00e1rio para habilitar $appname.\n\nSe escolher reiniciar o $browser todas as abas abertas ser\u00e3o restauradas quando o $browser reiniciar, requer que a op\u00e7\u00e3o \"Restaurar janelas e abas anteriores\" seja selecionada no menu prefer\u00eancias no $browser.\n\nVoc\u00ea pode desabilitar o aviso do navegador em prefer\u00eancias de $appname. dlg_license_title=Licen\u00e7a $appname dlg_exportuser_title=Exportar modelo de usu\u00e1rio dlg_exportuser_body=Nenhum modelo de usu\u00e1rio encontrado.\n\nUse o editor de modelos para adicionar seus pr\u00f3rios modelos dlg_exportdefault_title=Exporte os modelos padr\u00e3o dlg_exportdefault_body=Nenhum modelo padr\u00e3o encontrado. dlg_saveuser_title=Salvar o modelo de usu\u00e1rio dlg_savedefault_title=Salvar os modelos padr\u00e3o dlg_import_title=Importar um arquivo de modelo dlg_import_success_title=Modelo importado dlg_import_success_body=Modelos importados com susesso e agora ativos. dlg_import_fail_title=Importa\u00e7\u00e3o falhou dlg_import_fail_body=Falhou ao importar modelos. dlg_whois_title=Whois $ipaddress dlg_whois_body=Por favor aguarde enquanto buscando dados Whois... dlg_whois_fail=Desculpe, n\u00e3o foi poss\u00edvel encontrar informa\u00e7\u00f5es de Whois. dlg_toold_body=O cliente Tor atualmente instalado \u00e9 antigo, o Tor 0.2.7.6 ou mais novo \u00e9 requerido.\n\nUsu\u00e1rios de GNU/Linux podem acessar a p\u00e1gina \nhttps://www.torproject.org/download/download-unix.html.en\n para obter o cliente Tor mais recente, ou diretamente dos reposit\u00f3rios. dlg_error_title=Erro de inicia\u00e7\u00e3o dlg_error_body=Esse erro \u00e9 fatal e $appname ir\u00e1 fechar. dlg_quickadd_title=Adicionar modelo dlg_nodelistfail_body=A gera\u00e7\u00e3o da lista de n\u00f3s falhou devido a erros do GEOIP. dlg_patterneditsave_title=Salvar os modelos atuais dlg_patterneditsave_body=Modelos atuais foram modificados.\n\nSe voc\u00ea deseja salv\u00e1-los clique em continuar sen\u00e3o clique em cancelar. dlg_instancefail_title=Falha de inst\u00e2ncia multipla dlg_instancefail_body=Uma inst\u00e2ncia de $appname j\u00e1 est\u00e1 em execu\u00e7\u00e3o, somente uma inst\u00e2ncia pode ser executada por vez.\n\nFechar a inst\u00e2ncia existente de $appname ou no caso de $appname congelar reinicie o X deslogando e logando novamente. dlg_guardwarn_title=Alerta de n\u00f3 guarda dlg_guardwarn_body=Um n\u00f3 guarda que n\u00e3o est\u00e1 na lista de n\u00f3s guarda especificados foi usado.\nProvavelmente porque seus n\u00f3s guarda selecionados n\u00e3o s\u00e3o mais alcan\u00e7\u00e1veis e o cliente Tor escolheu seus pr\u00f3prios n\u00f3s guarda. Talvez queira verificar sua lista de n\u00f3s guarda para ver se ainda est\u00e3o dispon\u00edveis ou selecionar novos. dlg_notenoughguards_body=N\u00e3o h\u00e1 n\u00f3s guarda suficientes para o Tor operar com seguran\u00e7a e efici\u00eancia.\n\nLimpe todos os n\u00f3s guarda selecionados e deixe o cliente Tor escolher seus pr\u00f3prios n\u00f3s guarda ou escolha 3 n\u00f3s guarda manualmente. dlg_bridgerr_title=Falha na valida\u00e7\u00e3o do endere\u00e7o da ponte. dlg_bridgerr_body=A informa\u00e7\u00e3o da ponte fornecida cont\u00e9m erros de valida\u00e7\u00e3o e n\u00e3o est\u00e1 em conformidade com um formato v\u00e1lido host:port endere\u00e7o ipv4.\n\nExemplos do formato de especifica\u00e7\u00e3o de pontes s\u00e3o:\n\nPonte \u00fanica:\n127.0.0.1:8080\n\nPontes m\u00faltiplas:\n127.0.0.1:8080,128.5.6.8:224\n\nAs pontes foram restauradas para os padr\u00f5es. dlg_credits_title=Cr\u00e9ditos $appname dlg_credits_body=Para ter seu nome listado aqui e tamb\u00e9m merecer minha gratid\u00e3o por favor apoie o desenvolvimento do SelekTOR na plataforma GNU/Linux atrav\u00e9s do Patreon table_popup_details=Detalhes table_popup_begintest=Inicia ciclo de teste table_popup_whois=WhoIs tab_basic=B\u00e1sico tab_advanced=Avan\u00e7ado isoA1=Proxy an\u00f4nimo isoA2=Provedor de sat\u00e9lite isoO1=Outro pa\u00eds isoU1=Desconhecido chkbox_disablenotify=Desabilitar notifica\u00e7\u00f5es ttip_disablenotify=Desabilita notifica\u00e7\u00f5es dlg_libnotify_title=notify-send n\u00e3o encontrado dlg_libnotify_body=Notifica\u00e7\u00f5es n\u00e3o funcionam sem o pacote libnotify-bin instalado.\n\nPara previnir que esse alerta apare\u00e7a novamente, instale o pacote requerido ou desabilite as notifica\u00e7\u00f5es em prefer\u00eancias. ttip_hidemin=Aplica\u00e7\u00e3o ser\u00e1 oculta ao inv\u00e9s de minimizar chkbox_hidemin=Ocultar ao inv\u00e9s de minimizar label_autoselect=Modo de auto sele\u00e7\u00e3o: menu_geoip=Atualizar GEOIP chkbox_geocheck=Fazer verifica\u00e7\u00e3o trimestral de atualiza\u00e7\u00e3o do GEOIP ttip_geocheck=SelekTOR ir\u00e1 mostrar o "Di\u00e1logo de atualiza\u00e7\u00e3o GEOIP" se sua base de dados GEOIP estiver desatualizada. dlg_geo_title=Atualiza\u00e7\u00e3o de dados de geolocaliza\u00e7\u00e3o dlg_geo_body=Os dados de geolocaliza\u00e7\u00e3o padr\u00e3o vindos do cliente Tor algumas vezes est\u00e3o desatualizados, voc\u00ea pode baixar os dados de geolocaliza\u00e7\u00e3o de Dazzleships.net. Eles s\u00e3o atualizados trimestralmente.\n\nVeja, se escolher n\u00e3o atualizar, alguns n\u00f3s podem estar atribu\u00eddos a pa\u00edses errados.\n\nOs dados nesses arquivos, assim como os do cliente Tor s\u00e3o fornecidos por Maxmind.com. dload_status_contact=Obtendo dados GEOIP mais recentes dload_status_failed=Download falhou chkbox_viator=Download via Tor ttip_patterntable=Para editar, d\u00ea um duplo click na c\u00e9lula da tabela que deseja modificar. fileext_pattern=Arquivo zip do modeloselektor-3.13.73/src/resources/credits.txt0000644000175000017500000000003113302030722020021 0ustar bannorbannorAlistair Neil (Developer)selektor-3.13.73/src/resources/license.txt0000644000175000017500000004325413302030722020024 0ustar bannorbannor GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. selektor-3.13.73/src/resources/MessagesBundle_fr_CA.properties0000644000175000017500000004401513302030722023706 0ustar bannorbannor# French CA, Default language file, provided by yahoe001 gpltransurl=https://fsffrance.org/gpl/gpl-fr.fr.html appdesc=$appname $appver, Les n\u0153uds de sortie de Tor simplifi\u00e9s. text_yes=Oui text_no=Non wintitle_prefs = Pr\u00e9f\u00e9rences de $appname wintitle_about = \u00c0 propos de $appname wintitle_patternedit = \u00c9diteur de mod\u00e8les $appname wintitle_guardnodes=S\u00e9lection des n\u0153uds de garde wintitle_tormonitor=Moniteur du client Tor textfield_unknown=Inconnu progstatus_initial=Initialisation... progstatus_bridges=Mise en place du changement de ponts. progstatus_generate=G\u00e9n\u00e9ration d'une nouvelle liste de n\u0153uds, veuillez patienter. progstatus_cachedated=Les descripteurs en cache sont p\u00e9rim\u00e9s, ils seront renouvel\u00e9s. progstatus_nonet=L'acc\u00e8s \u00e0 Internet n'est pas disponible. progstatus_checkrecommended=Recherche des derniers n\u0153uds recommand\u00e9s. progstatus_torfailretry=\u00c9chec lors du d\u00e9marrage de Tor, nouvel essai. progstatus_nodefail=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. progstatus_nodefailretry=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. Nouvel essai, veuillez patienter. progstatus_nodefailtorchoose=Le n\u0153ud demand\u00e9 n'est pas joignable, Tor en choisira un, veuillez patienter. progstatus_nodeactive3hop=Le circuit \u00e0 3 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_nodeactive2hop=Le circuit \u00e0 2 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_autoswitch=Auto-commutation vers le n\u0153ud progstatus_manswitch=Commutation vers le n\u0153ud choisi manuellement progstatus_waitfortor=Attente d'activation d'un n\u0153ud par Tor. progstatus_switchtonode=Commutation vers le n\u0153ud $nodename. progstatus_applychanges=Mise en place des nouvelles pr\u00e9f\u00e9rences. circuit_status_creating_2hop=Cr\u00e9ation d'un circuit \u00e0 2 sauts. circuit_status_creating_3hop=Cr\u00e9ation d'un circuit \u00e0 3 sauts. circuit_status_testing=Test du circuit. circuit_status_aborted=Test interrompu. circuit_status_built=$1 circuit(s) construit(s). circuit_status_passed=Circuit v\u00e9rifi\u00e9. circuit_status_failed=\u00c9chec de circuit. circuit_status_none=Aucun circuit n'est disponible. circuit_status_noroute=Routeurs (tous) hors service. combo_proxymode1=D\u00e9sactiv\u00e9 combo_proxymode2=Relais par mod\u00e8le combo_proxymode3=Relayer tout le trafic combo_loglev1=D\u00e9bogage combo_loglev2=Infos combo_loglev3=Avis traymenu_proxymode1=Mode : pas de relais traymenu_proxymode2=Mode : relais par mod\u00e8le traymenu_proxymode3=Mode : relayer tout le trafic traymenu_showgui=Cacher/Montrer l'IUG traytool_guardnode=Noeud de garde traytool_exitnode=Noeud de sortie exittable_col1=N\u0153ud de sortie exittable_col2=BP (MB\\s) exittable_col3=D\u00e9lai (ms) exittable_col4=\u00c9tat exittable_col5=Favori patterntable_col1=Description patterntable_col2=Mod\u00e8le patterntable_col3=Activ\u00e9 guardtable_col1=N\u0153ud de garde guardtable_col2=Pays guardtable_col3=BP (MB\\s) guardtable_col4=De confiance menu_menu=Menu menu_prefs=Pr\u00e9f\u00e9rences menu_quickadd=Ajout rapide d'un mod\u00e8le menu_patternedit=\u00c9diteur de mod\u00e8les de relais menu_export=Exporter les mod\u00e8les menu_import=Import les mod\u00e8les menu_quit=Quitter menu_defaultpatterns=Mod\u00e8le par d\u00e9faut menu_userpatterns=Mod\u00e8les de l'utilisateur menu_help=Aide menu_debuglog=Voir le journal de d\u00e9bogage menu_helpcontents=Contenu de l'aide menu_torcheck=V\u00e9rification de routine de Tor menu_about=\u00c0 propos de menu_license=Licence menu_proxy=Mode de relais menu_close=Fermer le menu menu_tormanual=Manuel officiel de Tor menu_tormonitor=Moniteur du client Tor menu_leaktest=Test de fuite DNS menu_credits=Cr\u00e9dits label_activecountry=Pays actif : label_proxymode=Mode de relais : label_exitnode=N\u0153ud de sortie : label_ip=IP : label_torlatency=D\u00e9lai label_fingerprint=Empreinte : label_bandwidth=Bande passante label_streams=Flux label_stable=Stable label_status=\u00c9tat : label_listenport=Port d'\u00e9coute de Tor : label_defaultproxy=Mandataire HTTP par d\u00e9faut : label_bridgeaddress=Adresse de pont de Tor : label_portranges=Plages de port pr\u00e9sentement actives, de $portmin \u00e0 $portmax label_editcountry=Choisir un pays pour voir ses mod\u00e8les label_quickadd_desc=Description : label_quickadd_pattern=Mod\u00e8le : label_threshold=D\u00e9lai seuil label_middle=Milieu : label_exit=Sortie : label_nickname=Pseudonyme label_ip=IP label_country=Pays label_guard_minimum=Vous pouvez soit ne choisir aucun n\u0153ud de garde au cas o\u00f9 le client Tor les choisit, soit choisir trois n\u0153uds de garde ou plus. label_torlogging=Niveau de journalisation : label_torargs=Arguments de d\u00e9marrage : label_torsocks=Param\u00e8tres Socks : label_diskoptions=Options du disque : label_guardnode=Garde : label_bridgenode=Pont : label_donotproxy=Ne pas relayer : button_details=D\u00e9tails button_whois=Qui est button_close=Fermer button_apply=Appliquer button_delete=Supprimer button_addnew=Ajouter un nouveau button_save=Enregistrer button_cancel=Annuler button_continue=Continuer button_getbridges=Obtenir des ponts button_mozillarestart=Red\u00e9marrer $browser button_visitus=Rendez-nous visite button_contactus=Contactez-nous button_translations=Traductions non officielles button_prefdefaults=R\u00e9initialiser aux leurs valeurs par d\u00e9faut. button_setguards=D\u00e9finir les n\u0153uds de garde button_details=D\u00e9tails de l'atlas button_clearguards=Effacer les n\u0153uds de garde choisis button_clearfavs=Effacer les favoris button_support=Soutenir SelekTOR button_patreon=Soutenir SelekTOR avec Patreon panel_general=Param\u00e8tres g\u00e9n\u00e9raux panel_network= Param\u00e8tres r\u00e9seau panel_management=Param\u00e8tres de gestion des n\u0153uds panel_info=Circuit actif panel_torclientset=Param\u00e8tres du client Tor panel_startupargs=Arguments de d\u00e9marrage panel_stdout=Moniteur de sortie standard chkbox_autoselect=Choix automatique du n\u0153ud chkbox_autostart=D\u00e9marrage automatique de SelekTOR chkbox_checkforupdates=V\u00e9rifier les mises \u00e0 jour au d\u00e9marrage chkbox_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification chkbox_autopatterns=Installer automatiquement les derniers mod\u00e8les. chkbox_mozillawarn=D\u00e9sactiver l'avertissement de Mozilla chkbox_recnodesonly=Utiliser les n\u0153uds recommand\u00e9s en mode par mod\u00e8les chkbox_hidetotray=Minimiser au d\u00e9marrage chkbox_minonclose=Minimiser plut\u00f4t que de quitter lors de la fermeture chkbox_safesocks=Socks s\u00e9curitaire chkbox_twohop=Utiliser des circuits \u00e0 2 sauts vers le n\u0153ud de sortie en mode par mod\u00e8les chkbox_warnunsafesocks=Avertir si \u00e0 risque chkbox_diskavoid=\u00c9viter les \u00e9critures sur le disque chkbox_testsocks=Tester Socks chkbox_safelog=Journalisation s\u00e9curitaire chkbox_guardwarn1=Afficher une fen\u00eatre d'avertissement si un n\u0153ud de garde non sp\u00e9cifi\u00e9 est utilis\u00e9 chkbox_guardwarn2=Afficher une fen\u00eatre d'avertissement si moins de trois n\u0153uds de garde sont choisis chkbox_securedelete=Effacement s\u00e9curis\u00e9 des caches de Tor lors de la fermeture ttip_autostart=D\u00e9marrage automatique de SelekTOR lors du d\u00e9marrage/de la connexion ttip_hidetotray=Minimiser au d\u00e9marrage ttip_checkforupdates=SelekTOR v\u00e9rifiera les mises \u00e0 jour au d\u00e9marage ttip_autoinstall=Les derniers mod\u00e8les seront r\u00e9cup\u00e9r\u00e9s de Dazzleships.Net ttip_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification ttip_mozillawarn=D\u00e9sactiver l'avertissement du navigateur Mozilla ttip_listenport=Le port d'\u00e9coute du client Tor ttip_defaultproxy=Tout trafic qui ne sera pas redirig\u00e9 par Tor sera redirig\u00e9 par ce mandataire HTTP ttip_donotproxy=Toute URL contenant une de ces entr\u00e9es s\u00e9par\u00e9es par des virgules ne sera pas relay\u00e9e. L'on s'y connectera directement. ttip_bridgeaddress=Pour contourner le blocage du FSI, ajouter une adresse de pont valide ici ttip_forcedns=Forcer la recherche DNS par Tor, exige le red\u00e9marrage du navigateur ttip_forcenode=Si coch\u00e9, le n\u0153ud sera activ\u00e9 quelque soit l'activit\u00e9 du n\u0153ud ttip_recnodesonly=Les n\u0153uds recommand\u00e9s seront utilis\u00e9s en mode par mod\u00e8les ttip_minonclose=L'application sera minimis\u00e9e au lieu de quitter \u00e0 la fermeture de la fermeture principale ttip_threshold=D\u00e9lai seuil ttip_safesocks=Activ\u00e9e, Tor rejettera les connexions logicielles qui utilisent des variantes dangereuses du protocole Socks. ttip_warnunsafe=Activ\u00e9e, Tor avertira \u00e0 chaque fois qu'une requ\u00eate est re\u00e7ue contenant seulement une adresse IP au lieu d'un nom d'h\u00f4te. ttip_testsocks=Activ\u00e9e Tor journalisera une entr\u00e9e de journal de niveau avis pour chaque connexion en indiquant si elle utilise un protocole Socks s\u00e9curitaire ou dangereux. ttip_safelogging=Activ\u00e9e, Tor nettoiera les cha\u00eenes potentiellement sensibles des messages de journalisation. ttip_avoiddisk=Activ\u00e9e, Tor essaiera d'\u00e9crire moins fr\u00e9quemment sur le disque que nous ne le ferions autrement. ttip_extraargs= Arguments suppl\u00e9mentaires sp\u00e9cifi\u00e9s par l'utilisateur, voir le Manuel Tor. ttip_combo_loglevel=Niveau de journalisation de Tor. ttip_twohop=Utiliser des circuits \u00e0 2 sauts au lieu des 3 par d\u00e9faut de Tor. R\u00e9duit le d\u00e9lai de transit mais affaiblit l'anonymat. ttip_resetbasicprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences de base \u00e0 leurs valeurs par d\u00e9faut. ttip_resetadvprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences avanc\u00e9es \u00e0 leurs valeurs par d\u00e9faut. ttip_guardwarn1=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant qu'un n\u0153ud de garde non sp\u00e9cifi\u00e9 est actif. ttip_guardwarn2=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant que trop peu de n\u0153uds de garde sont choisis ttip_clearguards=Effacer les n\u0153uds de garde choisis. ttip_securedelete=Activ\u00e9, les caches de Tor seront \u00e9cras\u00e9es par des z\u00e9ros, puis supprim\u00e9es dlg_update_title=Mise \u00e0 jour disponible. dlg_update_body=$version est maintenant disponible au t\u00e9l\u00e9chargement. dlg_restoreproxy_title=Param\u00e8tres originaux du mandataire dlg_restoreproxy_body=Choisir Continuer pour restaurer les param\u00e8tres du mandataire aux valeurs par d\u00e9faut avant l'installation de SelekTOR. dlg_resetproxy_title=Param\u00e8tres par d\u00e9faut du mandataire dlg_resetproxy_body=Choisir Continuer pour r\u00e9initialiser les param\u00e8tres du serveur mandataire \u00e0 leurs valeurs syst\u00e8me par d\u00e9faut. dlg_gsetting_title=Gsettings introuvable dlg_gsetting_body=$appname ne peux pas fonctionner correctement sans que l'ex\u00e9cutable binary soit install\u00e9. Dans certaines distributions il peut \u00eatre trouv\u00e9 dans le paquet libglib2.0-bin. dlg_torclient_title=Client TOR introuvable dlg_torclient_body=$appname ne peux pas fonctionner sans que le client Tor ne soit Install\u00e9. Veuillez installer les paquets tor et tor-geoipdb pour votre distribution. dlg_mozillarestart_title=Avertissement\u00a0: Le navigateur $browser est actif. dlg_mozillarestart_body=$appname a d\u00e9tect\u00e9 que le navigateur $browser tourne d\u00e9j\u00e0.\nUn red\u00e9marrage du navigateur est exig\u00e9 pour permettre le fonctionnement de $appname.\n\nSi vous choisissez de red\u00e9marrer $browser, tous les onglets actuellement ouverts seront restaur\u00e9s au red\u00e9marrage de $browser, l'option \u00ab Afficher les dernier onglets et fen\u00eatres utilis\u00e9s \u00bb, doit \u00eatre choisie dans les options de $browser.\n\nVous pouvez d\u00e9sactiver cet avertissement du navigateur dans les Pr\u00e9f\u00e9rences de $appname. dlg_license_title=Licence de $appname dlg_exportuser_title=Exporter les mod\u00e8les d'utilisateur dlg_exportuser_body=Aucun mod\u00e8le cr\u00e9\u00e9 par l'utilisateur n'a \u00e9t\u00e9 trouv\u00e9.\n\nUtilisez l'\u00e9diteur de mode pour ajouter vos propres mod\u00e8les dlg_exportdefault_title=Exporter les mod\u00e8les par d\u00e9faut dlg_exportdefault_body=Aucun mod\u00e8le par d\u00e9faut n'a \u00e9t\u00e9 trouv\u00e9. dlg_saveuser_title=Enregistrer les modes de l'utilisateur dlg_savedefault_title=Enregistrer les mod\u00e8les par d\u00e9faut dlg_import_title=Importer le fichier des mod\u00e8les dlg_import_success_title=Mod\u00e8les import\u00e9s dlg_import_success_body=Les mod\u00e8les ont \u00e9t\u00e9 import\u00e9s avec succ\u00e8s et sont maintenant actifs. dlg_import_fail_title=\u00c9chec lors l'importation dlg_import_fail_body=Les mod\u00e8les n'ont pas \u00e9t\u00e9 import\u00e9s correctement. dlg_whois_title=Qui est $ipaddress dlg_whois_body=Veuillez patienter pendant que j'essaie de r\u00e9cup\u00e9rer les donn\u00e9s de WhoIs... dlg_whois_fail=D\u00e9sol\u00e9, impossible de r\u00e9cup\u00e9rer les informations de Whois. dlg_toold_body=Le client Tor actuellement install\u00e9 est trop ancien, Tor 0.2.7.6 ou ult\u00e9rieure est exig\u00e9e.\n\nLes utilisateurs de Linux devraient visiter la page suivante \nhttps://www.torproject.org/download/download-unix.html.en\npour obtenir le dernier client Tor. dlg_error_title=Erreur de d\u00e9marrage dlg_error_body=Cette erreur est fatale et $appname se fermera. dlg_quickadd_title=Ajouter un mod\u00e8le dlg_nodelistfail_body=La g\u00e9n\u00e9ration de la liste des n\u0153uds a \u00e9chou\u00e9 \u00e0 cause d'erreurs de GEOIP. dlg_patterneditsave_title=Enregistrer les mod\u00e8les actuels dlg_patterneditsave_body=Les mod\u00e8les actuels ont \u00e9t\u00e9 modifi\u00e9s.\n\nSi vous d\u00e9sirez les enregistrer, cliquez sur Continuer, autrement cliquez sur Annuler. dlg_instancefail_title=\u00c9chec d\u00fb \u00e0 plusieurs instances dlg_instancefail_body=Une instance de $appname est d\u00e9j\u00e0 en cours et une seule peut \u00eatre ex\u00e9cut\u00e9e \u00e0 la fois.\n\nQuittez l'instance existante de $appname ou dans le cas d'un plantage de $appname, red\u00e9marrez X en vous d\u00e9connectant et en vous connectant de nouveau. dlg_guardwarn_title=Avertissement de n\u0153ud de garde dlg_guardwarn_body=Un n\u0153ud de garde ne se trouvant pas dans votre liste de n\u0153uds de garde sp\u00e9cifi\u00e9e a \u00e9t\u00e9 utilis\u00e9.\nCeci provient probablement du fait que vos n\u0153uds de garde s\u00e9lectionn\u00e9s ne sont plus joignables et par cons\u00e9quent le client Tor a assign\u00e9 son propre n\u0153ud de garde.\n\nVous devriez v\u00e9rifier vos n\u0153uds de garde actuellement d\u00e9finis pour voir s'ils sont toujours disponibles, ou en choisir de nouveaux. dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus.dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus. dlg_bridgerr_title=\u00c9chec de validation de l'adresse de pont dlg_bridgerr_body=Les informations de pont fournies contiennent des erreurs de validation et ne se conforment pas \u00e0 un format d'adresse IPv4 valide h\u00f4te:port\n\nVoici des exemples de format de sp\u00e9cification de ponts :\n\nPont simple : \n127.0.0.1:8080\n\nPonts multiples : \n127.0.0.1:8080,128.5.6.8:224\n\nLes ponts ont \u00e9t\u00e9 r\u00e9initialis\u00e9s \u00e0 leurs valeurs par d\u00e9faut. dlg_credits_title=Cr\u00e9dits de $appname dlg_credits_body=Afin que votre nom apparaissent ici et pour aussi m\u00e9riter ma gratitude, veuillez envisager de soutenir le d\u00e9veloppement futur de SelekTOR sous Linux avec Patreon. table_popup_details=D\u00e9tails table_popup_whois=Qui est table_popup_begintest=Commencer le cycle de test tab_basic=De base tab_advanced=Avanc\u00e9 isoA1=Mandataire annonyme isoO1=autre Pays isoU1=Inconnu chkbox_disablenotify=D\u00e9sactiver les notifications du bureau ttip_disablenotify=D\u00e9sactiver les notifications du bureau dlg_libnotify_title=notify-send est introuvable dlg_libnotify_body=Les notifications de bureau ne fonctionneront pas sans que le paquet libnotify-bin ne soit install\u00e9.\n\nPour emp\u00eacher que cette fen\u00eatre apparaissent de nouveau installez le paquet exig\u00e9 ou d\u00e9sactivez les notifications de bureau dans les pr\u00e9f\u00e9rences. ttip_hidemin=L'appli sera cach\u00e9e au lieu d'\u00eatre minimis\u00e9e. chkbox_hidemin=Cacher au lieu de minimiser label_autoselect= Mode de s\u00e9lection automatique : menu_geoip=Mettre GEOIP \u00e0 jour chkbox_geocheck=V\u00e9rification trimestrielle des mises \u00e0 jour GEOIP ttip_geocheck=SelekTOR affichera la \u00abfen\u00eatre de mise \u00e0 jour GEOIP \u00bbsi votre base de donn\u00e9es GEOIP est p\u00e9rim\u00e9e. dlg_geo_title=Mise \u00e0 jour des donn\u00e9es de g\u00e9olocalisation dlg_geo_body=Les donn\u00e9es de g\u00e9olocalisation fournies par Tor sont parfois p\u00e9rim\u00e9es. Vous pouvez demander \u00e0 SelekTOR de t\u00e9l\u00e9charger ses propres fichiers de donn\u00e9es de g\u00e9olocalisation de Dazzleships.net et de les utiliser. Ils sont mis \u00e0 jour trimestriellement.\n\nVeuillez noter que si vous choisissez de ne pas mettre \u00e0 jour, certains n\u0153uds pourraient \u00eatre assign\u00e9s au mauvais pays.\n\nLes donn\u00e9es des ces fichiers, comme les donn\u00e9es fournies par le client Tor, sont fournies par Maxmind.com. dload_status_contact=R\u00e9cup\u00e9ration des derni\u00e8res donn\u00e9es GEOIP dload_status_failed=\u00c9chec de t\u00e9l\u00e9chargement chkbox_viator=T\u00e9l\u00e9charger par Tor ttip_patterntable=\u00c9dition en ligne prise en charge, un double-clic gauche lance l'\u00e9dition d'une cellule d'un tableau. fileext_pattern=Fichiers de mod\u00e8les zipp\u00e9selektor-3.13.73/src/resources/MessagesBundle_fr_LU.properties0000644000175000017500000004401513302030722023743 0ustar bannorbannor# French CA, Default language file, provided by yahoe001 gpltransurl=https://fsffrance.org/gpl/gpl-fr.fr.html appdesc=$appname $appver, Les n\u0153uds de sortie de Tor simplifi\u00e9s. text_yes=Oui text_no=Non wintitle_prefs = Pr\u00e9f\u00e9rences de $appname wintitle_about = \u00c0 propos de $appname wintitle_patternedit = \u00c9diteur de mod\u00e8les $appname wintitle_guardnodes=S\u00e9lection des n\u0153uds de garde wintitle_tormonitor=Moniteur du client Tor textfield_unknown=Inconnu progstatus_initial=Initialisation... progstatus_bridges=Mise en place du changement de ponts. progstatus_generate=G\u00e9n\u00e9ration d'une nouvelle liste de n\u0153uds, veuillez patienter. progstatus_cachedated=Les descripteurs en cache sont p\u00e9rim\u00e9s, ils seront renouvel\u00e9s. progstatus_nonet=L'acc\u00e8s \u00e0 Internet n'est pas disponible. progstatus_checkrecommended=Recherche des derniers n\u0153uds recommand\u00e9s. progstatus_torfailretry=\u00c9chec lors du d\u00e9marrage de Tor, nouvel essai. progstatus_nodefail=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. progstatus_nodefailretry=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. Nouvel essai, veuillez patienter. progstatus_nodefailtorchoose=Le n\u0153ud demand\u00e9 n'est pas joignable, Tor en choisira un, veuillez patienter. progstatus_nodeactive3hop=Le circuit \u00e0 3 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_nodeactive2hop=Le circuit \u00e0 2 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_autoswitch=Auto-commutation vers le n\u0153ud progstatus_manswitch=Commutation vers le n\u0153ud choisi manuellement progstatus_waitfortor=Attente d'activation d'un n\u0153ud par Tor. progstatus_switchtonode=Commutation vers le n\u0153ud $nodename. progstatus_applychanges=Mise en place des nouvelles pr\u00e9f\u00e9rences. circuit_status_creating_2hop=Cr\u00e9ation d'un circuit \u00e0 2 sauts. circuit_status_creating_3hop=Cr\u00e9ation d'un circuit \u00e0 3 sauts. circuit_status_testing=Test du circuit. circuit_status_aborted=Test interrompu. circuit_status_built=$1 circuit(s) construit(s). circuit_status_passed=Circuit v\u00e9rifi\u00e9. circuit_status_failed=\u00c9chec de circuit. circuit_status_none=Aucun circuit n'est disponible. circuit_status_noroute=Routeurs (tous) hors service. combo_proxymode1=D\u00e9sactiv\u00e9 combo_proxymode2=Relais par mod\u00e8le combo_proxymode3=Relayer tout le trafic combo_loglev1=D\u00e9bogage combo_loglev2=Infos combo_loglev3=Avis traymenu_proxymode1=Mode : pas de relais traymenu_proxymode2=Mode : relais par mod\u00e8le traymenu_proxymode3=Mode : relayer tout le trafic traymenu_showgui=Cacher/Montrer l'IUG traytool_guardnode=Noeud de garde traytool_exitnode=Noeud de sortie exittable_col1=N\u0153ud de sortie exittable_col2=BP (MB\\s) exittable_col3=D\u00e9lai (ms) exittable_col4=\u00c9tat exittable_col5=Favori patterntable_col1=Description patterntable_col2=Mod\u00e8le patterntable_col3=Activ\u00e9 guardtable_col1=N\u0153ud de garde guardtable_col2=Pays guardtable_col3=BP (MB\\s) guardtable_col4=De confiance menu_menu=Menu menu_prefs=Pr\u00e9f\u00e9rences menu_quickadd=Ajout rapide d'un mod\u00e8le menu_patternedit=\u00c9diteur de mod\u00e8les de relais menu_export=Exporter les mod\u00e8les menu_import=Import les mod\u00e8les menu_quit=Quitter menu_defaultpatterns=Mod\u00e8le par d\u00e9faut menu_userpatterns=Mod\u00e8les de l'utilisateur menu_help=Aide menu_debuglog=Voir le journal de d\u00e9bogage menu_helpcontents=Contenu de l'aide menu_torcheck=V\u00e9rification de routine de Tor menu_about=\u00c0 propos de menu_license=Licence menu_proxy=Mode de relais menu_close=Fermer le menu menu_tormanual=Manuel officiel de Tor menu_tormonitor=Moniteur du client Tor menu_leaktest=Test de fuite DNS menu_credits=Cr\u00e9dits label_activecountry=Pays actif : label_proxymode=Mode de relais : label_exitnode=N\u0153ud de sortie : label_ip=IP : label_torlatency=D\u00e9lai label_fingerprint=Empreinte : label_bandwidth=Bande passante label_streams=Flux label_stable=Stable label_status=\u00c9tat : label_listenport=Port d'\u00e9coute de Tor : label_defaultproxy=Mandataire HTTP par d\u00e9faut : label_bridgeaddress=Adresse de pont de Tor : label_portranges=Plages de port pr\u00e9sentement actives, de $portmin \u00e0 $portmax label_editcountry=Choisir un pays pour voir ses mod\u00e8les label_quickadd_desc=Description : label_quickadd_pattern=Mod\u00e8le : label_threshold=D\u00e9lai seuil label_middle=Milieu : label_exit=Sortie : label_nickname=Pseudonyme label_ip=IP label_country=Pays label_guard_minimum=Vous pouvez soit ne choisir aucun n\u0153ud de garde au cas o\u00f9 le client Tor les choisit, soit choisir trois n\u0153uds de garde ou plus. label_torlogging=Niveau de journalisation : label_torargs=Arguments de d\u00e9marrage : label_torsocks=Param\u00e8tres Socks : label_diskoptions=Options du disque : label_guardnode=Garde : label_bridgenode=Pont : label_donotproxy=Ne pas relayer : button_details=D\u00e9tails button_whois=Qui est button_close=Fermer button_apply=Appliquer button_delete=Supprimer button_addnew=Ajouter un nouveau button_save=Enregistrer button_cancel=Annuler button_continue=Continuer button_getbridges=Obtenir des ponts button_mozillarestart=Red\u00e9marrer $browser button_visitus=Rendez-nous visite button_contactus=Contactez-nous button_translations=Traductions non officielles button_prefdefaults=R\u00e9initialiser aux leurs valeurs par d\u00e9faut. button_setguards=D\u00e9finir les n\u0153uds de garde button_details=D\u00e9tails de l'atlas button_clearguards=Effacer les n\u0153uds de garde choisis button_clearfavs=Effacer les favoris button_support=Soutenir SelekTOR button_patreon=Soutenir SelekTOR avec Patreon panel_general=Param\u00e8tres g\u00e9n\u00e9raux panel_network= Param\u00e8tres r\u00e9seau panel_management=Param\u00e8tres de gestion des n\u0153uds panel_info=Circuit actif panel_torclientset=Param\u00e8tres du client Tor panel_startupargs=Arguments de d\u00e9marrage panel_stdout=Moniteur de sortie standard chkbox_autoselect=Choix automatique du n\u0153ud chkbox_autostart=D\u00e9marrage automatique de SelekTOR chkbox_checkforupdates=V\u00e9rifier les mises \u00e0 jour au d\u00e9marrage chkbox_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification chkbox_autopatterns=Installer automatiquement les derniers mod\u00e8les. chkbox_mozillawarn=D\u00e9sactiver l'avertissement de Mozilla chkbox_recnodesonly=Utiliser les n\u0153uds recommand\u00e9s en mode par mod\u00e8les chkbox_hidetotray=Minimiser au d\u00e9marrage chkbox_minonclose=Minimiser plut\u00f4t que de quitter lors de la fermeture chkbox_safesocks=Socks s\u00e9curitaire chkbox_twohop=Utiliser des circuits \u00e0 2 sauts vers le n\u0153ud de sortie en mode par mod\u00e8les chkbox_warnunsafesocks=Avertir si \u00e0 risque chkbox_diskavoid=\u00c9viter les \u00e9critures sur le disque chkbox_testsocks=Tester Socks chkbox_safelog=Journalisation s\u00e9curitaire chkbox_guardwarn1=Afficher une fen\u00eatre d'avertissement si un n\u0153ud de garde non sp\u00e9cifi\u00e9 est utilis\u00e9 chkbox_guardwarn2=Afficher une fen\u00eatre d'avertissement si moins de trois n\u0153uds de garde sont choisis chkbox_securedelete=Effacement s\u00e9curis\u00e9 des caches de Tor lors de la fermeture ttip_autostart=D\u00e9marrage automatique de SelekTOR lors du d\u00e9marrage/de la connexion ttip_hidetotray=Minimiser au d\u00e9marrage ttip_checkforupdates=SelekTOR v\u00e9rifiera les mises \u00e0 jour au d\u00e9marage ttip_autoinstall=Les derniers mod\u00e8les seront r\u00e9cup\u00e9r\u00e9s de Dazzleships.Net ttip_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification ttip_mozillawarn=D\u00e9sactiver l'avertissement du navigateur Mozilla ttip_listenport=Le port d'\u00e9coute du client Tor ttip_defaultproxy=Tout trafic qui ne sera pas redirig\u00e9 par Tor sera redirig\u00e9 par ce mandataire HTTP ttip_donotproxy=Toute URL contenant une de ces entr\u00e9es s\u00e9par\u00e9es par des virgules ne sera pas relay\u00e9e. L'on s'y connectera directement. ttip_bridgeaddress=Pour contourner le blocage du FSI, ajouter une adresse de pont valide ici ttip_forcedns=Forcer la recherche DNS par Tor, exige le red\u00e9marrage du navigateur ttip_forcenode=Si coch\u00e9, le n\u0153ud sera activ\u00e9 quelque soit l'activit\u00e9 du n\u0153ud ttip_recnodesonly=Les n\u0153uds recommand\u00e9s seront utilis\u00e9s en mode par mod\u00e8les ttip_minonclose=L'application sera minimis\u00e9e au lieu de quitter \u00e0 la fermeture de la fermeture principale ttip_threshold=D\u00e9lai seuil ttip_safesocks=Activ\u00e9e, Tor rejettera les connexions logicielles qui utilisent des variantes dangereuses du protocole Socks. ttip_warnunsafe=Activ\u00e9e, Tor avertira \u00e0 chaque fois qu'une requ\u00eate est re\u00e7ue contenant seulement une adresse IP au lieu d'un nom d'h\u00f4te. ttip_testsocks=Activ\u00e9e Tor journalisera une entr\u00e9e de journal de niveau avis pour chaque connexion en indiquant si elle utilise un protocole Socks s\u00e9curitaire ou dangereux. ttip_safelogging=Activ\u00e9e, Tor nettoiera les cha\u00eenes potentiellement sensibles des messages de journalisation. ttip_avoiddisk=Activ\u00e9e, Tor essaiera d'\u00e9crire moins fr\u00e9quemment sur le disque que nous ne le ferions autrement. ttip_extraargs= Arguments suppl\u00e9mentaires sp\u00e9cifi\u00e9s par l'utilisateur, voir le Manuel Tor. ttip_combo_loglevel=Niveau de journalisation de Tor. ttip_twohop=Utiliser des circuits \u00e0 2 sauts au lieu des 3 par d\u00e9faut de Tor. R\u00e9duit le d\u00e9lai de transit mais affaiblit l'anonymat. ttip_resetbasicprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences de base \u00e0 leurs valeurs par d\u00e9faut. ttip_resetadvprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences avanc\u00e9es \u00e0 leurs valeurs par d\u00e9faut. ttip_guardwarn1=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant qu'un n\u0153ud de garde non sp\u00e9cifi\u00e9 est actif. ttip_guardwarn2=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant que trop peu de n\u0153uds de garde sont choisis ttip_clearguards=Effacer les n\u0153uds de garde choisis. ttip_securedelete=Activ\u00e9, les caches de Tor seront \u00e9cras\u00e9es par des z\u00e9ros, puis supprim\u00e9es dlg_update_title=Mise \u00e0 jour disponible. dlg_update_body=$version est maintenant disponible au t\u00e9l\u00e9chargement. dlg_restoreproxy_title=Param\u00e8tres originaux du mandataire dlg_restoreproxy_body=Choisir Continuer pour restaurer les param\u00e8tres du mandataire aux valeurs par d\u00e9faut avant l'installation de SelekTOR. dlg_resetproxy_title=Param\u00e8tres par d\u00e9faut du mandataire dlg_resetproxy_body=Choisir Continuer pour r\u00e9initialiser les param\u00e8tres du serveur mandataire \u00e0 leurs valeurs syst\u00e8me par d\u00e9faut. dlg_gsetting_title=Gsettings introuvable dlg_gsetting_body=$appname ne peux pas fonctionner correctement sans que l'ex\u00e9cutable binary soit install\u00e9. Dans certaines distributions il peut \u00eatre trouv\u00e9 dans le paquet libglib2.0-bin. dlg_torclient_title=Client TOR introuvable dlg_torclient_body=$appname ne peux pas fonctionner sans que le client Tor ne soit Install\u00e9. Veuillez installer les paquets tor et tor-geoipdb pour votre distribution. dlg_mozillarestart_title=Avertissement\u00a0: Le navigateur $browser est actif. dlg_mozillarestart_body=$appname a d\u00e9tect\u00e9 que le navigateur $browser tourne d\u00e9j\u00e0.\nUn red\u00e9marrage du navigateur est exig\u00e9 pour permettre le fonctionnement de $appname.\n\nSi vous choisissez de red\u00e9marrer $browser, tous les onglets actuellement ouverts seront restaur\u00e9s au red\u00e9marrage de $browser, l'option \u00ab Afficher les dernier onglets et fen\u00eatres utilis\u00e9s \u00bb, doit \u00eatre choisie dans les options de $browser.\n\nVous pouvez d\u00e9sactiver cet avertissement du navigateur dans les Pr\u00e9f\u00e9rences de $appname. dlg_license_title=Licence de $appname dlg_exportuser_title=Exporter les mod\u00e8les d'utilisateur dlg_exportuser_body=Aucun mod\u00e8le cr\u00e9\u00e9 par l'utilisateur n'a \u00e9t\u00e9 trouv\u00e9.\n\nUtilisez l'\u00e9diteur de mode pour ajouter vos propres mod\u00e8les dlg_exportdefault_title=Exporter les mod\u00e8les par d\u00e9faut dlg_exportdefault_body=Aucun mod\u00e8le par d\u00e9faut n'a \u00e9t\u00e9 trouv\u00e9. dlg_saveuser_title=Enregistrer les modes de l'utilisateur dlg_savedefault_title=Enregistrer les mod\u00e8les par d\u00e9faut dlg_import_title=Importer le fichier des mod\u00e8les dlg_import_success_title=Mod\u00e8les import\u00e9s dlg_import_success_body=Les mod\u00e8les ont \u00e9t\u00e9 import\u00e9s avec succ\u00e8s et sont maintenant actifs. dlg_import_fail_title=\u00c9chec lors l'importation dlg_import_fail_body=Les mod\u00e8les n'ont pas \u00e9t\u00e9 import\u00e9s correctement. dlg_whois_title=Qui est $ipaddress dlg_whois_body=Veuillez patienter pendant que j'essaie de r\u00e9cup\u00e9rer les donn\u00e9s de WhoIs... dlg_whois_fail=D\u00e9sol\u00e9, impossible de r\u00e9cup\u00e9rer les informations de Whois. dlg_toold_body=Le client Tor actuellement install\u00e9 est trop ancien, Tor 0.2.7.6 ou ult\u00e9rieure est exig\u00e9e.\n\nLes utilisateurs de Linux devraient visiter la page suivante \nhttps://www.torproject.org/download/download-unix.html.en\npour obtenir le dernier client Tor. dlg_error_title=Erreur de d\u00e9marrage dlg_error_body=Cette erreur est fatale et $appname se fermera. dlg_quickadd_title=Ajouter un mod\u00e8le dlg_nodelistfail_body=La g\u00e9n\u00e9ration de la liste des n\u0153uds a \u00e9chou\u00e9 \u00e0 cause d'erreurs de GEOIP. dlg_patterneditsave_title=Enregistrer les mod\u00e8les actuels dlg_patterneditsave_body=Les mod\u00e8les actuels ont \u00e9t\u00e9 modifi\u00e9s.\n\nSi vous d\u00e9sirez les enregistrer, cliquez sur Continuer, autrement cliquez sur Annuler. dlg_instancefail_title=\u00c9chec d\u00fb \u00e0 plusieurs instances dlg_instancefail_body=Une instance de $appname est d\u00e9j\u00e0 en cours et une seule peut \u00eatre ex\u00e9cut\u00e9e \u00e0 la fois.\n\nQuittez l'instance existante de $appname ou dans le cas d'un plantage de $appname, red\u00e9marrez X en vous d\u00e9connectant et en vous connectant de nouveau. dlg_guardwarn_title=Avertissement de n\u0153ud de garde dlg_guardwarn_body=Un n\u0153ud de garde ne se trouvant pas dans votre liste de n\u0153uds de garde sp\u00e9cifi\u00e9e a \u00e9t\u00e9 utilis\u00e9.\nCeci provient probablement du fait que vos n\u0153uds de garde s\u00e9lectionn\u00e9s ne sont plus joignables et par cons\u00e9quent le client Tor a assign\u00e9 son propre n\u0153ud de garde.\n\nVous devriez v\u00e9rifier vos n\u0153uds de garde actuellement d\u00e9finis pour voir s'ils sont toujours disponibles, ou en choisir de nouveaux. dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus.dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus. dlg_bridgerr_title=\u00c9chec de validation de l'adresse de pont dlg_bridgerr_body=Les informations de pont fournies contiennent des erreurs de validation et ne se conforment pas \u00e0 un format d'adresse IPv4 valide h\u00f4te:port\n\nVoici des exemples de format de sp\u00e9cification de ponts :\n\nPont simple : \n127.0.0.1:8080\n\nPonts multiples : \n127.0.0.1:8080,128.5.6.8:224\n\nLes ponts ont \u00e9t\u00e9 r\u00e9initialis\u00e9s \u00e0 leurs valeurs par d\u00e9faut. dlg_credits_title=Cr\u00e9dits de $appname dlg_credits_body=Afin que votre nom apparaissent ici et pour aussi m\u00e9riter ma gratitude, veuillez envisager de soutenir le d\u00e9veloppement futur de SelekTOR sous Linux avec Patreon. table_popup_details=D\u00e9tails table_popup_whois=Qui est table_popup_begintest=Commencer le cycle de test tab_basic=De base tab_advanced=Avanc\u00e9 isoA1=Mandataire annonyme isoO1=autre Pays isoU1=Inconnu chkbox_disablenotify=D\u00e9sactiver les notifications du bureau ttip_disablenotify=D\u00e9sactiver les notifications du bureau dlg_libnotify_title=notify-send est introuvable dlg_libnotify_body=Les notifications de bureau ne fonctionneront pas sans que le paquet libnotify-bin ne soit install\u00e9.\n\nPour emp\u00eacher que cette fen\u00eatre apparaissent de nouveau installez le paquet exig\u00e9 ou d\u00e9sactivez les notifications de bureau dans les pr\u00e9f\u00e9rences. ttip_hidemin=L'appli sera cach\u00e9e au lieu d'\u00eatre minimis\u00e9e. chkbox_hidemin=Cacher au lieu de minimiser label_autoselect= Mode de s\u00e9lection automatique : menu_geoip=Mettre GEOIP \u00e0 jour chkbox_geocheck=V\u00e9rification trimestrielle des mises \u00e0 jour GEOIP ttip_geocheck=SelekTOR affichera la \u00abfen\u00eatre de mise \u00e0 jour GEOIP \u00bbsi votre base de donn\u00e9es GEOIP est p\u00e9rim\u00e9e. dlg_geo_title=Mise \u00e0 jour des donn\u00e9es de g\u00e9olocalisation dlg_geo_body=Les donn\u00e9es de g\u00e9olocalisation fournies par Tor sont parfois p\u00e9rim\u00e9es. Vous pouvez demander \u00e0 SelekTOR de t\u00e9l\u00e9charger ses propres fichiers de donn\u00e9es de g\u00e9olocalisation de Dazzleships.net et de les utiliser. Ils sont mis \u00e0 jour trimestriellement.\n\nVeuillez noter que si vous choisissez de ne pas mettre \u00e0 jour, certains n\u0153uds pourraient \u00eatre assign\u00e9s au mauvais pays.\n\nLes donn\u00e9es des ces fichiers, comme les donn\u00e9es fournies par le client Tor, sont fournies par Maxmind.com. dload_status_contact=R\u00e9cup\u00e9ration des derni\u00e8res donn\u00e9es GEOIP dload_status_failed=\u00c9chec de t\u00e9l\u00e9chargement chkbox_viator=T\u00e9l\u00e9charger par Tor ttip_patterntable=\u00c9dition en ligne prise en charge, un double-clic gauche lance l'\u00e9dition d'une cellule d'un tableau. fileext_pattern=Fichiers de mod\u00e8les zipp\u00e9selektor-3.13.73/src/resources/MessagesBundle_fr_CH.properties0000644000175000017500000004401513302030722023715 0ustar bannorbannor# French CA, Default language file, provided by yahoe001 gpltransurl=https://fsffrance.org/gpl/gpl-fr.fr.html appdesc=$appname $appver, Les n\u0153uds de sortie de Tor simplifi\u00e9s. text_yes=Oui text_no=Non wintitle_prefs = Pr\u00e9f\u00e9rences de $appname wintitle_about = \u00c0 propos de $appname wintitle_patternedit = \u00c9diteur de mod\u00e8les $appname wintitle_guardnodes=S\u00e9lection des n\u0153uds de garde wintitle_tormonitor=Moniteur du client Tor textfield_unknown=Inconnu progstatus_initial=Initialisation... progstatus_bridges=Mise en place du changement de ponts. progstatus_generate=G\u00e9n\u00e9ration d'une nouvelle liste de n\u0153uds, veuillez patienter. progstatus_cachedated=Les descripteurs en cache sont p\u00e9rim\u00e9s, ils seront renouvel\u00e9s. progstatus_nonet=L'acc\u00e8s \u00e0 Internet n'est pas disponible. progstatus_checkrecommended=Recherche des derniers n\u0153uds recommand\u00e9s. progstatus_torfailretry=\u00c9chec lors du d\u00e9marrage de Tor, nouvel essai. progstatus_nodefail=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. progstatus_nodefailretry=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. Nouvel essai, veuillez patienter. progstatus_nodefailtorchoose=Le n\u0153ud demand\u00e9 n'est pas joignable, Tor en choisira un, veuillez patienter. progstatus_nodeactive3hop=Le circuit \u00e0 3 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_nodeactive2hop=Le circuit \u00e0 2 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_autoswitch=Auto-commutation vers le n\u0153ud progstatus_manswitch=Commutation vers le n\u0153ud choisi manuellement progstatus_waitfortor=Attente d'activation d'un n\u0153ud par Tor. progstatus_switchtonode=Commutation vers le n\u0153ud $nodename. progstatus_applychanges=Mise en place des nouvelles pr\u00e9f\u00e9rences. circuit_status_creating_2hop=Cr\u00e9ation d'un circuit \u00e0 2 sauts. circuit_status_creating_3hop=Cr\u00e9ation d'un circuit \u00e0 3 sauts. circuit_status_testing=Test du circuit. circuit_status_aborted=Test interrompu. circuit_status_built=$1 circuit(s) construit(s). circuit_status_passed=Circuit v\u00e9rifi\u00e9. circuit_status_failed=\u00c9chec de circuit. circuit_status_none=Aucun circuit n'est disponible. circuit_status_noroute=Routeurs (tous) hors service. combo_proxymode1=D\u00e9sactiv\u00e9 combo_proxymode2=Relais par mod\u00e8le combo_proxymode3=Relayer tout le trafic combo_loglev1=D\u00e9bogage combo_loglev2=Infos combo_loglev3=Avis traymenu_proxymode1=Mode : pas de relais traymenu_proxymode2=Mode : relais par mod\u00e8le traymenu_proxymode3=Mode : relayer tout le trafic traymenu_showgui=Cacher/Montrer l'IUG traytool_guardnode=Noeud de garde traytool_exitnode=Noeud de sortie exittable_col1=N\u0153ud de sortie exittable_col2=BP (MB\\s) exittable_col3=D\u00e9lai (ms) exittable_col4=\u00c9tat exittable_col5=Favori patterntable_col1=Description patterntable_col2=Mod\u00e8le patterntable_col3=Activ\u00e9 guardtable_col1=N\u0153ud de garde guardtable_col2=Pays guardtable_col3=BP (MB\\s) guardtable_col4=De confiance menu_menu=Menu menu_prefs=Pr\u00e9f\u00e9rences menu_quickadd=Ajout rapide d'un mod\u00e8le menu_patternedit=\u00c9diteur de mod\u00e8les de relais menu_export=Exporter les mod\u00e8les menu_import=Import les mod\u00e8les menu_quit=Quitter menu_defaultpatterns=Mod\u00e8le par d\u00e9faut menu_userpatterns=Mod\u00e8les de l'utilisateur menu_help=Aide menu_debuglog=Voir le journal de d\u00e9bogage menu_helpcontents=Contenu de l'aide menu_torcheck=V\u00e9rification de routine de Tor menu_about=\u00c0 propos de menu_license=Licence menu_proxy=Mode de relais menu_close=Fermer le menu menu_tormanual=Manuel officiel de Tor menu_tormonitor=Moniteur du client Tor menu_leaktest=Test de fuite DNS menu_credits=Cr\u00e9dits label_activecountry=Pays actif : label_proxymode=Mode de relais : label_exitnode=N\u0153ud de sortie : label_ip=IP : label_torlatency=D\u00e9lai label_fingerprint=Empreinte : label_bandwidth=Bande passante label_streams=Flux label_stable=Stable label_status=\u00c9tat : label_listenport=Port d'\u00e9coute de Tor : label_defaultproxy=Mandataire HTTP par d\u00e9faut : label_bridgeaddress=Adresse de pont de Tor : label_portranges=Plages de port pr\u00e9sentement actives, de $portmin \u00e0 $portmax label_editcountry=Choisir un pays pour voir ses mod\u00e8les label_quickadd_desc=Description : label_quickadd_pattern=Mod\u00e8le : label_threshold=D\u00e9lai seuil label_middle=Milieu : label_exit=Sortie : label_nickname=Pseudonyme label_ip=IP label_country=Pays label_guard_minimum=Vous pouvez soit ne choisir aucun n\u0153ud de garde au cas o\u00f9 le client Tor les choisit, soit choisir trois n\u0153uds de garde ou plus. label_torlogging=Niveau de journalisation : label_torargs=Arguments de d\u00e9marrage : label_torsocks=Param\u00e8tres Socks : label_diskoptions=Options du disque : label_guardnode=Garde : label_bridgenode=Pont : label_donotproxy=Ne pas relayer : button_details=D\u00e9tails button_whois=Qui est button_close=Fermer button_apply=Appliquer button_delete=Supprimer button_addnew=Ajouter un nouveau button_save=Enregistrer button_cancel=Annuler button_continue=Continuer button_getbridges=Obtenir des ponts button_mozillarestart=Red\u00e9marrer $browser button_visitus=Rendez-nous visite button_contactus=Contactez-nous button_translations=Traductions non officielles button_prefdefaults=R\u00e9initialiser aux leurs valeurs par d\u00e9faut. button_setguards=D\u00e9finir les n\u0153uds de garde button_details=D\u00e9tails de l'atlas button_clearguards=Effacer les n\u0153uds de garde choisis button_clearfavs=Effacer les favoris button_support=Soutenir SelekTOR button_patreon=Soutenir SelekTOR avec Patreon panel_general=Param\u00e8tres g\u00e9n\u00e9raux panel_network= Param\u00e8tres r\u00e9seau panel_management=Param\u00e8tres de gestion des n\u0153uds panel_info=Circuit actif panel_torclientset=Param\u00e8tres du client Tor panel_startupargs=Arguments de d\u00e9marrage panel_stdout=Moniteur de sortie standard chkbox_autoselect=Choix automatique du n\u0153ud chkbox_autostart=D\u00e9marrage automatique de SelekTOR chkbox_checkforupdates=V\u00e9rifier les mises \u00e0 jour au d\u00e9marrage chkbox_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification chkbox_autopatterns=Installer automatiquement les derniers mod\u00e8les. chkbox_mozillawarn=D\u00e9sactiver l'avertissement de Mozilla chkbox_recnodesonly=Utiliser les n\u0153uds recommand\u00e9s en mode par mod\u00e8les chkbox_hidetotray=Minimiser au d\u00e9marrage chkbox_minonclose=Minimiser plut\u00f4t que de quitter lors de la fermeture chkbox_safesocks=Socks s\u00e9curitaire chkbox_twohop=Utiliser des circuits \u00e0 2 sauts vers le n\u0153ud de sortie en mode par mod\u00e8les chkbox_warnunsafesocks=Avertir si \u00e0 risque chkbox_diskavoid=\u00c9viter les \u00e9critures sur le disque chkbox_testsocks=Tester Socks chkbox_safelog=Journalisation s\u00e9curitaire chkbox_guardwarn1=Afficher une fen\u00eatre d'avertissement si un n\u0153ud de garde non sp\u00e9cifi\u00e9 est utilis\u00e9 chkbox_guardwarn2=Afficher une fen\u00eatre d'avertissement si moins de trois n\u0153uds de garde sont choisis chkbox_securedelete=Effacement s\u00e9curis\u00e9 des caches de Tor lors de la fermeture ttip_autostart=D\u00e9marrage automatique de SelekTOR lors du d\u00e9marrage/de la connexion ttip_hidetotray=Minimiser au d\u00e9marrage ttip_checkforupdates=SelekTOR v\u00e9rifiera les mises \u00e0 jour au d\u00e9marage ttip_autoinstall=Les derniers mod\u00e8les seront r\u00e9cup\u00e9r\u00e9s de Dazzleships.Net ttip_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification ttip_mozillawarn=D\u00e9sactiver l'avertissement du navigateur Mozilla ttip_listenport=Le port d'\u00e9coute du client Tor ttip_defaultproxy=Tout trafic qui ne sera pas redirig\u00e9 par Tor sera redirig\u00e9 par ce mandataire HTTP ttip_donotproxy=Toute URL contenant une de ces entr\u00e9es s\u00e9par\u00e9es par des virgules ne sera pas relay\u00e9e. L'on s'y connectera directement. ttip_bridgeaddress=Pour contourner le blocage du FSI, ajouter une adresse de pont valide ici ttip_forcedns=Forcer la recherche DNS par Tor, exige le red\u00e9marrage du navigateur ttip_forcenode=Si coch\u00e9, le n\u0153ud sera activ\u00e9 quelque soit l'activit\u00e9 du n\u0153ud ttip_recnodesonly=Les n\u0153uds recommand\u00e9s seront utilis\u00e9s en mode par mod\u00e8les ttip_minonclose=L'application sera minimis\u00e9e au lieu de quitter \u00e0 la fermeture de la fermeture principale ttip_threshold=D\u00e9lai seuil ttip_safesocks=Activ\u00e9e, Tor rejettera les connexions logicielles qui utilisent des variantes dangereuses du protocole Socks. ttip_warnunsafe=Activ\u00e9e, Tor avertira \u00e0 chaque fois qu'une requ\u00eate est re\u00e7ue contenant seulement une adresse IP au lieu d'un nom d'h\u00f4te. ttip_testsocks=Activ\u00e9e Tor journalisera une entr\u00e9e de journal de niveau avis pour chaque connexion en indiquant si elle utilise un protocole Socks s\u00e9curitaire ou dangereux. ttip_safelogging=Activ\u00e9e, Tor nettoiera les cha\u00eenes potentiellement sensibles des messages de journalisation. ttip_avoiddisk=Activ\u00e9e, Tor essaiera d'\u00e9crire moins fr\u00e9quemment sur le disque que nous ne le ferions autrement. ttip_extraargs= Arguments suppl\u00e9mentaires sp\u00e9cifi\u00e9s par l'utilisateur, voir le Manuel Tor. ttip_combo_loglevel=Niveau de journalisation de Tor. ttip_twohop=Utiliser des circuits \u00e0 2 sauts au lieu des 3 par d\u00e9faut de Tor. R\u00e9duit le d\u00e9lai de transit mais affaiblit l'anonymat. ttip_resetbasicprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences de base \u00e0 leurs valeurs par d\u00e9faut. ttip_resetadvprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences avanc\u00e9es \u00e0 leurs valeurs par d\u00e9faut. ttip_guardwarn1=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant qu'un n\u0153ud de garde non sp\u00e9cifi\u00e9 est actif. ttip_guardwarn2=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant que trop peu de n\u0153uds de garde sont choisis ttip_clearguards=Effacer les n\u0153uds de garde choisis. ttip_securedelete=Activ\u00e9, les caches de Tor seront \u00e9cras\u00e9es par des z\u00e9ros, puis supprim\u00e9es dlg_update_title=Mise \u00e0 jour disponible. dlg_update_body=$version est maintenant disponible au t\u00e9l\u00e9chargement. dlg_restoreproxy_title=Param\u00e8tres originaux du mandataire dlg_restoreproxy_body=Choisir Continuer pour restaurer les param\u00e8tres du mandataire aux valeurs par d\u00e9faut avant l'installation de SelekTOR. dlg_resetproxy_title=Param\u00e8tres par d\u00e9faut du mandataire dlg_resetproxy_body=Choisir Continuer pour r\u00e9initialiser les param\u00e8tres du serveur mandataire \u00e0 leurs valeurs syst\u00e8me par d\u00e9faut. dlg_gsetting_title=Gsettings introuvable dlg_gsetting_body=$appname ne peux pas fonctionner correctement sans que l'ex\u00e9cutable binary soit install\u00e9. Dans certaines distributions il peut \u00eatre trouv\u00e9 dans le paquet libglib2.0-bin. dlg_torclient_title=Client TOR introuvable dlg_torclient_body=$appname ne peux pas fonctionner sans que le client Tor ne soit Install\u00e9. Veuillez installer les paquets tor et tor-geoipdb pour votre distribution. dlg_mozillarestart_title=Avertissement\u00a0: Le navigateur $browser est actif. dlg_mozillarestart_body=$appname a d\u00e9tect\u00e9 que le navigateur $browser tourne d\u00e9j\u00e0.\nUn red\u00e9marrage du navigateur est exig\u00e9 pour permettre le fonctionnement de $appname.\n\nSi vous choisissez de red\u00e9marrer $browser, tous les onglets actuellement ouverts seront restaur\u00e9s au red\u00e9marrage de $browser, l'option \u00ab Afficher les dernier onglets et fen\u00eatres utilis\u00e9s \u00bb, doit \u00eatre choisie dans les options de $browser.\n\nVous pouvez d\u00e9sactiver cet avertissement du navigateur dans les Pr\u00e9f\u00e9rences de $appname. dlg_license_title=Licence de $appname dlg_exportuser_title=Exporter les mod\u00e8les d'utilisateur dlg_exportuser_body=Aucun mod\u00e8le cr\u00e9\u00e9 par l'utilisateur n'a \u00e9t\u00e9 trouv\u00e9.\n\nUtilisez l'\u00e9diteur de mode pour ajouter vos propres mod\u00e8les dlg_exportdefault_title=Exporter les mod\u00e8les par d\u00e9faut dlg_exportdefault_body=Aucun mod\u00e8le par d\u00e9faut n'a \u00e9t\u00e9 trouv\u00e9. dlg_saveuser_title=Enregistrer les modes de l'utilisateur dlg_savedefault_title=Enregistrer les mod\u00e8les par d\u00e9faut dlg_import_title=Importer le fichier des mod\u00e8les dlg_import_success_title=Mod\u00e8les import\u00e9s dlg_import_success_body=Les mod\u00e8les ont \u00e9t\u00e9 import\u00e9s avec succ\u00e8s et sont maintenant actifs. dlg_import_fail_title=\u00c9chec lors l'importation dlg_import_fail_body=Les mod\u00e8les n'ont pas \u00e9t\u00e9 import\u00e9s correctement. dlg_whois_title=Qui est $ipaddress dlg_whois_body=Veuillez patienter pendant que j'essaie de r\u00e9cup\u00e9rer les donn\u00e9s de WhoIs... dlg_whois_fail=D\u00e9sol\u00e9, impossible de r\u00e9cup\u00e9rer les informations de Whois. dlg_toold_body=Le client Tor actuellement install\u00e9 est trop ancien, Tor 0.2.7.6 ou ult\u00e9rieure est exig\u00e9e.\n\nLes utilisateurs de Linux devraient visiter la page suivante \nhttps://www.torproject.org/download/download-unix.html.en\npour obtenir le dernier client Tor. dlg_error_title=Erreur de d\u00e9marrage dlg_error_body=Cette erreur est fatale et $appname se fermera. dlg_quickadd_title=Ajouter un mod\u00e8le dlg_nodelistfail_body=La g\u00e9n\u00e9ration de la liste des n\u0153uds a \u00e9chou\u00e9 \u00e0 cause d'erreurs de GEOIP. dlg_patterneditsave_title=Enregistrer les mod\u00e8les actuels dlg_patterneditsave_body=Les mod\u00e8les actuels ont \u00e9t\u00e9 modifi\u00e9s.\n\nSi vous d\u00e9sirez les enregistrer, cliquez sur Continuer, autrement cliquez sur Annuler. dlg_instancefail_title=\u00c9chec d\u00fb \u00e0 plusieurs instances dlg_instancefail_body=Une instance de $appname est d\u00e9j\u00e0 en cours et une seule peut \u00eatre ex\u00e9cut\u00e9e \u00e0 la fois.\n\nQuittez l'instance existante de $appname ou dans le cas d'un plantage de $appname, red\u00e9marrez X en vous d\u00e9connectant et en vous connectant de nouveau. dlg_guardwarn_title=Avertissement de n\u0153ud de garde dlg_guardwarn_body=Un n\u0153ud de garde ne se trouvant pas dans votre liste de n\u0153uds de garde sp\u00e9cifi\u00e9e a \u00e9t\u00e9 utilis\u00e9.\nCeci provient probablement du fait que vos n\u0153uds de garde s\u00e9lectionn\u00e9s ne sont plus joignables et par cons\u00e9quent le client Tor a assign\u00e9 son propre n\u0153ud de garde.\n\nVous devriez v\u00e9rifier vos n\u0153uds de garde actuellement d\u00e9finis pour voir s'ils sont toujours disponibles, ou en choisir de nouveaux. dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus.dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus. dlg_bridgerr_title=\u00c9chec de validation de l'adresse de pont dlg_bridgerr_body=Les informations de pont fournies contiennent des erreurs de validation et ne se conforment pas \u00e0 un format d'adresse IPv4 valide h\u00f4te:port\n\nVoici des exemples de format de sp\u00e9cification de ponts :\n\nPont simple : \n127.0.0.1:8080\n\nPonts multiples : \n127.0.0.1:8080,128.5.6.8:224\n\nLes ponts ont \u00e9t\u00e9 r\u00e9initialis\u00e9s \u00e0 leurs valeurs par d\u00e9faut. dlg_credits_title=Cr\u00e9dits de $appname dlg_credits_body=Afin que votre nom apparaissent ici et pour aussi m\u00e9riter ma gratitude, veuillez envisager de soutenir le d\u00e9veloppement futur de SelekTOR sous Linux avec Patreon. table_popup_details=D\u00e9tails table_popup_whois=Qui est table_popup_begintest=Commencer le cycle de test tab_basic=De base tab_advanced=Avanc\u00e9 isoA1=Mandataire annonyme isoO1=autre Pays isoU1=Inconnu chkbox_disablenotify=D\u00e9sactiver les notifications du bureau ttip_disablenotify=D\u00e9sactiver les notifications du bureau dlg_libnotify_title=notify-send est introuvable dlg_libnotify_body=Les notifications de bureau ne fonctionneront pas sans que le paquet libnotify-bin ne soit install\u00e9.\n\nPour emp\u00eacher que cette fen\u00eatre apparaissent de nouveau installez le paquet exig\u00e9 ou d\u00e9sactivez les notifications de bureau dans les pr\u00e9f\u00e9rences. ttip_hidemin=L'appli sera cach\u00e9e au lieu d'\u00eatre minimis\u00e9e. chkbox_hidemin=Cacher au lieu de minimiser label_autoselect= Mode de s\u00e9lection automatique : menu_geoip=Mettre GEOIP \u00e0 jour chkbox_geocheck=V\u00e9rification trimestrielle des mises \u00e0 jour GEOIP ttip_geocheck=SelekTOR affichera la \u00abfen\u00eatre de mise \u00e0 jour GEOIP \u00bbsi votre base de donn\u00e9es GEOIP est p\u00e9rim\u00e9e. dlg_geo_title=Mise \u00e0 jour des donn\u00e9es de g\u00e9olocalisation dlg_geo_body=Les donn\u00e9es de g\u00e9olocalisation fournies par Tor sont parfois p\u00e9rim\u00e9es. Vous pouvez demander \u00e0 SelekTOR de t\u00e9l\u00e9charger ses propres fichiers de donn\u00e9es de g\u00e9olocalisation de Dazzleships.net et de les utiliser. Ils sont mis \u00e0 jour trimestriellement.\n\nVeuillez noter que si vous choisissez de ne pas mettre \u00e0 jour, certains n\u0153uds pourraient \u00eatre assign\u00e9s au mauvais pays.\n\nLes donn\u00e9es des ces fichiers, comme les donn\u00e9es fournies par le client Tor, sont fournies par Maxmind.com. dload_status_contact=R\u00e9cup\u00e9ration des derni\u00e8res donn\u00e9es GEOIP dload_status_failed=\u00c9chec de t\u00e9l\u00e9chargement chkbox_viator=T\u00e9l\u00e9charger par Tor ttip_patterntable=\u00c9dition en ligne prise en charge, un double-clic gauche lance l'\u00e9dition d'une cellule d'un tableau. fileext_pattern=Fichiers de mod\u00e8les zipp\u00e9selektor-3.13.73/src/resources/trayicon.png0000644000175000017500000002172013302030722020171 0ustar bannorbannorPNG  IHDR>abKGD pHYs  tIME--߅ctEXtCommentCreated with GIMPW IDATxypu? HpHJ6ے(qK8q\7MҴYigڙn3d&tڦIYxqF-ђ%REq}Hb~۽  `[9sٯOf*j#˰]L7G5|HEV8z0+U3eOc( h]\K@!J*#C+<*QUBԸ~~!KDCHPq}Dk֪rAR!"qaW>Y+R aE1: ~ M_]BV:PayY_u +J^qA j"-jf8P@jQ 5F5ԨPjT@jQ 5Fcj,XTqI-5 ʽ Fʿ-US^ ˌb *ྜIo4,5,#͗2ؙNґziIYgKkD}!Vw2v˴acF0p&cm݅!ea֎y $w'_dc.1fyC1>NQ>E)^[R2,%Bhn<~Q؆#D蹼eG΄බD@DP!9Ţ[DRU YBuSHBY"KB@鈘~$BVJG!#ms^b"|P*ijrlky]]}N'i+P-8tZr&!B*1lXGȮ'xzVKKO0&5,i/PrZ;S"o! &RxV͏{49qqs+hFSϓq8¸@ *?18Bi!Lvt wo`U ry@X0jX^QI XS5_[X_?qSώU}]_஍?Eê4„`פ'5J u6 +>N}}=Uv: Q ^{HIB!,͚XA{2#qL2SIqU𦴜 tY|'o|t:3D\:i dJ;;1SE `ǥLG1@)ebWz3BE4 mF{+f?cYl&0 1-b?_e$8UT1Ekj G0 Ӱϼo%lE!M m(꺺-0p˚ŅV.1֎@qb]Z61CL _+2uL{8w!NsLHuV NXCq˫ @ʘRyl:'/䒭(5s ɨMֹi7ug kb "w&=,4ߦc3ł7ުf5 O ȩ7hl9HV.с鮳Fԫ&<ba!=SXΫjl뺫)#Y"6p/ӰnVGQ޺TR9)+ cVuq'XSw fcНbS61 | lr,R-`ɸ-ܵ v}bVӯ\ǿF1dq\UM01%{Xۼ?*Z!a&yFB1ʊ<1>ʔ%lj}>=Ar;rj7tfUΞ?IUBTbuV!g@]D]Q>XUO@CSzIvz;"ݑSJsy"³ӷiK8y cS~ڏp_e\M\b?Ik.+tXӘc`m =;FKrˬa 6WL[AI JJ0 |M >L\6{]_*x޾?ṣ, 28|(hetO5A,t |aG*4<7VèT7bk~{ v45 ! N L[!)cS% L; yΏ+{gaJ)RH)&Ӝ܏!ajzs&}uѫ\"jDqGwv,fp {5cG/qq`rɟVp\:WmkNm+",3-ZO\,S G8h96_[96ogmmmR %/ԛ_ԙK4~8C]]Ǟ_NM&{zCxܦ:S>3(a"X,"Yk6r4Ɍ8D%Ӂ+A L#G{⟡q53$aຮN.k.1uK1]y\ ?Dߚio Nsqpt>1m͟&[vYH%g9:6c;ik&L a,0P68ENBt/[sTv1>NvI>Sٹg[j"xpT˂9?|NfbT9ZACi}?˚-SŸ(p%k FVp'%r8^`R#I!__adt8VR>'dGeUY뱭+x|/x֍GoWNqLT^VԳӜ})Q(QZ/#@U=@<ʙ aaM KLyKm.OiTw T^OB%}_U}rbϦ_ S$0k\Kj^uݣff@RQ:ZV9!f_U.F+|Z'd8=Sg gHBaY5ڌ/PY^qE(5wghobۺdYlۚӾax%XA)ᶎ⡭?Ϛnlw~n!UJW~ Ul'LLcr+l͎IM>m8۵*J m^7tƦ~ץb@ xG˧X۹i-3Һ&_ojؚɏoahaj-VfDJ֓| 2 N[v}';$m/qzUCY>Y;,HaQ,f~o0!$!$mYt!V)O݉'D%sFԩ46B&=>LgjJ)²pGmh-n_`]& }r_~7fusDc U?Bg 2}Whx|Hr^; }kIsL3B'p<-^DnMvwLy7eKz\.>ӵhr\$/p:8$=Ϡq4nmZV@*+f֪m# =G ҅I :>XF:[;L´e^f+H@_Gf@&93L)>C#{oygy,I'e[@.;pzqڕ<ʓjh2L  S1SZDE2kܞJsS+Db^ bݷ;>j>\q\a7:,uW@A  ;3!uo1pU{g1kBce1Hd1k|?ssQ?*  gXlJMCi=Ҟs% Z\}[e$S6z)<{/8R nZQ Y|twnXܾyZ+ mięy}1?`㪇xMkvԊ~ޣOr)FÕ b§rSwܻlZc4U\ĀB5iћ=Fs_$Vϱ}lefԢq8+uS%UHO:6bK#+Q^yV;r1\߬ܓsݸ>w-mJ)E1_QRc3T }7b-ՆQ!<Pg="6c(&) ۫+%ƄcC>|o =5rSTSUsd"%6-kE5V9P9mVZOXxS7eAKaVR 0"a-]+P%c,禽Rbm34)K4bu[D b)˵tC kFi1'QZ>LwKNs7],œL:밻-ͼYQ+.2 q4aWϚ)cܻ3ܿtvxs7ӥbMszOb`.r7@PGX qĒ0Ҷ,N Dwvl|9G;aە{o'F};x,6M[|ۻ?,~<(37oQ ٴ2_l] T.Rp4gXKv8VKR,|0rɻƱc #S~-ibYVUz[% z9e+gɯQRn#X($e;WuQ,f`(^b>~۶q]a+4f k ˒d'}uN^z@jҨB=3c52\+%n>#h1g0>_|?uIw!^˲Դ 5c#? .kSG~ d#\kƒXlo}t b7׶e~9`hhŽEA*4%>eM |Ra>iN%ZX,IDAT G |}8;&LM\Mpzvk;7ӞƹH0o 8y{4SG[4AS*ZЃ|ߧ~GJS'LE¹ٞ1?Ϳ;(K!2R79)\\./:3cnN^ze,c3%*g5<[$Aŋt:MT.*#xi9Xsރm9.\ FFc-Z7dX!b@2}.d8[wlG骻Ɲh1RۈBϨ$m @JJX2  i0 pCCd9 "Aqpт\,!LeDRZqVUT;|~G0DZQg! %ѐ226!tU| MR倢*r ,l? Jt;GG -|PaDz5!ۚq*'(  ,Kˌ\*S*{'vrv8kO9I\;I({dN$i1<>S!˄ef4Mas)v ؋֊Ihg(?e,72+ _Ǵ_<_d 1mUWEiQs.Qf/˷ `Z2sxm}IENDB`selektor-3.13.73/src/resources/MessagesBundle_fr_FR.properties0000644000175000017500000004401513302030722023732 0ustar bannorbannor# French CA, Default language file, provided by yahoe001 gpltransurl=https://fsffrance.org/gpl/gpl-fr.fr.html appdesc=$appname $appver, Les n\u0153uds de sortie de Tor simplifi\u00e9s. text_yes=Oui text_no=Non wintitle_prefs = Pr\u00e9f\u00e9rences de $appname wintitle_about = \u00c0 propos de $appname wintitle_patternedit = \u00c9diteur de mod\u00e8les $appname wintitle_guardnodes=S\u00e9lection des n\u0153uds de garde wintitle_tormonitor=Moniteur du client Tor textfield_unknown=Inconnu progstatus_initial=Initialisation... progstatus_bridges=Mise en place du changement de ponts. progstatus_generate=G\u00e9n\u00e9ration d'une nouvelle liste de n\u0153uds, veuillez patienter. progstatus_cachedated=Les descripteurs en cache sont p\u00e9rim\u00e9s, ils seront renouvel\u00e9s. progstatus_nonet=L'acc\u00e8s \u00e0 Internet n'est pas disponible. progstatus_checkrecommended=Recherche des derniers n\u0153uds recommand\u00e9s. progstatus_torfailretry=\u00c9chec lors du d\u00e9marrage de Tor, nouvel essai. progstatus_nodefail=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. progstatus_nodefailretry=\u00c9chec lors de l'activation du n\u0153ud demand\u00e9. Nouvel essai, veuillez patienter. progstatus_nodefailtorchoose=Le n\u0153ud demand\u00e9 n'est pas joignable, Tor en choisira un, veuillez patienter. progstatus_nodeactive3hop=Le circuit \u00e0 3 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_nodeactive2hop=Le circuit \u00e0 2 sauts vers le n\u0153ud de sortie $nodename est actif. progstatus_autoswitch=Auto-commutation vers le n\u0153ud progstatus_manswitch=Commutation vers le n\u0153ud choisi manuellement progstatus_waitfortor=Attente d'activation d'un n\u0153ud par Tor. progstatus_switchtonode=Commutation vers le n\u0153ud $nodename. progstatus_applychanges=Mise en place des nouvelles pr\u00e9f\u00e9rences. circuit_status_creating_2hop=Cr\u00e9ation d'un circuit \u00e0 2 sauts. circuit_status_creating_3hop=Cr\u00e9ation d'un circuit \u00e0 3 sauts. circuit_status_testing=Test du circuit. circuit_status_aborted=Test interrompu. circuit_status_built=$1 circuit(s) construit(s). circuit_status_passed=Circuit v\u00e9rifi\u00e9. circuit_status_failed=\u00c9chec de circuit. circuit_status_none=Aucun circuit n'est disponible. circuit_status_noroute=Routeurs (tous) hors service. combo_proxymode1=D\u00e9sactiv\u00e9 combo_proxymode2=Relais par mod\u00e8le combo_proxymode3=Relayer tout le trafic combo_loglev1=D\u00e9bogage combo_loglev2=Infos combo_loglev3=Avis traymenu_proxymode1=Mode : pas de relais traymenu_proxymode2=Mode : relais par mod\u00e8le traymenu_proxymode3=Mode : relayer tout le trafic traymenu_showgui=Cacher/Montrer l'IUG traytool_guardnode=Noeud de garde traytool_exitnode=Noeud de sortie exittable_col1=N\u0153ud de sortie exittable_col2=BP (MB\\s) exittable_col3=D\u00e9lai (ms) exittable_col4=\u00c9tat exittable_col5=Favori patterntable_col1=Description patterntable_col2=Mod\u00e8le patterntable_col3=Activ\u00e9 guardtable_col1=N\u0153ud de garde guardtable_col2=Pays guardtable_col3=BP (MB\\s) guardtable_col4=De confiance menu_menu=Menu menu_prefs=Pr\u00e9f\u00e9rences menu_quickadd=Ajout rapide d'un mod\u00e8le menu_patternedit=\u00c9diteur de mod\u00e8les de relais menu_export=Exporter les mod\u00e8les menu_import=Import les mod\u00e8les menu_quit=Quitter menu_defaultpatterns=Mod\u00e8le par d\u00e9faut menu_userpatterns=Mod\u00e8les de l'utilisateur menu_help=Aide menu_debuglog=Voir le journal de d\u00e9bogage menu_helpcontents=Contenu de l'aide menu_torcheck=V\u00e9rification de routine de Tor menu_about=\u00c0 propos de menu_license=Licence menu_proxy=Mode de relais menu_close=Fermer le menu menu_tormanual=Manuel officiel de Tor menu_tormonitor=Moniteur du client Tor menu_leaktest=Test de fuite DNS menu_credits=Cr\u00e9dits label_activecountry=Pays actif : label_proxymode=Mode de relais : label_exitnode=N\u0153ud de sortie : label_ip=IP : label_torlatency=D\u00e9lai label_fingerprint=Empreinte : label_bandwidth=Bande passante label_streams=Flux label_stable=Stable label_status=\u00c9tat : label_listenport=Port d'\u00e9coute de Tor : label_defaultproxy=Mandataire HTTP par d\u00e9faut : label_bridgeaddress=Adresse de pont de Tor : label_portranges=Plages de port pr\u00e9sentement actives, de $portmin \u00e0 $portmax label_editcountry=Choisir un pays pour voir ses mod\u00e8les label_quickadd_desc=Description : label_quickadd_pattern=Mod\u00e8le : label_threshold=D\u00e9lai seuil label_middle=Milieu : label_exit=Sortie : label_nickname=Pseudonyme label_ip=IP label_country=Pays label_guard_minimum=Vous pouvez soit ne choisir aucun n\u0153ud de garde au cas o\u00f9 le client Tor les choisit, soit choisir trois n\u0153uds de garde ou plus. label_torlogging=Niveau de journalisation : label_torargs=Arguments de d\u00e9marrage : label_torsocks=Param\u00e8tres Socks : label_diskoptions=Options du disque : label_guardnode=Garde : label_bridgenode=Pont : label_donotproxy=Ne pas relayer : button_details=D\u00e9tails button_whois=Qui est button_close=Fermer button_apply=Appliquer button_delete=Supprimer button_addnew=Ajouter un nouveau button_save=Enregistrer button_cancel=Annuler button_continue=Continuer button_getbridges=Obtenir des ponts button_mozillarestart=Red\u00e9marrer $browser button_visitus=Rendez-nous visite button_contactus=Contactez-nous button_translations=Traductions non officielles button_prefdefaults=R\u00e9initialiser aux leurs valeurs par d\u00e9faut. button_setguards=D\u00e9finir les n\u0153uds de garde button_details=D\u00e9tails de l'atlas button_clearguards=Effacer les n\u0153uds de garde choisis button_clearfavs=Effacer les favoris button_support=Soutenir SelekTOR button_patreon=Soutenir SelekTOR avec Patreon panel_general=Param\u00e8tres g\u00e9n\u00e9raux panel_network= Param\u00e8tres r\u00e9seau panel_management=Param\u00e8tres de gestion des n\u0153uds panel_info=Circuit actif panel_torclientset=Param\u00e8tres du client Tor panel_startupargs=Arguments de d\u00e9marrage panel_stdout=Moniteur de sortie standard chkbox_autoselect=Choix automatique du n\u0153ud chkbox_autostart=D\u00e9marrage automatique de SelekTOR chkbox_checkforupdates=V\u00e9rifier les mises \u00e0 jour au d\u00e9marrage chkbox_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification chkbox_autopatterns=Installer automatiquement les derniers mod\u00e8les. chkbox_mozillawarn=D\u00e9sactiver l'avertissement de Mozilla chkbox_recnodesonly=Utiliser les n\u0153uds recommand\u00e9s en mode par mod\u00e8les chkbox_hidetotray=Minimiser au d\u00e9marrage chkbox_minonclose=Minimiser plut\u00f4t que de quitter lors de la fermeture chkbox_safesocks=Socks s\u00e9curitaire chkbox_twohop=Utiliser des circuits \u00e0 2 sauts vers le n\u0153ud de sortie en mode par mod\u00e8les chkbox_warnunsafesocks=Avertir si \u00e0 risque chkbox_diskavoid=\u00c9viter les \u00e9critures sur le disque chkbox_testsocks=Tester Socks chkbox_safelog=Journalisation s\u00e9curitaire chkbox_guardwarn1=Afficher une fen\u00eatre d'avertissement si un n\u0153ud de garde non sp\u00e9cifi\u00e9 est utilis\u00e9 chkbox_guardwarn2=Afficher une fen\u00eatre d'avertissement si moins de trois n\u0153uds de garde sont choisis chkbox_securedelete=Effacement s\u00e9curis\u00e9 des caches de Tor lors de la fermeture ttip_autostart=D\u00e9marrage automatique de SelekTOR lors du d\u00e9marrage/de la connexion ttip_hidetotray=Minimiser au d\u00e9marrage ttip_checkforupdates=SelekTOR v\u00e9rifiera les mises \u00e0 jour au d\u00e9marage ttip_autoinstall=Les derniers mod\u00e8les seront r\u00e9cup\u00e9r\u00e9s de Dazzleships.Net ttip_disabletray=D\u00e9sactiver l'ic\u00f4ne de notification ttip_mozillawarn=D\u00e9sactiver l'avertissement du navigateur Mozilla ttip_listenport=Le port d'\u00e9coute du client Tor ttip_defaultproxy=Tout trafic qui ne sera pas redirig\u00e9 par Tor sera redirig\u00e9 par ce mandataire HTTP ttip_donotproxy=Toute URL contenant une de ces entr\u00e9es s\u00e9par\u00e9es par des virgules ne sera pas relay\u00e9e. L'on s'y connectera directement. ttip_bridgeaddress=Pour contourner le blocage du FSI, ajouter une adresse de pont valide ici ttip_forcedns=Forcer la recherche DNS par Tor, exige le red\u00e9marrage du navigateur ttip_forcenode=Si coch\u00e9, le n\u0153ud sera activ\u00e9 quelque soit l'activit\u00e9 du n\u0153ud ttip_recnodesonly=Les n\u0153uds recommand\u00e9s seront utilis\u00e9s en mode par mod\u00e8les ttip_minonclose=L'application sera minimis\u00e9e au lieu de quitter \u00e0 la fermeture de la fermeture principale ttip_threshold=D\u00e9lai seuil ttip_safesocks=Activ\u00e9e, Tor rejettera les connexions logicielles qui utilisent des variantes dangereuses du protocole Socks. ttip_warnunsafe=Activ\u00e9e, Tor avertira \u00e0 chaque fois qu'une requ\u00eate est re\u00e7ue contenant seulement une adresse IP au lieu d'un nom d'h\u00f4te. ttip_testsocks=Activ\u00e9e Tor journalisera une entr\u00e9e de journal de niveau avis pour chaque connexion en indiquant si elle utilise un protocole Socks s\u00e9curitaire ou dangereux. ttip_safelogging=Activ\u00e9e, Tor nettoiera les cha\u00eenes potentiellement sensibles des messages de journalisation. ttip_avoiddisk=Activ\u00e9e, Tor essaiera d'\u00e9crire moins fr\u00e9quemment sur le disque que nous ne le ferions autrement. ttip_extraargs= Arguments suppl\u00e9mentaires sp\u00e9cifi\u00e9s par l'utilisateur, voir le Manuel Tor. ttip_combo_loglevel=Niveau de journalisation de Tor. ttip_twohop=Utiliser des circuits \u00e0 2 sauts au lieu des 3 par d\u00e9faut de Tor. R\u00e9duit le d\u00e9lai de transit mais affaiblit l'anonymat. ttip_resetbasicprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences de base \u00e0 leurs valeurs par d\u00e9faut. ttip_resetadvprefs=R\u00e9initialiser les pr\u00e9f\u00e9rences avanc\u00e9es \u00e0 leurs valeurs par d\u00e9faut. ttip_guardwarn1=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant qu'un n\u0153ud de garde non sp\u00e9cifi\u00e9 est actif. ttip_guardwarn2=Activ\u00e9, une fen\u00eatre d'avertissement sera affich\u00e9e indiquant que trop peu de n\u0153uds de garde sont choisis ttip_clearguards=Effacer les n\u0153uds de garde choisis. ttip_securedelete=Activ\u00e9, les caches de Tor seront \u00e9cras\u00e9es par des z\u00e9ros, puis supprim\u00e9es dlg_update_title=Mise \u00e0 jour disponible. dlg_update_body=$version est maintenant disponible au t\u00e9l\u00e9chargement. dlg_restoreproxy_title=Param\u00e8tres originaux du mandataire dlg_restoreproxy_body=Choisir Continuer pour restaurer les param\u00e8tres du mandataire aux valeurs par d\u00e9faut avant l'installation de SelekTOR. dlg_resetproxy_title=Param\u00e8tres par d\u00e9faut du mandataire dlg_resetproxy_body=Choisir Continuer pour r\u00e9initialiser les param\u00e8tres du serveur mandataire \u00e0 leurs valeurs syst\u00e8me par d\u00e9faut. dlg_gsetting_title=Gsettings introuvable dlg_gsetting_body=$appname ne peux pas fonctionner correctement sans que l'ex\u00e9cutable binary soit install\u00e9. Dans certaines distributions il peut \u00eatre trouv\u00e9 dans le paquet libglib2.0-bin. dlg_torclient_title=Client TOR introuvable dlg_torclient_body=$appname ne peux pas fonctionner sans que le client Tor ne soit Install\u00e9. Veuillez installer les paquets tor et tor-geoipdb pour votre distribution. dlg_mozillarestart_title=Avertissement\u00a0: Le navigateur $browser est actif. dlg_mozillarestart_body=$appname a d\u00e9tect\u00e9 que le navigateur $browser tourne d\u00e9j\u00e0.\nUn red\u00e9marrage du navigateur est exig\u00e9 pour permettre le fonctionnement de $appname.\n\nSi vous choisissez de red\u00e9marrer $browser, tous les onglets actuellement ouverts seront restaur\u00e9s au red\u00e9marrage de $browser, l'option \u00ab Afficher les dernier onglets et fen\u00eatres utilis\u00e9s \u00bb, doit \u00eatre choisie dans les options de $browser.\n\nVous pouvez d\u00e9sactiver cet avertissement du navigateur dans les Pr\u00e9f\u00e9rences de $appname. dlg_license_title=Licence de $appname dlg_exportuser_title=Exporter les mod\u00e8les d'utilisateur dlg_exportuser_body=Aucun mod\u00e8le cr\u00e9\u00e9 par l'utilisateur n'a \u00e9t\u00e9 trouv\u00e9.\n\nUtilisez l'\u00e9diteur de mode pour ajouter vos propres mod\u00e8les dlg_exportdefault_title=Exporter les mod\u00e8les par d\u00e9faut dlg_exportdefault_body=Aucun mod\u00e8le par d\u00e9faut n'a \u00e9t\u00e9 trouv\u00e9. dlg_saveuser_title=Enregistrer les modes de l'utilisateur dlg_savedefault_title=Enregistrer les mod\u00e8les par d\u00e9faut dlg_import_title=Importer le fichier des mod\u00e8les dlg_import_success_title=Mod\u00e8les import\u00e9s dlg_import_success_body=Les mod\u00e8les ont \u00e9t\u00e9 import\u00e9s avec succ\u00e8s et sont maintenant actifs. dlg_import_fail_title=\u00c9chec lors l'importation dlg_import_fail_body=Les mod\u00e8les n'ont pas \u00e9t\u00e9 import\u00e9s correctement. dlg_whois_title=Qui est $ipaddress dlg_whois_body=Veuillez patienter pendant que j'essaie de r\u00e9cup\u00e9rer les donn\u00e9s de WhoIs... dlg_whois_fail=D\u00e9sol\u00e9, impossible de r\u00e9cup\u00e9rer les informations de Whois. dlg_toold_body=Le client Tor actuellement install\u00e9 est trop ancien, Tor 0.2.7.6 ou ult\u00e9rieure est exig\u00e9e.\n\nLes utilisateurs de Linux devraient visiter la page suivante \nhttps://www.torproject.org/download/download-unix.html.en\npour obtenir le dernier client Tor. dlg_error_title=Erreur de d\u00e9marrage dlg_error_body=Cette erreur est fatale et $appname se fermera. dlg_quickadd_title=Ajouter un mod\u00e8le dlg_nodelistfail_body=La g\u00e9n\u00e9ration de la liste des n\u0153uds a \u00e9chou\u00e9 \u00e0 cause d'erreurs de GEOIP. dlg_patterneditsave_title=Enregistrer les mod\u00e8les actuels dlg_patterneditsave_body=Les mod\u00e8les actuels ont \u00e9t\u00e9 modifi\u00e9s.\n\nSi vous d\u00e9sirez les enregistrer, cliquez sur Continuer, autrement cliquez sur Annuler. dlg_instancefail_title=\u00c9chec d\u00fb \u00e0 plusieurs instances dlg_instancefail_body=Une instance de $appname est d\u00e9j\u00e0 en cours et une seule peut \u00eatre ex\u00e9cut\u00e9e \u00e0 la fois.\n\nQuittez l'instance existante de $appname ou dans le cas d'un plantage de $appname, red\u00e9marrez X en vous d\u00e9connectant et en vous connectant de nouveau. dlg_guardwarn_title=Avertissement de n\u0153ud de garde dlg_guardwarn_body=Un n\u0153ud de garde ne se trouvant pas dans votre liste de n\u0153uds de garde sp\u00e9cifi\u00e9e a \u00e9t\u00e9 utilis\u00e9.\nCeci provient probablement du fait que vos n\u0153uds de garde s\u00e9lectionn\u00e9s ne sont plus joignables et par cons\u00e9quent le client Tor a assign\u00e9 son propre n\u0153ud de garde.\n\nVous devriez v\u00e9rifier vos n\u0153uds de garde actuellement d\u00e9finis pour voir s'ils sont toujours disponibles, ou en choisir de nouveaux. dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus.dlg_notenoughguards_body=Il n'y a pas assez de n\u0153uds de garde d\u00e9finis afin que Tor fonctionne efficacement et en toute s\u00e9curit\u00e9.\n\nSupprimez tous les n\u0153uds de garde s\u00e9lectionn\u00e9s, ce qui permettra au client Tor de choisir ses propres n\u0153uds de garde, ou choisissez manuellement trois n\u0153uds de garde ou plus. dlg_bridgerr_title=\u00c9chec de validation de l'adresse de pont dlg_bridgerr_body=Les informations de pont fournies contiennent des erreurs de validation et ne se conforment pas \u00e0 un format d'adresse IPv4 valide h\u00f4te:port\n\nVoici des exemples de format de sp\u00e9cification de ponts :\n\nPont simple : \n127.0.0.1:8080\n\nPonts multiples : \n127.0.0.1:8080,128.5.6.8:224\n\nLes ponts ont \u00e9t\u00e9 r\u00e9initialis\u00e9s \u00e0 leurs valeurs par d\u00e9faut. dlg_credits_title=Cr\u00e9dits de $appname dlg_credits_body=Afin que votre nom apparaissent ici et pour aussi m\u00e9riter ma gratitude, veuillez envisager de soutenir le d\u00e9veloppement futur de SelekTOR sous Linux avec Patreon. table_popup_details=D\u00e9tails table_popup_whois=Qui est table_popup_begintest=Commencer le cycle de test tab_basic=De base tab_advanced=Avanc\u00e9 isoA1=Mandataire annonyme isoO1=autre Pays isoU1=Inconnu chkbox_disablenotify=D\u00e9sactiver les notifications du bureau ttip_disablenotify=D\u00e9sactiver les notifications du bureau dlg_libnotify_title=notify-send est introuvable dlg_libnotify_body=Les notifications de bureau ne fonctionneront pas sans que le paquet libnotify-bin ne soit install\u00e9.\n\nPour emp\u00eacher que cette fen\u00eatre apparaissent de nouveau installez le paquet exig\u00e9 ou d\u00e9sactivez les notifications de bureau dans les pr\u00e9f\u00e9rences. ttip_hidemin=L'appli sera cach\u00e9e au lieu d'\u00eatre minimis\u00e9e. chkbox_hidemin=Cacher au lieu de minimiser label_autoselect= Mode de s\u00e9lection automatique : menu_geoip=Mettre GEOIP \u00e0 jour chkbox_geocheck=V\u00e9rification trimestrielle des mises \u00e0 jour GEOIP ttip_geocheck=SelekTOR affichera la \u00abfen\u00eatre de mise \u00e0 jour GEOIP \u00bbsi votre base de donn\u00e9es GEOIP est p\u00e9rim\u00e9e. dlg_geo_title=Mise \u00e0 jour des donn\u00e9es de g\u00e9olocalisation dlg_geo_body=Les donn\u00e9es de g\u00e9olocalisation fournies par Tor sont parfois p\u00e9rim\u00e9es. Vous pouvez demander \u00e0 SelekTOR de t\u00e9l\u00e9charger ses propres fichiers de donn\u00e9es de g\u00e9olocalisation de Dazzleships.net et de les utiliser. Ils sont mis \u00e0 jour trimestriellement.\n\nVeuillez noter que si vous choisissez de ne pas mettre \u00e0 jour, certains n\u0153uds pourraient \u00eatre assign\u00e9s au mauvais pays.\n\nLes donn\u00e9es des ces fichiers, comme les donn\u00e9es fournies par le client Tor, sont fournies par Maxmind.com. dload_status_contact=R\u00e9cup\u00e9ration des derni\u00e8res donn\u00e9es GEOIP dload_status_failed=\u00c9chec de t\u00e9l\u00e9chargement chkbox_viator=T\u00e9l\u00e9charger par Tor ttip_patterntable=\u00c9dition en ligne prise en charge, un double-clic gauche lance l'\u00e9dition d'une cellule d'un tableau. fileext_pattern=Fichiers de mod\u00e8les zipp\u00e9selektor-3.13.73/src/resources/MessagesBundle.properties0000644000175000017500000003340313302030722022653 0ustar bannorbannor# English GB, Default language file gpltransurl=https://www.gnu.org/licenses/translations.en.html appdesc=$appname $appver, Tor Exit Nodes Made Simple. text_yes=Yes text_no=No text_mode=Mode wintitle_prefs = $appname Preferences wintitle_about = About $appname wintitle_patternedit = $appname Pattern Editor wintitle_guardnodes=Guard node selection wintitle_tormonitor=Tor Client Monitor textfield_unknown=Unknown progstatus_initial=Initialising... progstatus_generate=Generating fresh node list, please wait. progstatus_cachedated=Cached descriptors out of date, will renew them. progstatus_nonet=Internet access un-available. progstatus_checkrecommended=Checking for the latest recommended nodes. progstatus_gotrecommended=Retrieved recommended node list. progstatus_torfailretry=Tor failed to start, retrying. progstatus_nodefail=Requested node activation failed. progstatus_nodefailretry=Requested node activation failed, will try again please wait. progstatus_nodefailtorchoose=Requested node not reachable, will let Tor choose please wait. progstatus_nodeactive3hop=3 Hop Circuit to exit node $nodename is active. progstatus_nodeactive2hop=2 Hop Circuit to exit node $nodename is active. progstatus_autoswitch=Auto-Switching to node progstatus_manswitch=Switching to manually selected node progstatus_waitfortor=Waiting for Tor to activate a node. progstatus_switchtonode=Switching to node $nodename. progstatus_applychanges=Applying new preferences. circuit_status_creating_2hop=Creating 2 hop circuit. circuit_status_creating_3hop=Creating 3 hop circuit. circuit_status_testing=Testing circuit. circuit_status_aborted=Testing aborted. circuit_status_built=$1 circuits built. circuit_status_passed=Circuit passed. circuit_status_failed=Circuit Failed. circuit_status_none=No circuits available. circuit_status_noroute=All routers down. combo_proxymode1=Disabled combo_proxymode2=Proxy by Pattern combo_proxymode3=Proxy all Traffic combo_loglev1=Debug combo_loglev2=Info combo_loglev3=Notice traymenu_proxymode1=Mode : Proxy Disabled traymenu_proxymode2=Mode : Proxy by Pattern traymenu_proxymode3=Mode : Proxy all Traffic traymenu_showgui=Hide/Show GUI traytool_guardnode=GuardNode traytool_exitnode=ExitNode exittable_col1=ExitNode exittable_col2=BW (MB\\s) exittable_col3=Latency (ms) exittable_col4=Status exittable_col5=Favourite guardtable_col1=GuardNode guardtable_col2=Country guardtable_col3=BW (MB\\s) guardtable_col4=Trusted patterntable_col1=Description patterntable_col2=Pattern patterntable_col3=Enabled menu_menu=Menu menu_prefs=Preferences menu_quickadd=Quick Add Pattern menu_patternedit=Proxy Pattern Editor menu_export=Export Patterns menu_import=Import Patterns menu_quit=Quit menu_defaultpatterns=Default Patterns menu_userpatterns=User Patterns menu_help=Help menu_debuglog=View Debug Log menu_helpcontents=Help Contents menu_torcheck=Tor Routing Check menu_about=About menu_license=License menu_tormanual=Official Tor Manual menu_tormonitor=Tor Client Monitor menu_close=Close Menu menu_proxy=Proxy Mode menu_leaktest=DNS Leak Test menu_credits=Credits label_latency_url=Tor Latency Checking URL : label_guardnode=Guard : label_bridgenode=Bridge : label_activecountry=Exit Country : label_proxymode=Proxy Mode : label_exitnode=Exit Node: label_torlatency=Latency label_fingerprint=Fingerprint: label_bandwidth=Bandwidth label_streams=Streams label_stable=Stable label_status=Client Status: label_listenport=Tor Listening Port : label_defaultproxy=Default HTTP Proxy : label_bridgeaddress=Tor Bridge Address : label_portranges=Currently active port ranges, $portmin to $portmax label_editcountry=Select Country To View its Patterns label_quickadd_desc=Description : label_quickadd_pattern=Pattern : label_threshold=Threshold label_exitip=Exit IP: label_guardip=Guard IP: label_guardcountry=Guard Country: label_torlogging=Logging Level : label_torargs=Startup Arguments : label_torsocks=Socks Settings : label_diskoptions=Disk Options : label_guard_minimum=You can have either zero guard nodes selected in which case the tor client will choose or you can have 3 or more guard nodes selected. label_nickname=Nickname label_ip=IP label_country=Country label_exit=Exit : label_middle=Middle : label_donotproxy=Do not proxy : button_details=Atlas Details button_whois=WhoIs button_close=Close button_apply=Apply button_delete=Delete button_addnew=Add New button_save=Save button_cancel=Cancel button_continue=Continue button_getbridges=Get Bridges button_mozillarestart=$browser Restart button_visitus=Visit Us button_contactus=Contact Us button_translations=Unofficial Translations button_prefdefaults=Reset to Defaults button_setguards=Set Guard Nodes button_clearfavs=Clear Favourites button_clearguards=Clear Selected Guards button_support=Support SelekTOR button_patreon=Support SelekTOR with Patreon panel_info=Active Circuit panel_general=General Settings panel_network=Network Settings panel_management=Node Management Settings panel_torclientset=Tor Client Settings panel_startupargs=Startup Arguments panel_stdout=StdOut Monitor chkbox_autoselect=Auto Node Select chkbox_autostart=Autostart SelekTOR chkbox_checkforupdates=Check for updates on startup chkbox_disabletray=Disable tray icon. chkbox_autopatterns=Auto install latest patterns. chkbox_mozillawarn=Disable Mozilla warning chkbox_recnodesonly=Use recommended nodes in Pattern Mode chkbox_hidetotray=Minimise at startup chkbox_minonclose=Minimise instead of Exit on close chkbox_twohop=Use 2 hop circuits to Exit Node in Pattern mode chkbox_safesocks=Safe Socks chkbox_warnunsafesocks=Warn Unsafe chkbox_diskavoid=Avoid disk writes chkbox_testsocks=Test Socks chkbox_safelog=Safe Logging chkbox_guardwarn1=Issue popup warning if unspecified guard node is used chkbox_securedelete=Secure delete Tor caches on exit chkbox_guardwarn2=Issue popup warning if less than 3 guard nodes selected ttip_autostart=Will start SelekTOR automatically on boot/login. ttip_hidetotray=SelekTOR will startup in system tray ttip_checkforupdates=SelekTOR will check for a newer version on startup ttip_autoinstall=Will fetch the latest patterns from Dazzleships.Net. ttip_disabletray=Disable the system tray icon ttip_mozillawarn=Disable the Mozilla browser warning ttip_listenport=The Tor client listening port. ttip_defaultproxy=Any traffic not routed through Tor will be redirected through this HTTP proxy. ttip_donotproxy=Any URL that contains one of these comma separated entries will not be proxied and will be connected to directly. ttip_bridgeaddress=To bypass ISP blocking add a valid bridge address here. ttip_forcedns=Force DNS Lookup via Tor, requires browser restart. ttip_forcenode=When checked node will be activated regardless of any current activity ttip_enhanon=Will use 3 node hops instead of 2 hops. ttip_recnodesonly=Will use the recommended nodes in pattern mode ttip_minonclose=Application will minimise instead of exit when main window is closed ttip_threshold=Threshold Latency ttip_safesocks=When enabled, Tor will reject application connections that use unsafe variants of the socks protocol. ttip_warnunsafe=When enabled, Tor will warn whenever a request is received that only contains an IP address instead of a hostname. ttip_testsocks=When enabled, Tor will make a notice-level log entry for each connection indicating whether it used a safe socks protocol or an unsafe one. ttip_safelogging=When enabled, Tor will scrub potentially sensitive strings from log messages. ttip_avoiddisk=When enabled, Tor will try to write to disk less frequently than we would otherwise. ttip_extraargs=Additional user specified arguments, see Tor Manual. ttip_combo_loglevel=Tor logging level. ttip_twohop=Use 2 hop circuits instead of Tor default of 3, reduces latency but lowers anonymity. ttip_resetbasicprefs=Reset Basic preferences to their defaults. ttip_resetadvprefs=Reset Advanced preferences to their defaults. ttip_securedelete=When enabled, Tor caches will be overwritten by zero's then deleted ttip_autonode=When enabled, SelekTOR will attempt to choose the best performing node ttip_guardwarn=When enabled, a popup warning will be issued indicating an un-specified guard node is active. ttip_clearguards=Clear selected guard nodes. ttip_clearfavs=Clear Favourites ttip_guardwarn2=When enabled, a popup warning will be issued indicating not enough guardnodes are selected. dlg_update_title=Update Available. dlg_update_body=$version is now available for download. dlg_restoreproxy_title=Original Proxy Settings dlg_restoreproxy_body=Select Continue to restore the proxy settings to their original settings prior to the installation of SelekTOR. dlg_resetproxy_title=Default Proxy Settings dlg_resetproxy_body=Select Continue to reset proxy settings to their system defaults. dlg_gsetting_title=Gsettings not found dlg_gsetting_body=$appname cannot function fully without the gsettings binary installed, on some distro's it can be found in the package libglib2.0-bin. dlg_torclient_title=TOR Client not found dlg_torclient_body=$appname cannot function without the Tor client installed please install the tor and the tor-geoipdb packages for your distro. dlg_mozillarestart_title=Warning: $browser browser is active. dlg_mozillarestart_body=$appname detected that the $browser browser is already running.\nA browser restart is required to enable $appname functionality.\n\nIf you elect to restart $browser all currently open tabs will be restored when $browser restarts, requires \"Show my Windows and tabs from last time\" option to be selected in $browser preferences/options.\n\nYou can disable this browser warning in $appname Preferences. dlg_license_title=$appname License dlg_credits_title=$appname Credits dlg_credits_body=To have your name listed here and also earn my gratitude please consider supporting the further development of SelekTOR on the Linux platform via Patreon. dlg_exportuser_title=Export User Patterns dlg_exportuser_body=No user created patterns found.\n\nUse the pattern editor to add your own patterns dlg_exportdefault_title=Export Default Patterns dlg_exportdefault_body=No default patterns found. dlg_saveuser_title=Save User patterns dlg_savedefault_title=Save Default patterns dlg_import_title=Import pattern file dlg_import_success_title=Patterns Imported dlg_import_success_body=Patterns were succesfully imported and are now active. dlg_import_fail_title=Import Failed dlg_import_fail_body=Failed to correctly import patterns. dlg_whois_title=Whois $ipaddress dlg_whois_body=Please wait while I try fetching Whois data... dlg_whois_fail=Sorry unable to fetch Whois information. dlg_toold_body=The currently installed Tor client is to old, Tor 0.2.7.6 or better is required.\n\nLinux users should visit the following page\nhttps://www.torproject.org/download/download-unix.html.en\nto obtain the latest Tor client. dlg_error_title=Startup Error dlg_error_body=This error is fatal and $appname will shut itself down. dlg_quickadd_title=Add Pattern dlg_nodelistfail_body=Nodelist generation failed due to GEOIP errors. dlg_patterneditsave_title=Save Current Patterns dlg_patterneditsave_body=Current patterns have been modified.\n\nIf you wish to save them, click Continue else click Cancel. dlg_instancefail_title=Multiple instance failure dlg_instancefail_body=An instance of $appname is already running, only one instance can be run at any time.\n\nEither shutdown the existing instance of $appname or in the event of a $appname crash restart X by logging out and in again. dlg_guardwarn_title=Guard Node Warning dlg_guardwarn_body=A guard node that is not in your specified guard nodes list has been used.\nThis is probably due to your selected guard nodes being no longer reachable and thus the tor client has assigned its own guard node.\n\nYou may want to check your currently set guard nodes to see if they are still available or select new ones. dlg_notenoughguards_body=Their are not enough guard nodes set for Tor to operate efficiently or securely.\n\nEither clear all selected guards which will allow the Tor client to choose its own guards or select three or more guards manually. dlg_bridgerr_title=Bridge address validation failure dlg_bridgerr_body=The supplied bridge information contains validation errors and does not conform to a valid host:port ipv4 address format.\n\nBridge specification format examples are as follows:\n\nSingle bridge:\n127.0.0.1:8080\n\nMultiple bridges:\n127.0.0.1:8080,128.5.6.8:224\n\nBridges have been reset to their defaults. table_popup_details=Details table_popup_begintest=Begin Test Cycle table_popup_whois=WhoIs tab_basic=Basic tab_advanced=Advanced isoA1=Anonymous Proxy isoA2=Satellite Provider isoO1=Other Country isoU1=Unknown chkbox_disablenotify=Disable desktop notifications ttip_disablenotify=Disable desktop notifications dlg_libnotify_title=notify-send not found dlg_libnotify_body=Desktop notifications will not function without the libnotify-bin package installed.\n\nTo prevent this popup appearing again either install the required package or disable desktop notifications in preferences. ttip_hidemin=Application will hide instead of minimise chkbox_hidemin=Hide instead of Minimise label_autoselect=Auto Selection Mode : menu_geoip=Update GEOIP chkbox_geocheck=Do quarterly GEOIP update check ttip_geocheck=SelekTOR will popup the "GEOIP Update dialog" if your GEOIP database is out of date. dlg_geo_title=GEO Location Data Update dlg_geo_body=The default geo-location data that comes with the Tor client is sometimes out of date, You can have SelekTOR download and use the latest geolocation data. These are maintained on a quarterly basis.\n\nPlease note, if you choose not to update, some nodes may be assigned to the wrong country.\n\nThe data in these files, like the data supplied by the Tor client, is provided by Maxmind.com. dload_status_contact=Fetching latest GEOIP data dload_status_failed=Download failed chkbox_viator=Download via Tor ttip_patterntable=Supports in-line editing, double left click a table cell to begin editing. fileext_pattern=Zipped Pattern File selektor-3.13.73/src/resources/MessagesBundle_en_US.properties0000644000175000017500000000060613302030722023743 0ustar bannorbannorprogstatus_initial=Initializing... chkbox_hidetotray=Minimize at startup chkbox_minonclose=Minimize instead of Exit on close ttip_minonclose=Application will minimize instead of exit when window is closed. ttip_hidemin=Application will hide instead of minimize chkbox_hidemin=Hide instead of Minimize button_clearfavs=Clear Favorites ttip_clearfavs=Clear Favorites exittable_col5=Favorite selektor-3.13.73/src/lib/0000755000175000017500000000000013302030722014365 5ustar bannorbannorselektor-3.13.73/src/lib/OSFunction.java0000644000175000017500000006016413302030722017266 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.ArrayList; import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author Alistair Neil */ public class OSFunction { private static ArrayList alProcesses; /** * Get process id * * @return Process id or -1 if not found */ public static String getOurProcessID() { RuntimeMXBean rtb = ManagementFactory.getRuntimeMXBean(); String processName = rtb.getName(); Integer pid = tryPattern(processName); return String.valueOf(pid); } /** * Get process id from a process * * @param process * @return process id as String */ public static String getProcessID(String process) { Pattern pattern = Pattern.compile(" +"); String[] result = pattern.split(process.trim()); if (isWindows()) { return result[1]; } else { return result[0]; } } private static Integer tryPattern(String processName) { Integer result = null; Pattern pattern = Pattern.compile("^([0-9]+)@.+$", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(processName); if (matcher.matches()) { result = Integer.parseInt(matcher.group(1)); } return result; } /** * Get OS version * * @return String OS version */ public static String getOSVersion() { return System.getProperty("os.version"); } /** * Get user name * * @return String User name */ public static String getUserName() { return System.getProperty("user.name"); } /** * Get users home folder * * @return String path to home folder */ public static String getUsersHomeFolder() { return System.getProperty("user.home"); } /** * Get file separator * * @return String separator */ public static String getFileSeparator() { return System.getProperty("file.separator"); } /** * Get users documents folder (Windows only) * * @return String path to documents folder */ public static String getUsersDocFolder() { String strReturn = getUsersHomeFolder() + "\\Documents"; if (isWinXP()) { strReturn = getUsersHomeFolder() + "\\My Documents"; } return strReturn; } /** * Get user settings path * * @return String path to user settings folder */ public static String getUserSettingsPath() { String userSettingsPath; if (isWindows()) { userSettingsPath = getUsersHomeFolder() + "\\Application Data\\"; } else { userSettingsPath = getUsersHomeFolder() + "/"; } return userSettingsPath; } /** * Get a specified application's settings folder, if null return this * applications setting folder * * @param appname Application settings folder name * @param appseries Application series (optional) * @return String Path to the applications setting folder */ public static String getAppSettingsPath(String appname, String appseries) { String appSettingsPath = getUserSettingsPath(); if (appname == null) { return appSettingsPath; } if (isLinux()) { appname = "." + appname; } appSettingsPath += appname + getFileSeparator(); if (appseries != null) { appSettingsPath += appseries + getFileSeparator(); } return appSettingsPath; } /** * Get users current folder * * @return String Path to current folder */ public static String getUsersCurrentFolder() { return System.getProperty("user.dir"); } /** * Get users temp folder * * @param path * @return String Path to users temp folder */ public static String getTempFolder(String path) { String result = System.getProperty("java.io.tmpdir"); String sep = ""; if (isLinux()) { sep = getFileSeparator(); } result += sep; if (path != null && !path.isEmpty()) { if (isWindows()) { sep = getFileSeparator(); } result = result + path + sep; } return result; } /** * Get OS name, convenience method * * @return String */ public static String getOSName() { return System.getProperty("os.name").toLowerCase(); } /** * Get OS architecture, convenience method * * @return String */ public static String getOSArch() { return System.getProperty("os.arch"); } /** * Generic test for Windows platform * * @return boolean True if Windows */ public static boolean isWindows() { return getOSName().contains("windows"); } /** * Specific test for Win 7 * * @return boolean True if Win 7 */ public static boolean isWin7() { return getOSName().startsWith("windows 7"); } /** * Specific test for Win 8 * * @return boolean True if Win 8 */ public static boolean isWin8() { return getOSName().startsWith("windows 8"); } /** * Specific test for Win 10 * * @return boolean True if Win 10 */ public static boolean isWin10() { return getOSName().startsWith("windows 10"); } /** * Specific test for Win XP * * @return boolean True if Win XP */ public static boolean isWinXP() { return getOSName().contentEquals("windows"); } /** * Generic test for Linux platform * * @return boolean True if Linux */ public static boolean isLinux() { return getOSName().contains("linux"); } /** * Find a specific file, requires a series of paths where it might be found * to be provided * * @param fname * @param paths * @return String path to file or null */ public static String findFile(String fname, String... paths) { for (String s : paths) { if (new File(s + fname).exists()) { return s + fname; } } return null; } /** * Test to see if their are multiple instances of the this app running * * @param appname * @return True if multiple instance */ public static boolean isMultipleInstance(String appname) { if (alProcesses == null) { alProcesses = getLiveProcesses(); } ArrayList processes = OSFunction.filterProcesses(appname); return OSFunction.filterProcesses(processes, "java").size() > 1; } /** * Cached list of processes * * @return list */ public static ArrayList getCachedProcesses() { return alProcesses; } /** * Find processes matching the contents of filter * * @param processes * @param filter * @return ArrayList of matching processes */ public static ArrayList filterProcesses(ArrayList processes, String filter) { ArrayList result = new ArrayList<>(); if (processes != null && !processes.isEmpty()) { if (filter != null) { for (String s : processes) { if (s.contains(filter)) { result.add(s); } } } } return result; } /** * Find processes matching the contents of filter * * @param filter * @return ArrayList of matching processes */ public static ArrayList filterProcesses(String filter) { ArrayList result = new ArrayList<>(); if (!alProcesses.isEmpty()) { if (filter != null) { for (String s : alProcesses) { if (s.contains(filter)) { result.add(s); } } } } return result; } /** * Generic kill process with matching pid * * @param pid * @return String kill result or null if failed */ public static String killProcess(String pid) { if (isWindows()) { return killProcessWindows(pid); } if (isLinux()) { return killProcessLinux(pid); } return null; } /** * Windows specific kill process with matching pid * * @param pid * @return String kill result or null if failed */ private static String killProcessWindows(String pid) { Process processKill; try { processKill = Runtime.getRuntime().exec("taskkill /F /pid " + pid); return getProcessResult(processKill); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "killProcessWindows", "", ex); } try { processKill = Runtime.getRuntime().exec("tskill " + pid); return getProcessResult(processKill); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "killProcessWindows", "", ex); } return null; } /** * Linux specific specific kill process with matching pid * * @param pid * @return String kill result or null if failed */ private static String killProcessLinux(String pid) { Process processKill = null; try { processKill = Runtime.getRuntime().exec("kill -9 " + pid); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "killProcessLinux", "", ex); } return getProcessResult(processKill); } /** * Set a files hidden status (Windows only) * * @param filepath Path to file includes filename * @param hidden True/False */ public static void setFileHidden(String filepath, boolean hidden) { if (isWindows()) { try { if (hidden) { Runtime.getRuntime().exec("Attrib.exe +H " + filepath).waitFor(); } else { Runtime.getRuntime().exec("Attrib.exe -H " + filepath).waitFor(); } } catch (IOException | InterruptedException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "setFileHidden", "", ex); } } } /** * Get gnome 3 preference using schema name and key name * * @param schema * @param key * @return String preference value */ public static String getGnome3Pref(String schema, String key) { Process p = launchProcess("gsettings", "get", schema, key); String result = getProcessResult(p); if (result != null) { result = result.replace("'", "").replace("[", "").replace("]", ""); } return result; } /** * Set a gnome 3 boolean value using schema name and key name * * @param schema * @param key * @param value */ public static void setGnome3Pref(String schema, String key, boolean value) { setGnome3Pref(schema, key, String.valueOf(value)); } /** * Set a gnome 3 string value using schema name and key name * * @param schema * @param key * @param value */ public static void setGnome3Pref(String schema, String key, String value) { if (value == null || value.isEmpty()) { resetGnome3Pref(schema, key); } else { launchProcess("gsettings", "set", schema, key, "'" + value + "'"); } } /** * Reset a gnome3 value to its default. If key is null, it will reset the * whole schema tree to its defaults * * @param schema * @param key */ public static void resetGnome3Pref(String schema, String key) { if (key == null) { launchProcess("gsettings", "reset", schema); } else { launchProcess("gsettings", "reset", schema, key); } } /** * Get a kde preference string value using group name, key name and return * contents of def on failure * * @param group * @param key * @param def * @return String Preference value */ public static String getKDEPref(String group, String key, String def) { // If exists read the file contents and find the matching key String strKdePath = getKDEProxyPath(); if (strKdePath == null) { return null; } String strTemp = null; SimpleFile sf = new SimpleFile(strKdePath); sf.openBufferedRead(); while ((strTemp = sf.readLine()) != null) { if (strTemp.contains("[" + group + "]")) { break; } } if (strTemp == null) { return def; } while ((strTemp = sf.readLine()) != null) { if (strTemp.contains(key)) { break; } } sf.closeFile(); if (strTemp == null) { return def; } strTemp = strTemp.substring(strTemp.indexOf('=') + 1); return strTemp; } /** * Set a kde string preference value using group name, key name * * @param group * @param key * @param value */ public static void setKDEPref(String group, String key, String value) { // If exists read the file contents and find the matching key String strKdePath = getKDEProxyPath(); if (strKdePath == null) { return; } SimpleFile sf = new SimpleFile(strKdePath); // Get file contents into a array list for further processing String strTemp; ArrayList listContents = new ArrayList<>(); sf.openBufferedRead(); while ((strTemp = sf.readLine()) != null) { listContents.add(strTemp); } sf.closeFile(); // Process contents of file and write it back out sf.openBufferedWrite(); // Find Group entry boolean entryfound = false; while (!listContents.isEmpty()) { strTemp = listContents.get(0); sf.writeFile(strTemp, 1); listContents.remove(0); if (strTemp.contentEquals("[" + group + "]")) { entryfound = true; break; } } // If no group entry found then write one if (!entryfound) { sf.writeFile("", 1); sf.writeFile("[" + group + "]", 1); } // Find key entry while (!listContents.isEmpty()) { strTemp = listContents.get(0); listContents.remove(0); if (strTemp.contains(key)) { break; } sf.writeFile(strTemp, 1); } sf.writeFile(key + "=" + value, 1); // Write out rest of file while (!listContents.isEmpty()) { strTemp = listContents.get(0); listContents.remove(0); sf.writeFile(strTemp, 1); } sf.closeFile(); } /** * Set a kde boolean preference value using group name, key name * * @param group * @param key * @param value */ public static void setKDEPref(String group, String key, boolean value) { setKDEPref(group, key, String.valueOf(value)); } /** * Set a kde integer preference value using group name, key name * * @param group * @param key * @param value */ public static void setKDEPref(String group, String key, int value) { setKDEPref(group, key, String.valueOf(value)); } /** * Test for KDE installed (Linux only) * * @return String path to kde proxy file or null */ public static String getKDEProxyPath() { if (isLinux()) { File f = new File(getUsersHomeFolder() + "/.config/kioslaverc"); if (f.exists()) { return f.getAbsolutePath(); } f = new File(getUsersHomeFolder() + "/.kde/share/config/kioslaverc"); if (f.exists()) { return f.getAbsolutePath(); } f = new File(getUsersHomeFolder() + "/.kde4/share/config/kioslaverc"); if (f.exists()) { return f.getAbsolutePath(); } } return null; } /** * Test if gsettings installed (Linux only) * * @return String path to gsetttings */ public static String getGsettingsPath() { // Verify if gsettings is installed return findFile("gsettings", "/usr/bin/"); } /** * Convenience method to get the first resultant output of an executed * process as a String * * @param aprocess * @return String Process result */ public static String getProcessResult(Process aprocess) { if (aprocess == null) { return null; } return getProcessOutput(aprocess.getInputStream()).toString(); } /** * Obtain all output of an executed process. * * @param is * @return ArrayList of Strings containing all generated output */ public static ArrayList getProcessOutput(InputStream is) { String line; ArrayList arrList = new ArrayList<>(); try { try (BufferedReader input = new BufferedReader(new InputStreamReader(is))) { while ((line = input.readLine()) != null) { if (line.isEmpty()) { continue; } arrList.add(line); } } return arrList; } catch (IOException ex) { Logger.getGlobal().logp(Level.SEVERE, OSFunction.class.getName(), "getProcessResults", "", ex); } return null; } /** * Launch an external process with arguments * * @param command * @return Process */ public static Process launchProcess(String... command) { try { Process p = Runtime.getRuntime().exec(command); if (p == null) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "launchProcess", "Failed Process", ""); } return p; } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "launchProcess", "", ex); } return null; } /** * Gets list of active system processes * * @return Arraylist of system process */ public static ArrayList getLiveProcesses() { if (isWindows()) { return getActiveProcessesWindows(); } else { return getActiveProcessesLinux(); } } /** * Windows specific refresh or internal list of active system processes */ private static ArrayList getActiveProcessesWindows() { ArrayList alResult = new ArrayList<>(); try { Logger.getGlobal().info("refreshActiveProcessesWindows()"); Process p = Runtime.getRuntime().exec(System.getenv("windir") + "\\system32\\" + "tasklist.exe /v"); alResult = getProcessOutput(p.getInputStream()); if (alResult.size() > 1) { // Remove second entry alResult.remove(1); } return alResult; } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "refreshActiveProcessesWindows", "", ex); } return alResult; } /** * Linux specific refresh or internal list of active system processes */ private static ArrayList getActiveProcessesLinux() { ArrayList alResult = new ArrayList<>(); try { Process process = Runtime.getRuntime().exec("ps ax"); alResult = getProcessOutput(process.getInputStream()); return alResult; } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, OSFunction.class.getName(), "refreshActiveProcessesLinux", "", ex); } return alResult; } /** * Get the name of the compositor * * @return name as String */ public static String getCompositor() { String result = "unknown"; if (isWin7() || isWin8() || isWin10()) { return "DWM"; } if (isWindows()) { return getOSName(); } if (alProcesses == null) { alProcesses = getLiveProcesses(); } for (String s : alProcesses) { if (s.contains("kwin")) { result = "kwin"; break; } if (s.contains("compton")) { result = "compton"; break; } if (s.contains("cinnamon")) { result = "clutter"; break; } if (s.contains("marco")) { result = "marco"; break; } if (s.contains("compiz")) { result = "compiz"; break; } } return result; } /** * Get the name of the active desktop * * @return name as String */ public static String getActiveDesktop() { if (isWindows()) { return getOSName(); } String result = "unknown"; if (alProcesses == null) { alProcesses = getLiveProcesses(); } for (String s : alProcesses) { if (s.contains("cinnamon-session")) { result = "cinnamon"; break; } if (s.contains("xfce4-session")) { result = "xfce"; break; } if (s.contains("mate-session")) { result = "mate"; break; } if (s.contains("gnome-shell")) { result = "gnome3"; break; } if (s.contains("unity-settings-daemon")) { result = "unity"; break; } if (s.contains("lxsession")) { result = "lxde"; break; } if (s.contains("plasma-desktop")) { result = "kde4"; break; } if (s.contains("plasmashell")) { result = "kde5"; break; } if (s.contains("enlightenment")) { result = "enlightenment"; break; } } return result; } /** * Clear active processes, mainly to reduce memory consumption when were * done with them */ public static void clearActiveProcesses() { alProcesses.clear(); alProcesses = null; } /** * Get default language iso code * * @return language iso code */ public static String getLangCode() { return Locale.getDefault().getLanguage(); } } selektor-3.13.73/src/lib/AboutDialog.java0000644000175000017500000002123213302030722017422 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.Image; import javax.swing.ImageIcon; /** * * @author Alistair Neil, */ public class AboutDialog extends javax.swing.JDialog { private String strHome = null; private String strContact = null; /** * Creates new About Dialog * * @param parent * @param modal */ public AboutDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** * Set appliction description * * @param text */ public void setAppDescription(String text) { jTextAreaVersion.setText(text); } /** * Set application logo * * @param ii */ public void setAppLogo(ImageIcon ii) { Image im = ii.getImage().getScaledInstance(jLabelAppLogo.getWidth(), jLabelAppLogo.getHeight(), Image.SCALE_SMOOTH); ii.setImage(im); jLabelAppLogo.setIcon(ii); } /** * Set home url * * @param home */ public void setHomeURL(String home) { strHome = home; } /** * Set contact url * * @param contact */ public void setContactURL(String contact) { strContact = contact; } /** * Set text on Contact button * * @param text */ public void setButtonContactText(String text) { jButtonContact.setText(text); } /** * Set text on Visit button * * @param text */ public void setButtonVisitText(String text) { jButtonVisit.setText(text); } /** * Set text on Close button * * @param text */ public void setButtonCloseText(String text) { jButtonClose.setText(text); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButtonVisit = new javax.swing.JButton(); jButtonContact = new javax.swing.JButton(); jButtonClose = new javax.swing.JButton(); jLabelAppLogo = new javax.swing.JLabel(); jTextAreaVersion = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Title"); setResizable(false); jButtonVisit.setText("Visit Us"); jButtonVisit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonVisitActionPerformed(evt); } }); jButtonContact.setText("Contact Us"); jButtonContact.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonContactActionPerformed(evt); } }); jButtonClose.setText("Close"); jButtonClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCloseActionPerformed(evt); } }); jLabelAppLogo.setVerticalAlignment(javax.swing.SwingConstants.TOP); jLabelAppLogo.setPreferredSize(new java.awt.Dimension(128, 128)); jTextAreaVersion.setEditable(false); jTextAreaVersion.setColumns(15); jTextAreaVersion.setForeground(jPanel1.getForeground()); jTextAreaVersion.setLineWrap(true); jTextAreaVersion.setRows(5); jTextAreaVersion.setWrapStyleWord(true); jTextAreaVersion.setBorder(null); jTextAreaVersion.setFocusable(false); jTextAreaVersion.setOpaque(false); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jButtonVisit) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonContact) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonClose)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabelAppLogo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextAreaVersion, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabelAppLogo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextAreaVersion)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(jButtonVisit) .addComponent(jButtonContact) .addComponent(jButtonClose))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonVisitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonVisitActionPerformed if (strHome != null) { Utilities.openFileExternally(strHome); } }//GEN-LAST:event_jButtonVisitActionPerformed private void jButtonContactActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonContactActionPerformed if (strContact != null) { Utilities.openFileExternally(strContact); } }//GEN-LAST:event_jButtonContactActionPerformed private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed dispose(); }//GEN-LAST:event_jButtonCloseActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonClose; private javax.swing.JButton jButtonContact; private javax.swing.JButton jButtonVisit; private javax.swing.JLabel jLabelAppLogo; private javax.swing.JPanel jPanel1; private javax.swing.JTextArea jTextAreaVersion; // End of variables declaration//GEN-END:variables } selektor-3.13.73/src/lib/GTKFixes.java0000644000175000017500000001073713302030722016664 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.Color; import java.awt.Dimension; import javax.swing.BorderFactory; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JTextArea; import javax.swing.UIManager; import javax.swing.event.MenuEvent; /** * * @author Alistair Neil */ public class GTKFixes { public static void fixMenubarHeight(JMenuBar jmb, JMenuItem jmi) { jmb.setPreferredSize(new Dimension(jmb.getPreferredSize().width, jmi.getPreferredSize().height)); } /** * Fixes incorrect JMenu selectionForeground and selectionBackground * highlighting * * @param jms Array of JMenus or single JMenu */ public static void fixMenuSelectionColor(JMenu... jms) { // If gtk laf not installed then do nothing if (!UIManager.getLookAndFeel().getID().contentEquals("GTK")) { return; } for (final JMenu jm : jms) { final Color bgfixed = new Color(((Color) UIManager.get("Menu.selectionBackground")).getRGB()); final Color fgfixed = new Color(((Color) UIManager.get("Menu.selectionForeground")).getRGB()); final Color fgnormal = jm.getForeground(); final Color bgnormal = new Color(((Color) UIManager.get("Menu.background")).getRGB()); jm.setText(" " + jm.getText() + " "); jm.addMenuListener(new javax.swing.event.MenuListener() { @Override public void menuSelected(MenuEvent e) { jm.setOpaque(true); jm.setForeground(fgfixed); jm.setBackground(bgfixed); } @Override public void menuDeselected(MenuEvent e) { jm.setOpaque(false); jm.setForeground(fgnormal); jm.setBackground(bgnormal); } @Override public void menuCanceled(MenuEvent e) { jm.setOpaque(false); jm.setForeground(fgnormal); jm.setBackground(bgnormal); } }); } } /** * Fixes incorrect JMenu border outline * * @param jms Array of JMenus or single JMenu */ public static void fixJMenuPopupBorder(JMenu... jms) { // If gtk laf not installed then do nothing if (!UIManager.getLookAndFeel().getID().contentEquals("GTK")) { return; } for (final JMenu jm : jms) { jm.getPopupMenu().setBorder(BorderFactory.createLineBorder( new Color(UIManager.getColor("PopupMenu.background").getRGB()).darker(), 1)); } } public static void fixTrayMenuPopupBorder(TrayPopupMenu tpm) { tpm.setBorder(BorderFactory.createLineBorder( new Color(UIManager.getColor("PopupMenu.background").getRGB()).darker(), 1)); } /** * Fixes incorrect JMenu selectionForeground highlighting * * @param jmi Array of JMenuItems or single JMenuItem */ public static void fixMenuItemFgColor(JMenuItem... jmi) { // If gtk laf not installed then do nothing if (!UIManager.getLookAndFeel().getID().contentEquals("GTK")) { return; } for (final JMenuItem jm : jmi) { final Color fgfixed = new Color(UIManager.getColor("MenuItem.foreground").getRGB()); jm.setForeground(fgfixed); } } public static void fixTextAreaColor(JTextArea jta) { if (OSFunction.isLinux()) { jta.setForeground(UIManager.getColor("JLabel.foreground")); jta.setBackground(UIManager.getColor("JLabel.background")); } } } selektor-3.13.73/src/lib/NetFunctions.java0000644000175000017500000003371313302030722017656 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.*; import java.net.HttpURLConnection; import java.net.Proxy; import java.net.Socket; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Locale; import java.util.TimeZone; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JProgressBar; /** * * @author Alistair Neil, */ public class NetFunctions { public static final int CONNECTION_FAILED = 0; public static final int FILE_LOCAL_ISNEWER = 1; public static final int FILE_RETRIEVED = 2; public static final int FILE_FAILED = 3; public static final int EVENT_URLOK = 1; public static final int EVENT_URLFAILED = 2; public static final int EVENT_NETLATENCY = 3; public static final long LATENCY_FAIL = 9999; public static final long LATENCY_UNKNOWN = 0; private int intSocketTimeout = 8000; private JProgressBar jpb; public NetFunctions() { } /** * Set default socket timeout * * @param timeout */ public void setSocketTimeout(int timeout) { intSocketTimeout = timeout; } public void setProgressBar(JProgressBar jpb) { this.jpb = jpb; } /** * Save the contents of a URL to a file * * @param destfile File destination path * @param sourceurl URL * @param socket * @param force Forces update regardless of age * @return int File retieval status code */ public int saveURLContentToFile(String destfile, String sourceurl, Socket socket, boolean force) { // Get a handle to our local file File f = new File(destfile); InputStream is = openStreamToURL(sourceurl, socket); HttpPage hp = new HttpPage(is); int result = FILE_FAILED; try { socket.setSoTimeout(intSocketTimeout); hp.retrieveHeader(); if (hp.isHeaderOK()) { result = FILE_LOCAL_ISNEWER; if (hp.getLastModified() > f.lastModified() || force) { if (hp.saveBodyToFile(destfile, jpb)) { result = FILE_RETRIEVED; Logger.getGlobal().logp(Level.INFO, this.getClass().getName(), "saveURLContentToFile", "Http body content retrieved"); } else { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "saveURLContentToFile", "Failed to retrieve Http body content"); } } } else { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "saveURLContentToFile", "Failed to retrieve Http header"); } } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "saveURLContentToFile", ex.getMessage()); } finally { try { is.close(); socket.close(); } catch (Exception ex) { } } return result; } /** * Make sure ipaddress is valid number * * @param ipaddress * @return true if a valid ip address */ public boolean isIPAddress(String ipaddress) { ipaddress = ipaddress.replace(".", ""); try { Long.parseLong(ipaddress); return true; } catch (NumberFormatException ex) { } return false; } /** * Get latency non threaded version * * @param surl Testing url * @param proxy Specify a proxy, null == no proxy * @param timeout Specify a timeout before declaring failure * @return long latency in milliseconds */ public long getLatency(String surl, Proxy proxy, int timeout) { long lngStart; long lngResult; HttpURLConnection conn = null; try { URL url = new URL(surl); if (proxy == null) { conn = (HttpURLConnection) url.openConnection(); } else { conn = (HttpURLConnection) url.openConnection(proxy); } conn.setDoInput(true); conn.setDefaultUseCaches(false); conn.setConnectTimeout(timeout); lngStart = System.currentTimeMillis(); conn.connect(); lngResult = System.currentTimeMillis() - lngStart; } catch (IOException ex) { lngResult = LATENCY_FAIL; Logger.getGlobal().log(Level.WARNING, "getLatency {0}", ex.getMessage()); } if (conn != null) { conn.disconnect(); } return lngResult; } /** * Check web for updates and return version string if an update is available * * @param sourceurl URL to check * @param s Socket * @return String new version number */ public String getURLContentAsString(String sourceurl, Socket s) { String result = null; try { s.setSoTimeout(intSocketTimeout); try (InputStream is = openStreamToURL(sourceurl, s)) { HttpPage hp = new HttpPage(is); hp.retrieveHeader(); if (hp.isHeaderOK()) { result = hp.getBodyAsString(); } is.close(); } } catch (Exception ex) { Logger.getGlobal().log(Level.WARNING, "getURLAsString", ex.getMessage()); result = null; } finally { try { s.close(); } catch (Exception ex) { } } return result; } /** * Open an inputstream to the given url on the given socket * * @param surl * @param s * @return inputstream */ public InputStream openStreamToURL(String surl, Socket s) { URI uri; try { uri = new URI(surl); String host = uri.getHost(); String path = uri.getRawPath(); if (path == null) { return null; } PrintWriter request = new PrintWriter(s.getOutputStream()); request.print("GET " + path + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" + "Connection: close\r\n\r\n" ); request.flush(); InputStream inStream = s.getInputStream(); return inStream; } catch (URISyntaxException | IOException ex) { } return null; } /** * Store an http formatted web page */ public static final class HttpPage { public static final String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz"; public static final String PATTERN_RFC1036 = "EEEE, dd-MMM-yy HH:mm:ss zzz"; public static final String PATTERN_ASCTIME = "EEE MMM d HH:mm:ss yyyy"; private final TimeZone GMT = TimeZone.getTimeZone("GMT"); private final SimpleDateFormat format = new SimpleDateFormat("", Locale.US); private final HashMap hm = new HashMap<>(); private final InputStream israw; /** * Store webpage from the given input stream * * @param is */ public HttpPage(InputStream is) { format.setTimeZone(GMT); israw = is; } private String readLine(InputStream is) { byte data; String line = ""; String term = ""; try { while (!"\r\n".equals(term)) { data = (byte) is.read(); if (data == -1) { return null; } line += String.valueOf((char) data); if (((char) data) == '\r' || ((char) data) == '\n') { term += String.valueOf((char) data); } else { term = ""; } } line = line.trim(); } catch (Exception ex) { line = null; } return line; } /** * Retrieve http header info */ public final void retrieveHeader() { int colonpos; String key; String value; String line; try { line = readLine(israw); hm.put("Header-Response", line); while (true) { line = readLine(israw); if (line.isEmpty()) { if (hm.get("Content-Length") == null) { line = readLine(israw); if (!line.isEmpty()) { try { long contentsize = Long.parseLong(line, 16); hm.put("Content-Length", String.valueOf(contentsize)); } catch (Exception ex) { } } } break; } colonpos = line.indexOf(':'); key = line.substring(0, colonpos); value = line.substring(colonpos + 1); hm.put(key, value.trim()); } } catch (Exception ex) { Logger.getGlobal().log(Level.WARNING, "retrieveHeader()", ex.getMessage()); hm.clear(); } } /** * Retrieve http body as string should only be used with text content * * @return null if failed, otherwise returns the contents */ public final String getBodyAsString() { String result = ""; try { String temp = hm.get("Content-Length"); if (temp == null) { return null; } long contentsize = Long.parseLong(temp); while (contentsize-- != 0) { result += (char) israw.read(); } } catch (NumberFormatException | IOException ex) { result = null; Logger.getGlobal().log(Level.WARNING, "getBodyAsString()", ex.getMessage()); } return result; } /** * Save http body to a file, applies to all types of content * * @param dest File destination * @param jpb Progress bar * @return true if successful */ public final boolean saveBodyToFile(String dest, JProgressBar jpb) { try { String temp = hm.get("Content-Length"); if (temp == null) { return false; } long contentsize = Long.parseLong(temp); long bytereset = contentsize / 102; long bytecount = bytereset; int progress = 0; File f = new File(dest); try (FileOutputStream fos = new FileOutputStream(f)) { if (jpb != null) { jpb.setString(null); } while (contentsize-- != 0) { fos.write(israw.read()); if (bytecount-- == 0) { bytecount = bytereset; if (jpb != null) { jpb.setValue(progress++); } } } fos.close(); return true; } } catch (NumberFormatException | IOException ex) { Logger.getGlobal().log(Level.WARNING, "saveBody()", ex.getMessage()); } return false; } /** * Get various properties of the web page * * @param key * @return property string */ public final String getProperty(String key) { return hm.get(key); } private long getHttpDate(String adate) { try { format.applyPattern(PATTERN_RFC1123); return format.parse(adate).getTime(); } catch (Exception ex) { } try { format.applyPattern(PATTERN_RFC1036); return format.parse(adate).getTime(); } catch (Exception ex) { } try { format.applyPattern(PATTERN_ASCTIME); return format.parse(adate).getTime(); } catch (Exception ex) { } return -1; } public final long getLastModified() { return getHttpDate(hm.get("Last-Modified")); } public final long getServerDate() { return getHttpDate(hm.get("Date")); } public final long getExpires() { return getHttpDate(hm.get("Expires")); } public final boolean isHeaderOK() { String temp = hm.get("Content-Length"); if (temp == null) { return false; } temp = hm.get("Header-Response"); if (temp == null) { return false; } return temp.contains("200 OK"); } } } selektor-3.13.73/src/lib/ExtensionFileFilter.java0000644000175000017500000000506613302030722021161 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.File; import javax.swing.filechooser.FileFilter; /** * * @author Alistair Neil, * Taken from Oracle documentation. */ public class ExtensionFileFilter extends FileFilter { String description; String extensions[]; /** * Convenience constructor for a single extension * * @param description * @param extension */ public ExtensionFileFilter(String description, String extension) { this(description, new String[]{extension}); } /** * Convenience constructor for a multiple extensions * * @param description * @param extensions */ public ExtensionFileFilter(String description, String extensions[]) { if (description == null) { this.description = extensions[0]; } else { this.description = description; } this.extensions = extensions.clone(); toLower(this.extensions); } private void toLower(String array[]) { for (int i = 0, n = array.length; i < n; i++) { array[i] = array[i].toLowerCase(); } } /** * Get description * * @return String */ @Override public String getDescription() { return description; } @Override public boolean accept(File file) { if (file.isDirectory()) { return true; } else { String path = file.getAbsolutePath().toLowerCase(); for (int i = 0, n = extensions.length; i < n; i++) { String extension = extensions[i]; if ((path.endsWith(extension) && (path.charAt(path.length() - extension.length() - 1)) == '.')) { return true; } } } return false; } } selektor-3.13.73/src/lib/ClientProcess.java0000644000175000017500000001723013302030722020010 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.SwingWorker; /** * * @author Alistair Neil */ public class ClientProcess { public static final int CLIENT_STOPPED = 0; public static final int CLIENT_RUNNING = 1; public static final int CLIENT_TIMEDOUT = 2; private long initialdelay = 0; private volatile long startupTimeout; private SwingWorker, String> swWorker; private volatile Process procApplication; private PrintWriter pwWriter; private volatile Thread threadSleep; private int intStatus = CLIENT_STOPPED; /** * Constructor */ public ClientProcess() { setStartupTimeout(15); } /** * Set the initial delay that is executed prior to starting the process * * @param ms */ public final void setStartupDelay(long ms) { initialdelay = ms; } /** * Set startup timeout * * @param seconds */ public final void setStartupTimeout(long seconds) { startupTimeout = seconds * 1000; } /** * Starts the client process * * @param processpath */ public final void start(final String processpath) { swWorker = new SwingWorker, String>() { String line; int endstatus; @Override protected ArrayList doInBackground() { BufferedReader brProcInput = null; BufferedReader brProcError = null; try { endstatus = CLIENT_STOPPED; if (isCancelled()) { return null; } threadSleep = Thread.currentThread(); if (initialdelay > 0) { try { Thread.sleep(initialdelay); } catch (InterruptedException ex) { } } threadSleep = null; initialdelay = 0; if (isCancelled()) { return null; } procApplication = Runtime.getRuntime().exec(processpath); if (procApplication == null) { return null; } brProcInput = new BufferedReader(new InputStreamReader(procApplication.getInputStream()), 512); brProcError = new BufferedReader(new InputStreamReader(procApplication.getErrorStream()), 512); pwWriter = new PrintWriter(procApplication.getOutputStream()); long timeout = System.currentTimeMillis() + startupTimeout; while (!isCancelled()) { if (brProcInput.ready()) { timeout = System.currentTimeMillis() + startupTimeout; // Read process notifications line = brProcInput.readLine(); publish(line); } if (brProcError.ready()) { timeout = System.currentTimeMillis() + startupTimeout; // Read process notifications line = brProcError.readLine(); publish(line); } if (System.currentTimeMillis() > timeout && startupTimeout > 0) { endstatus = CLIENT_TIMEDOUT; break; } threadSleep = Thread.currentThread(); try { Thread.sleep(20); } catch (InterruptedException ex) { } threadSleep = null; } } catch (Exception ex) { Logger.getGlobal().logp(Level.INFO, ClientProcess.class.getName(), "SwingWorker Loop Exception", ex.getMessage()); } finally { // Cleanup resources try { if (brProcInput != null) { brProcInput.close(); } if (brProcError != null) { brProcError.close(); } pwWriter.close(); // Destroy process if (procApplication != null) { procApplication.getOutputStream().close(); procApplication.getInputStream().close(); procApplication.getErrorStream().close(); procApplication.destroy(); } } catch (Exception ex) { Logger.getGlobal().logp(Level.INFO, ClientProcess.class.getName(), "SwingWorker Cleanup", ex.getMessage()); } } return null; } @Override protected void process(List chunks) { for (String s : chunks) { if (s != null) { clientProcessEventFired(s); } } } @Override protected void done() { intStatus = endstatus; clientProcessEventFired(""); } }; intStatus = CLIENT_RUNNING; clientProcessEventFired(""); // Start client process swWorker.execute(); } public final int getClientStatus() { return intStatus; } /** * Return the client system process * * @return a process */ public final Process getProcess() { return procApplication; } /** * Stops the client process * */ public final void stopProcess() { if (threadSleep != null) { threadSleep.interrupt(); } if (swWorker != null) { swWorker.cancel(true); } try { procApplication.waitFor(); } catch (Exception ex) { Logger.getGlobal().logp(Level.INFO, ClientProcess.class.getName(), "stopProcess", ex.getMessage()); } } /** * Send a message to the process * * @param message */ public final void sendMessage(String message) { pwWriter.write(message); } /** * Event from the process, should be overriden by sub class * * @param data */ public void clientProcessEventFired(String data) { } } selektor-3.13.73/src/lib/SwingTrayIcon.java0000644000175000017500000003741013302030722017775 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.AWTEvent; import java.awt.Color; import java.awt.Dimension; import java.awt.GraphicsConfiguration; import java.awt.Insets; import java.awt.MouseInfo; import java.awt.Point; import java.awt.Rectangle; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.Window.Type; import java.awt.event.AWTEventListener; import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.regex.Pattern; import javax.swing.BorderFactory; import javax.swing.JDialog; import javax.swing.JTextArea; import javax.swing.JToolTip; import javax.swing.JWindow; import javax.swing.UIManager; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; /** * * @author Alistair Neil */ public final class SwingTrayIcon { private InfoTip infoToolTip; private JDialog jdiagPopup; private TrayPopupMenu trayPopupMenu; private AWTEventListener awtEventListen; private volatile boolean mouseExited = false; private SystemTray st = null; private GraphicsConfiguration gc = null; private Point mouseloc; private TrayIcon ti; private boolean loaded; public SwingTrayIcon(GraphicsConfiguration gc, String resourcepath) { loaded = false; if (!SystemTray.isSupported()) { return; } try { st = SystemTray.getSystemTray(); ClassLoader cl = this.getClass().getClassLoader(); ti = new TrayIcon(new javax.swing.ImageIcon(cl.getResource(resourcepath)).getImage()); } catch (Exception ex) { return; } ti.setImageAutoSize(true); this.gc = gc; initDiagPopup(); if (OSFunction.isLinux()) { infoToolTip = new InfoTip(); infoToolTip.setFocusable(false); } initMouseHandler(); } private void initMouseHandler() { // We need a global mouse listener due to the way TrayIcon intercepts // mousemovements but doesnt feed all the events back to us awtEventListen = new java.awt.event.AWTEventListener() { @Override public void eventDispatched(AWTEvent event) { // Catch mouse event so we can easily get coords final MouseEvent e = (MouseEvent) event; if (!(e.getSource() instanceof TrayIcon)) { return; } mouseloc = MouseInfo.getPointerInfo().getLocation(); switch (e.getID()) { case MouseEvent.MOUSE_ENTERED: if (infoToolTip == null || trayPopupMenu.isVisible()) { return; } mouseExited = false; // Raise tooltip Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException ex) { } if (!trayPopupMenu.isVisible() && !mouseExited) { infoToolTip.setLocation(getPlacementPosition(mouseloc, infoToolTip.getWidth(), infoToolTip.getHeight(), true)); infoToolTip.setVisible(true); } else { infoToolTip.setVisible(false); } } }); t.start(); break; case MouseEvent.MOUSE_EXITED: mouseExited = true; if (infoToolTip != null) { infoToolTip.setVisible(false); } break; case MouseEvent.MOUSE_RELEASED: if (e.getButton() == MouseEvent.BUTTON3) { if (infoToolTip != null) { infoToolTip.setVisible(false); } mouseExited = true; raisePopupMenu(mouseloc); } break; } } }; Toolkit.getDefaultToolkit().addAWTEventListener(awtEventListen, AWTEvent.MOUSE_EVENT_MASK); } /** * Initialise our hidden dialog which we use to grab focus so that the * popumenu can be closed whenever we click on the desktop */ private void initDiagPopup() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); jdiagPopup = new JDialog(); jdiagPopup.setUndecorated(true); jdiagPopup.setMinimumSize(new Dimension(0, 0)); jdiagPopup.setBounds(new Rectangle(0, 0)); jdiagPopup.setType(Type.POPUP); jdiagPopup.setFocusable(false); jdiagPopup.setAutoRequestFocus(false); try { jdiagPopup.setLocation(new Point(screenSize.width, screenSize.height)); jdiagPopup.setOpacity(0); } catch (Exception ex) { } jdiagPopup.addComponentListener(new java.awt.event.ComponentListener() { @Override public void componentResized(ComponentEvent e) { } @Override public void componentMoved(ComponentEvent e) { } @Override public void componentShown(ComponentEvent e) { trayPopupMenu.setVisible(true); } @Override public void componentHidden(ComponentEvent e) { } }); } public void dispose() { // Remove from system tray unload(); // Cleanup assets that may prevent shutdown if (ti != null) { for (MouseListener ml : ti.getMouseListeners()) { ti.removeMouseListener(ml); } } if (awtEventListen != null) { Toolkit.getDefaultToolkit().removeAWTEventListener(awtEventListen); awtEventListen = null; } if (trayPopupMenu != null) { for (PopupMenuListener pml : trayPopupMenu.getPopupMenuListeners()) { trayPopupMenu.removePopupMenuListener(pml); } trayPopupMenu = null; } if (jdiagPopup != null) { for (ComponentListener cl : jdiagPopup.getComponentListeners()) { jdiagPopup.removeComponentListener(cl); } jdiagPopup.dispose(); jdiagPopup = null; } if (infoToolTip != null) { infoToolTip.dispose(); infoToolTip = null; } st = null; } public void disable() { unload(); st = null; } /** * Set tray right click popup * * @param tpm */ public void setTrayPopupMenu(TrayPopupMenu tpm) { trayPopupMenu = tpm; if (tpm == null || ti == null) { return; } trayPopupMenu.setFocusable(false); // Add popup menu listener to detect when it is hidden trayPopupMenu.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { jdiagPopup.setVisible(false); } @Override public void popupMenuCanceled(PopupMenuEvent e) { jdiagPopup.setVisible(false); } }); trayPopupMenu.setEnabled(true); trayPopupMenu.setInvoker(jdiagPopup); } /** * Open tray popup * */ private void raisePopupMenu(Point mouseloc) { if (trayPopupMenu != null) { // Set onscreen location of trayPopup Point p = getPlacementPosition(mouseloc, trayPopupMenu.getVisibleRect().width, trayPopupMenu.getHeight(), false); trayPopupMenu.setLocation(p); jdiagPopup.setVisible(true); } } /** * Calculate onscreen placement position based on mouse pointer position * * @param boxwidth * @param boxheight * @param centre * @return Point */ private Point getPlacementPosition(Point coords, int boxwidth, int boxheight, boolean istooltip) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Insets screenInsets; Point result = new Point(); double x, y, limit; int yoff = 0; if (OSFunction.isLinux()) { screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc); int i = screenInsets.bottom + screenInsets.left + screenInsets.right + screenInsets.top; // If all insets are zero then offset them all by 32, bit of a hack // for desktops that allow intelligent hiding of tray panel if (i == 0) { screenInsets = new Insets(32, 32, 32, 32); } } else { screenInsets = new Insets(0, 0, 0, 0); } // Calculate X axis positioning x = coords.x; if (x > (screenSize.getWidth() / 2)) { limit = screenSize.width - screenInsets.right; if (x + boxwidth > limit) { if (screenInsets.right == 0) { x -= boxwidth; } else { x = limit - boxwidth; } } } else { limit = screenInsets.left; if (x < limit) { x = limit; } } // Calculate Y axis positioning y = coords.y; if (y > (screenSize.getHeight() / 2)) { // Bottom if (istooltip && screenInsets.bottom == 0) { yoff = (int) ((ti.getSize().getHeight() + 1) / 2); } } else // Bottom { if (istooltip && screenInsets.top == 0) { yoff = (int) ((ti.getSize().getHeight() + 1) / 2); } } if (screenInsets.top != 0 && y < screenInsets.top) { y += (screenInsets.top - y); } limit = screenSize.height - screenInsets.bottom; if (y + yoff + boxheight > limit) { if (yoff > 0) { y -= (boxheight + yoff); } else if (screenInsets.bottom == 0) { y -= (boxheight + yoff); } else { y = limit - boxheight; } } else { y += yoff; } result.setLocation(x, y); return result; } /** * Set info tip text * * @param text */ public void setInfoTip(String text) { if (ti == null) { return; } if (OSFunction.isLinux()) { // Check to see if tay icon need reloaded if (SystemTray.isSupported() && isLoaded() && st.getTrayIcons().length == 0) { try { st.add(ti); } catch (Exception ex) { } } // Update tooltip (Linux only) if (infoToolTip != null) { infoToolTip.setText(text); if (infoToolTip.isVisible()) { infoToolTip.setLocation(getPlacementPosition(mouseloc, infoToolTip.getWidth(), infoToolTip.getHeight(), true)); } } } else { // Update tooltip (Windows Only) ti.setToolTip(text); } } /** * Display desktop message (Windows only) * * @param title * @param body */ public void displayMessage(String title, String body) { if (ti != null) { ti.displayMessage(title, body, TrayIcon.MessageType.INFO); } } /** * Load tray icon */ public void load() { // I know this looks odd but it is required for onscreen positioning // of the tray popup to work if (trayPopupMenu != null) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); trayPopupMenu.setLocation(screenSize.height, screenSize.width); trayPopupMenu.setVisible(true); trayPopupMenu.setVisible(false); } // Add this tray icon to system tray try { if (st != null) { st.add(ti); loaded = true; } } catch (Exception ex) { loaded = false; } } /** * Unload Tray icon */ public void unload() { // Remove the tray icon from system tray if (st != null) { st.remove(ti); } loaded = false; } /** * Add a mouse listener * * @param ml */ public void addMouseListener(MouseListener ml) { if (ti != null) { ti.addMouseListener(ml); } } /** * Is tray icon loaded * * @return ture if it is */ public boolean isLoaded() { return loaded; } public boolean isSupported() { return st != null; } /** * Info tip object */ private static final class InfoTip extends JWindow { JTextArea jta; Pattern p = Pattern.compile("\n"); public InfoTip() { initInfoTip(); } private void initInfoTip() { setType(Type.POPUP); jta = new JTextArea(); add(jta); JToolTip jtt = jta.createToolTip(); jta.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY)); jta.setBackground(new Color(jtt.getBackground().getRGB())); jta.setForeground(new Color(jtt.getForeground().getRGB())); setBackground(jta.getBackground()); jta.setOpaque(true); jta.setEditable(false); jta.setLineWrap(true); jta.setWrapStyleWord(true); jta.setVisible(true); setEnabled(true); } /** * Set info tip text * * @param text */ public void setText(String text) { String[] strs = p.split(text); String largest = ""; int longest = 0; int width; for (String s : strs) { width = jta.getFontMetrics(jta.getFont()).stringWidth(s); if (width > longest) { largest = s; longest = width; } } jta.setText(" " + text.replace("\n", "\n ")); width = jta.getFontMetrics(jta.getFont()).stringWidth(largest + "XXX"); int lineheight = jta.getFontMetrics(jta.getFont()).getHeight() + 1; int boxheight = jta.getLineCount() * (lineheight); setSize(width, boxheight); } } } selektor-3.13.73/src/lib/Utilities.java0000644000175000017500000003656713302030722017224 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.Desktop; import java.awt.FontMetrics; import java.awt.Frame; import java.awt.event.WindowEvent; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.ArrayList; import java.util.Formatter; import java.util.Random; import java.util.regex.Pattern; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JTable; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.filechooser.FileFilter; /** * * @author Alistair Neil */ public final class Utilities { /** * Constructor */ public Utilities() { } /** * Covert list to csv * * @param al * @return String of comma separated values */ public static String getListAsCSV(ArrayList al) { return al.toString().replace("[", "").replace("]", "").replace(" ", ""); } /** * Preloads filechooser in background so it will open instantly when * requested */ public static void preloadFileChooser() { Thread t = new Thread(new java.lang.Runnable() { @Override public void run() { JFileChooser fileChooser = new JFileChooser(); } }); t.start(); } /** * Opens java file chooser dialog, convenience method. Returns filepath if * successful and null if not * * @param parent * @param folder * @param filter Extension filter * @param mode Fileselection mode * @return String Filepath */ public static String openFileChooser(Frame parent, String folder, FileFilter filter, int mode) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(mode); fileChooser.setCurrentDirectory(new File(folder)); if (filter != null) { fileChooser.addChoosableFileFilter(filter); } int intReturn = fileChooser.showOpenDialog(parent); if (intReturn == JFileChooser.APPROVE_OPTION) { return fileChooser.getSelectedFile().getAbsolutePath(); } else { return null; } } /** * Check for newer appversion * * @param localversion * @param remoteversion * @return True if newer */ public static boolean isNewerVersion(String localversion, String remoteversion) { return convertBuildnumToFloat(remoteversion) > convertBuildnumToFloat(localversion); } /** * Convert an debian build number into a floating point number * * @param version * @return Float version */ private static float convertBuildnumToFloat(String version) { float result; Pattern p; String[] parts; try { if (version.contains("-")) { // Handling for old non-debian compatible version p = Pattern.compile("-"); parts = p.split(version); } else { // Handling for new debian compatible version p = Pattern.compile("\\."); parts = p.split(version); parts[0] = parts[0] + "." + parts[1]; parts[1] = parts[2]; parts[2] = ""; } result = Float.parseFloat(parts[0]); result += (Float.parseFloat(parts[1]) / 100000); } catch (Exception ex) { version = version.replaceAll("[^0-9.]", ""); result = convertVersionToFloat(version); } return result; } /** * Convert a windows version number into a floating point number * * @param version * @return Float version */ private static float convertVersionToFloat(String version) { int c; float f; version = version.toLowerCase(); if (version.startsWith("v")) { version = version.substring(1); } try { c = version.charAt(version.length() - 1); if (c > 96) { version = version.substring(0, version.length() - 1); Float fraction = (float) (c - 96) / 10000; f = Float.parseFloat(version) + fraction; } else { f = Float.parseFloat(version); } } catch (Exception ex) { f = 0; } return f; } /** * Open the desktop default file editor * * @param path Path to file */ public static void editFile(String path) { if (OSFunction.isLinux()) { OSFunction.launchProcess("xdg-open", path); return; } if (OSFunction.isWindows()) { OSFunction.launchProcess("notepad", path); } } /** * Launch the desktops default file handling program * * @param strUrl * @return Returns true if successful */ public static boolean openFileExternally(final String strUrl) { String url = strUrl.replace("\\", "/"); try { if (OSFunction.isLinux()) { OSFunction.launchProcess("xdg-open", url); } else { if (Desktop.isDesktopSupported()) { Desktop deskSupport = Desktop.getDesktop(); if (url.startsWith("http") || url.startsWith("ftp")) { deskSupport.browse(new URI(url)); } else { deskSupport.open(new File(url)); } } } return true; } catch (URISyntaxException | IOException ex) { } return false; } /** * Initialises the UI Look and Feel * * @param theme */ public static void loadUIStyle(String theme) { try { if (theme == null) { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); return; } if (theme.contentEquals("Metal")) { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); return; } if (theme.contentEquals("Nimbus")) { // Switch to Nimbus theme UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); return; } if (theme.contentEquals("System")) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); return; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { } try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); return; } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { } } } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { } // If everything else fails use default cross platform metal try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { } } /** * Adjust specified column width based on the width of a test string * * @param table * @param test */ public static void adjustTableColumnWidth(JTable table, String... test) { FontMetrics ourFontMetrics = table.getFontMetrics(table.getFont()); int col = 0; for (String s : test) { table.getColumn(table.getColumnName(col++)).setPreferredWidth(ourFontMetrics.stringWidth(s)); } } /** * Generate secret key. * * @param length * @return String key */ public static String generateSecretKey(int length) { StringBuilder buffer = new StringBuilder(); Random random = new Random(); String chars = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int x; try { for (int i = 0; i < length; i++) { x = random.nextInt(chars.length() - 1); buffer.append(chars.substring(x, x + 1)); } } catch (Exception ex) { } return buffer.toString(); } public static String getTorHashPassword(String secret) { byte[] key = S2KRFC2440(secret); return "16:" + byteToHex(key); } /** * Secret to key, Algorithm info taken from * http://sunsite.icm.edu.pl/gnupg/rfc2440-3.html * * @param secret * @return hashed key for the given secret */ public static byte[] S2KRFC2440(String secret) { // Create our message digest for SHA-1 MessageDigest md; try { md = MessageDigest.getInstance("SHA-1"); } catch (Exception ex) { return null; } // Create our random S2K salt, the 9th byte is loaded with the code count which // determines the amount of octet hashing used. // This salt is eventually combined with the secret to prevent dictionary attacks int codecount = 32; byte[] s2ksalt = new byte[9]; SecureRandom sr = new SecureRandom(); sr.nextBytes(s2ksalt); s2ksalt[8] = (byte) codecount; // The octet hashing count is defined by the following formula where EXPBIAS is 6 int octethashcount = (16 + (codecount & 15)) << ((codecount >> 4) + 6); // Merge our S2K salt and partialsecret arrays together into one array to // create the full secret key. byte[] partialsecret; try { partialsecret = secret.getBytes("UTF-8"); } catch (UnsupportedEncodingException ex) { return null; } byte[] fullsecret = new byte[8 + partialsecret.length]; System.arraycopy(s2ksalt, 0, fullsecret, 0, 8); System.arraycopy(partialsecret, 0, fullsecret, 8, partialsecret.length); // Do the hashing based on the hashcount while (true) { if (octethashcount < fullsecret.length) { md.update(fullsecret, 0, octethashcount); break; } else { md.update(fullsecret); } octethashcount -= fullsecret.length; } // Create our final key by merging s2kspecifier and digest result byte[] ourkey = new byte[20 + 9]; System.arraycopy(md.digest(), 0, ourkey, 9, 20); System.arraycopy(s2ksalt, 0, ourkey, 0, 9); return ourkey; } /** * Get SHAHash using given password string * * @param password * @return SHAhash string */ public static String getSHAHash(String password) { String sha1 = ""; try { MessageDigest crypt = MessageDigest.getInstance("SHA-1"); crypt.reset(); crypt.update(password.getBytes("UTF-8")); sha1 = byteToHex(crypt.digest()); } catch (NoSuchAlgorithmException | UnsupportedEncodingException e) { } return sha1; } /** * Convert byte to a hex string * * @param hash * @return byte as a hex string */ private static String byteToHex(final byte[] hash) { String result; try (Formatter formatter = new Formatter()) { for (byte b : hash) { formatter.format("%02x", b); } result = formatter.toString(); } return result; } /** * Retrieve text from a resource text file * * @param resourcepath * @return String text */ public static String getTextFromResource(String resourcepath) { SimpleFile sf = new SimpleFile(resourcepath); sf.openBufferedResource(); String text = sf.readEntireFile(); sf.closeFile(); return text; } /** * Retrieve text from a text file * * @param filepath * @return String text */ public static String getTextFromFile(String filepath) { SimpleFile sf = new SimpleFile(filepath); String text = ""; if (sf.exists()) { sf.openBufferedRead(); text = sf.readEntireFile(); sf.closeFile(); } return text; } /** * Calculate the sha1 checksum of a given file * * @param filepath * @return Checksum as a hex string */ public static String getSha1Sum(String filepath) { StringBuilder sb = new StringBuilder(""); try { MessageDigest md = MessageDigest.getInstance("SHA1"); FileInputStream fis = new FileInputStream(filepath); byte[] dataBytes = new byte[1024]; int nread; while ((nread = fis.read(dataBytes)) != -1) { md.update(dataBytes, 0, nread); } byte[] mdbytes = md.digest(); //convert the byte to hex format for (int i = 0; i < mdbytes.length; i++) { sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1)); } } catch (NoSuchAlgorithmException | IOException ex) { } return sb.toString(); } /** * Creates a hidden dummy window for registration to various docks/launchers * Fixes the neverending launching indicator */ public static void registerWindow() { final JFrame jf = new JFrame(); jf.addWindowListener(new java.awt.event.WindowListener() { @Override public void windowOpened(WindowEvent e) { jf.dispose(); } @Override public void windowClosing(WindowEvent e) { } @Override public void windowClosed(WindowEvent e) { } @Override public void windowIconified(WindowEvent e) { } @Override public void windowDeiconified(WindowEvent e) { } @Override public void windowActivated(WindowEvent e) { } @Override public void windowDeactivated(WindowEvent e) { } }); jf.setUndecorated(true); jf.setBounds(0, 0, 0, 0); jf.setVisible(true); } } selektor-3.13.73/src/lib/TextResourceDialog.java0000644000175000017500000001336313302030722021012 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; /** * * @author Alistair Neil */ public class TextResourceDialog extends javax.swing.JDialog { private String strUrl; /** * Creates new License Dialog * * @param parent * @param modal */ public TextResourceDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); jTextArea.setCaretPosition(0); jButtonLaunchURL.setVisible(false); } /** * Set the browser url for unnoficial translation * * @param url */ public void setButtonURL(String url) { strUrl = url; jButtonLaunchURL.setVisible(url != null); } /** * Get the license text * * @return Text */ public String getText() { return jTextArea.getText(); } /** * Set the license text * * @param text */ public void setText(String text) { jTextArea.setText(text); jTextArea.setCaretPosition(0); } /** * Set the text on the Close button * * @param text */ public void setCloseButtonText(String text) { jButtonClose.setText(text); } /** * Set the text on the Close button * * @param text */ public void setURLButtonText(String text) { jButtonLaunchURL.setText(text); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTextArea = new javax.swing.JTextArea(); jButtonClose = new javax.swing.JButton(); jButtonLaunchURL = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); jTextArea.setEditable(false); jTextArea.setColumns(40); jTextArea.setLineWrap(true); jTextArea.setRows(20); jTextArea.setText("\n"); jTextArea.setWrapStyleWord(true); jScrollPane1.setViewportView(jTextArea); jButtonClose.setText("Close"); jButtonClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCloseActionPerformed(evt); } }); jButtonLaunchURL.setText("URL Desc"); jButtonLaunchURL.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonLaunchURLActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(layout.createSequentialGroup() .addComponent(jButtonLaunchURL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonClose))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonClose) .addComponent(jButtonLaunchURL)) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCloseActionPerformed dispose(); }//GEN-LAST:event_jButtonCloseActionPerformed private void jButtonLaunchURLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonLaunchURLActionPerformed Utilities.openFileExternally(strUrl); }//GEN-LAST:event_jButtonLaunchURLActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonClose; private javax.swing.JButton jButtonLaunchURL; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea jTextArea; // End of variables declaration//GEN-END:variables } selektor-3.13.73/src/lib/SimpleFile.java0000644000175000017500000006122313302030722017265 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.*; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; import java.nio.file.StandardCopyOption; import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; /** * * @author Alistair Neil info@dazzleships.net */ public class SimpleFile { public static final int PERIOD_MINUTES = 0; public static final int PERIOD_HOURS = 1; public static final int PERIOD_DAYS = 2; public static final int NOTFOUND = 0; public static final int FILEDELETEOK = 1; public static final int FILEDELETEFAIL = 2; private final int blockreadsize = 1024; private BufferedReader br; private BufferedWriter bw; private ZipOutputStream zos; private File f; private String filter = ""; public SimpleFile() { } /** * Constructor * * @param pathname */ public SimpleFile(String pathname) { f = new File(pathname); } /** * Set filename * * @param pathname */ public final void setFileName(String pathname) { f = new File(pathname); } /** * Set file * * @param file */ public final void setFile(File file) { f = file; } /** * Get file * * @return file */ public final File getFile() { return f; } /** * Close file and any resources such as buffered readers/writers that are * attached to it. */ public final void closeFile() { if (br != null) { try { br.close(); } catch (IOException ex) { Logger.getLogger(SimpleFile.class.getName()).log(Level.SEVERE, null, ex); } br = null; } if (bw != null) { try { bw.close(); } catch (IOException ex) { Logger.getLogger(SimpleFile.class.getName()).log(Level.SEVERE, null, ex); } bw = null; } } /** * Sets the file filter * * @param filter */ public final void setFileFilter(String filter) { this.filter = filter; } /** * Gets the current file filter * * @return Returns the file filter */ public final String getFileFilter() { return filter; } public final static String getSeparator() { return File.separator; } /** * Creates a new folder * * @return True if successful */ public final boolean createFolder() { if (f.exists()) { return true; } return f.mkdirs(); } /** * Creates a new folder * * @param path The location of the new folder * @return True if successful */ public final static boolean createFolder(String path) { File fl = new File(path); if (fl.exists()) { return true; } return fl.mkdirs(); } /** * Create a new file * * @return True if file exist or is created */ public final boolean createFile() { boolean createNewFile = true; if (!f.exists()) { try { createFolder(f.getParent()); createNewFile = f.createNewFile(); } catch (IOException ex) { createNewFile = false; } } return createNewFile; } /** * Gets the file list at the specified directory location based on filter * contents * * @return An array of Files */ public final File[] getFileList() { File[] arrFilesCache; if (filter.isEmpty()) { arrFilesCache = f.listFiles(); } else { arrFilesCache = f.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.getPath().contains(filter); } }); } return arrFilesCache; } public final File getOldestFile() { long lngLastAge = new Date().getTime(); File oldest = null; File[] arrFiles = getFileList(); for (File fi : arrFiles) { if (fi.lastModified() < lngLastAge) { lngLastAge = fi.lastModified(); oldest = fi; } } return oldest; } public final static void walkFileTree(String path, ArrayList files) { walkFileTree(path, files, ""); } public final static void walkFileTree(String path, ArrayList files, final String filter) { File[] arrFilesCache; File root = new File(path); if (filter.isEmpty()) { arrFilesCache = root.listFiles(); } else { arrFilesCache = root.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.getPath().contains(filter); } }); } if (arrFilesCache == null) { return; } for (File f : arrFilesCache) { if (f.isDirectory()) { walkFileTree(f.getAbsolutePath(), files, filter); } else { files.add(f); } } } /** * Deletes the supplied list of files, be very carefull with this * * @param files */ public final void deleteFileList(File[] files) { for (File fx : files) { if (fx.isFile()) { boolean delete = fx.delete(); } } } /** * Delete folder and its contents using specified folder path * * @param folder * @return boolean True if successful */ public final static boolean deleteFolder(String folder) { if (OSFunction.isLinux() && folder.contentEquals("/")) { return false; } return deleteFolder(new File(folder)); } /** * Delete a folder and all of its contents works recursively * */ private static boolean deleteFolder(File folder) { if (!folder.exists()) { return false; } for (File fx : folder.listFiles()) { if (fx.isDirectory()) { deleteFolder(fx); } else { boolean delete = fx.delete(); } } return folder.delete(); } /** * Wipe folder and its contents using specified folder path * * @param folder */ public final static void secureWipeFolder(String folder) { if (OSFunction.isLinux() && folder.contentEquals("/")) { return; } secureWipeFolder(new File(folder)); } /** * Wipe folder and its contents using specified File * * @param folder */ public final static void secureWipeFolder(File folder) { if (!folder.exists()) { return; } for (File fx : folder.listFiles()) { if (fx.isDirectory()) { secureWipeFolder(fx); } else { secureWipe(fx); } } folder = renameTo(folder, "0000000"); folder.delete(); } /** * Wipe file using specified filename * * @param filename */ public final static void secureWipe(String filename) { secureWipe(new File(filename)); } /** * Wipe file using specified File * * @param f */ public final static void secureWipe(File f) { if (!f.exists()) { return; } FileOutputStream fos = null; byte b[] = new byte[4096]; long i = f.length() / 4096; int remainder = (int) (f.length() % 4096); byte r[] = new byte[remainder]; try { // Overwrite with zeros fos = new FileOutputStream(f, false); while (i-- > 0) { fos.write(b); fos.flush(); } fos.write(r); fos.close(); // Zero file length b = new byte[0]; fos = new FileOutputStream(f, false); fos.write(b); } catch (IOException ex) { Logger.getLogger(SimpleFile.class .getName()).log(Level.SEVERE, null, ex); } finally { try { if (fos != null) { fos.close(); } // Rename file f = renameTo(f, "0000000000"); // Delete file f.delete(); } catch (IOException ex) { } } } public final static File renameTo(File f, String newname) { String path = f.getParent(); if (path != null) { path += File.separator + newname; File nf = new File(path); if (f.renameTo(nf)) { return nf; } } return f; } /** * Copy multiple files from one folder to another * * @param from The from path * @param to The to path * @param ignore */ public final static void copyFolderContents(String from, String to, String ignore) { try { File ourFile = new File(from); for (File fx : ourFile.listFiles()) { if (!ignore.contains(fx.getName())) { copyFromTo(fx.getAbsolutePath(), to + fx.getName()); } } } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, "SimpleFile", "copyFolderContents()", "", ex); } } /** * Returns an array of filenames, array if populated from the offset value * onwards * * @param offset * @return An array of filenames */ public final String[] getFilenames(int offset) { String filename; File[] fileList = getFileList(); String[] result = new String[fileList.length + offset]; try { for (int i = 0; i < fileList.length; i++) { filename = fileList[i].getName(); result[i + offset] = filename.substring(0, filename.indexOf('.')); } return result; } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "getFilenames(int offset)", "", ex); return null; } } /** * Test to see if path exists * * @return Returns true if file exists */ public final boolean exists() { return f.exists(); } /** * Test to see if path exists * * @param pathname The pathname to check for * @return Returns true if file exists */ public final static boolean exists(String pathname) { return new File(pathname).exists(); } /** * Deletes file * * @return Returns true if successful */ public final boolean delete() { return f.delete(); } /** * Deletes the specified file * * @param filename * @return Returns true if successful */ public final static boolean delete(String filename) { return new File(filename).delete(); } /** * * @param toname * @return Returns true if successful */ public final boolean renameFile(String toname) { return f.renameTo(new File(toname)); } /** * Opens a buffered file for read * * @return Returns null if failed */ public final BufferedReader openBufferedRead() { try { br = new BufferedReader(new FileReader(f)); return br; } catch (FileNotFoundException ex) { } return null; } /** * Use this if you need access to a file within a jar * */ public final void openBufferedResource() { try { String path = f.getPath(); path = path.replace('\\', '/'); InputStream is = getClass().getResourceAsStream(path); br = new BufferedReader(new InputStreamReader(is)); } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "openBufferedRead(int filehandle)", "", ex); } } /** * Opens a buffered file for append * */ public final void openBufferedAppend() { try { bw = new BufferedWriter(new FileWriter(f, true)); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "openBufferedAppend()", "", ex); } } /** * Read a single line from a text file * * @return Contents as String */ public final String readLine() { try { return br.readLine(); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "readLine(int filehandle)", "", ex); } return null; } /** * Read bytes from previously opened BufferedReader * * @return Returns the entire contents from a file */ public final String readEntireFile() { char[] cb = new char[blockreadsize]; StringBuilder sb = new StringBuilder(); int bytes; try { while (br.ready()) { bytes = br.read(cb); sb.append(cb, 0, bytes); } return sb.toString(); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "readEntireFile()", "", ex); } return ""; } public final FileInputStream openFileInputStream(String filename) { try { return new FileInputStream(new File(filename)); } catch (FileNotFoundException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "openFileInputStream()", "", ex); return null; } } /** * Opens a file output stream * * @return Returns Opened file output stream */ public final FileOutputStream openFileOutputStream() { try { return new FileOutputStream(f); } catch (FileNotFoundException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "openFileOutputStream()", "", ex); return null; } } /** * Opens a buffered file for write * */ public final void openBufferedWrite() { try { bw = new BufferedWriter(new FileWriter(f)); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "openBufferedWrite()", "", ex); } } public final void flushWriter() { try { bw.flush(); } catch (IOException ex) { } } /** * Write to a previously opened output file * * @param data The data to be written * @param newlines The number of newlines to generate */ public final void writeFile(String data, int newlines) { try { bw.write(data); while (newlines > 0) { bw.newLine(); newlines--; } } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "writeToFile(" + data + "," + String.valueOf(newlines) + ")", "", ex); } } /** * Write to a previously opened output file * * @param data The character data to be written * @param nochars */ public final void writeFile(char[] data, int nochars) { try { bw.write(data, 0, nochars); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "writeToFile()", "", ex); } } /** * Copy file to * * @param frompath * @param topath */ public final static void copyFromTo(String frompath, String topath) { try { Path source = new File(frompath).toPath(); Path dest = new File(topath).toPath(); Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, "SimpleFile", "copyFromTo()", "", ex); } } public final static void mergeFiles(String srcpath1, String srcpath2, String destpath) { try (OutputStream os = new FileOutputStream(new File(destpath))) { Path source = new File(srcpath1).toPath(); Files.copy(source, os); source = new File(srcpath2).toPath(); Files.copy(source, os); os.close(); } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, "SimpleFile", "mergeFiles", "", ex); } } /** * Get the age of a specified file * * @param filepath * @param period * @return Age of file as float */ public final static float getAgeOfFile(String filepath, int period) { File fx = new File(filepath); if (!fx.exists()) { return -1; } float fltAge = System.currentTimeMillis() - fx.lastModified(); switch (period) { case PERIOD_MINUTES: return fltAge / 60000; case PERIOD_HOURS: return fltAge / (60000 * 60); case PERIOD_DAYS: return fltAge / (60000 * 60 * 24); } return -1; } /** * Test to see our file is older in minutes, returns true if it is * * @param filename * @param minutes * @return boolean */ public final static boolean isMinutesOlder(String filename, long minutes) { long lngAge = System.currentTimeMillis() - new File(filename).lastModified(); return lngAge > (60000 * minutes); } /** * Test to see our file is older in hours, returns true if it is * * @param filename * @param hours * @return boolean */ public final static boolean isHoursOlder(String filename, long hours) { long lngAge = System.currentTimeMillis() - new File(filename).lastModified(); return lngAge > (60000 * 60 * hours); } /** * Test to see our file is older in days, returns true if it is * * @param filename * @param days * @return boolean */ public final static boolean isDaysOlder(String filename, long days) { long lngAge = System.currentTimeMillis() - new File(filename).lastModified(); return lngAge > (60000 * 60 * 24 * days); } /** * Opens a zipstream. returns false if it fails * * @param level * @return an open zipstream */ public final boolean openZipStream(int level) { try { zos = new ZipOutputStream(new FileOutputStream(f.getAbsolutePath())); if (level < 0 || level > 9) { level = 6; } zos.setLevel(level); return true; } catch (FileNotFoundException ex) { } return false; } /** * Close a zip stream */ public final void closeZipStream() { if (zos != null) { try { zos.close(); } catch (IOException ex) { } } } public final static void compress(String source, String dest) { final Path pathSource = Paths.get(source); try { final ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(dest)); Files.walkFileTree(pathSource, new SimpleFileVisitor() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attributes) { try { Path targetFile = pathSource.relativize(file); outputStream.putNextEntry(new ZipEntry(targetFile.toString())); byte[] bytes = Files.readAllBytes(file); outputStream.write(bytes, 0, bytes.length); outputStream.closeEntry(); } catch (IOException e) { } return FileVisitResult.CONTINUE; } }); outputStream.close(); } catch (IOException e) { } } /** * Add files to a zip file * * @param srcfiles An array of Files * @return boolean True if successful */ public final boolean addFilesToZip(File... srcfiles) { FileInputStream in = null; if (srcfiles == null || srcfiles.length == 0) { return false; } try { for (File fx : srcfiles) { in = new FileInputStream(fx); // name the file inside the zip file zos.putNextEntry(new ZipEntry(fx.getName())); byte[] b = Files.readAllBytes(Paths.get(fx.getAbsolutePath())); zos.write(b, 0, b.length); in.close(); } return true; } catch (IOException ex) { } finally { try { if (in != null) { in.close(); } } catch (IOException ex) { } } return false; } /** * Extracts a zip file to a supplied location * * @param destpath Destination for contents of zip file * @return True if successful */ public final boolean extractZipTo(String destpath) { FileOutputStream fos; final int BUFFER = 2048; try { FileInputStream fis = new FileInputStream(f); try (ZipInputStream zin = new ZipInputStream(new BufferedInputStream(fis))) { ZipEntry entry; while ((entry = zin.getNextEntry()) != null) { int count; byte data[] = new byte[BUFFER]; try { fos = new FileOutputStream(destpath + File.separator + entry.getName()); } catch (FileNotFoundException ex) { continue; } try (BufferedOutputStream dest = new BufferedOutputStream(fos, 2048)) { while ((count = zin.read(data, 0, BUFFER)) != -1) { dest.write(data, 0, count); } dest.flush(); dest.close(); } fos.close(); } zin.close(); fis.close(); } return true; } catch (IOException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "extractZipTo()", "", ex); } return false; } public final static boolean objectWrite(String filepath, Object o) { ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new FileOutputStream(new File(filepath))); } catch (FileNotFoundException ex) { } catch (IOException ex) { } if (oos == null) { return false; } try { oos.writeObject(o); oos.close(); return true; } catch (IOException ex) { } return false; } public final static Object objectRead(String filepath, Object defObject) { ObjectInputStream oos = null; try { oos = new ObjectInputStream(new FileInputStream(new File(filepath))); } catch (FileNotFoundException ex) { } catch (IOException ex) { } if (oos == null) { return defObject; } Object result = defObject; try { result = oos.readObject(); } catch (IOException | ClassNotFoundException ex) { } return result; } } selektor-3.13.73/src/lib/InfoDialog.form0000644000175000017500000001542513302030722017274 0ustar bannorbannor
selektor-3.13.73/src/lib/AboutDialog.form0000644000175000017500000001540713302030722017453 0ustar bannorbannor
selektor-3.13.73/src/lib/SimpleProps.java0000644000175000017500000001675213302030722017520 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Alistair Neil */ public final class SimpleProps { private final File fileStore; private final String comment; private final ArrayList alChanged; private boolean boolDefaultEnabled; private final Properties defProps = new Properties(); private Properties appProps; /** * Constructor, requires * * @param filepath * @param comment */ public SimpleProps(String filepath, String comment) { alChanged = new ArrayList<>(); fileStore = new File(filepath); this.comment = comment; } /** * Enable/disable default mode * * @param enabled */ public void setDefaultModeEnabled(boolean enabled) { boolDefaultEnabled = enabled; } /** * Set a long number property * * @param property * @param num */ public void setLong(String property, long num) { String value = String.valueOf(num); setString(property, value); } /** * Get a long number property * * @param property * @return A long number */ public long getLong(String property) { try { if (boolDefaultEnabled) { return Long.parseLong(defProps.getProperty(property)); } else { return Long.parseLong(appProps.getProperty(property)); } } catch (NumberFormatException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "getLong", "", ex); return -1; } } /** * Set a integer number property * * @param property * @param num */ public void setInt(String property, int num) { String value = String.valueOf(num); setString(property, value); } /** * Get an integer number property * * @param property * @return an integer */ public int getInt(String property) { try { if (boolDefaultEnabled) { return Integer.parseInt(defProps.getProperty(property)); } else { return Integer.parseInt(appProps.getProperty(property)); } } catch (NumberFormatException ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "getInt", "", ex); return -1; } } /** * Set a boolean property * * @param property * @param enabled */ public void setBool(String property, boolean enabled) { if (enabled) { setString(property, "true"); } else { setString(property, "false"); } } /** * Get a boolean property * * @param property * @return boolean */ public boolean getBool(String property) { try { String result; if (boolDefaultEnabled) { result = defProps.getProperty(property).toLowerCase(); } else { result = appProps.getProperty(property).toLowerCase(); } return result.contentEquals("true"); } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "getBool", "", ex); return false; } } /** * Set a String property * * @param key * @param value * @return String */ public Object setString(String key, String value) { value = value.trim(); if (boolDefaultEnabled) { return defProps.setProperty(key, value); } String prop = appProps.getProperty(key); if (prop == null) { prop = "null"; } if (prop.contentEquals(value)) { if (alChanged.contains(key)) { alChanged.remove(key); } } else { if (!alChanged.contains(key)) { alChanged.add(key); } } return appProps.setProperty(key, value); } /** * Get a String property * * @param key * @return String or null */ public String getString(String key) { try { String prop; if (boolDefaultEnabled) { prop = defProps.getProperty(key); } else { prop = appProps.getProperty(key); } if (prop == null) { prop = ""; } return prop; } catch (Exception ex) { Logger.getGlobal().logp(Level.WARNING, this.getClass().getName(), "getString", "", ex); return null; } } /** * Save to xml file */ public void save() { alChanged.clear(); OutputStream os = null; try { os = new FileOutputStream(fileStore); appProps.storeToXML(os, comment); } catch (Exception ex) { Logger.getLogger(SimpleProps.class.getName()).log(Level.SEVERE, null, ex); } finally { try { if (os != null) { os.close(); } } catch (Exception ex) { } } } /** * Load from xml file */ public void load() { InputStream is = null; try { if (!fileStore.exists()) { fileStore.getParentFile().mkdirs(); fileStore.createNewFile(); save(); } is = new FileInputStream(fileStore); appProps.loadFromXML(is); } catch (IOException ex) { Logger.getLogger(SimpleProps.class.getName()).log(Level.SEVERE, null, ex); } finally { try { if (is != null) { is.close(); } } catch (Exception ex) { } } alChanged.clear(); } /** * Delete the properties file store * * @return true if successful */ public boolean delete() { if (fileStore.exists()) { return fileStore.delete(); } return false; } /** * Get a comma separated list of properties that were changed * * @return A String of property keys that were changed */ public String getChangedProperties() { return alChanged.toString(); } /** * Reset to defaults */ public void resetToDefaults() { appProps = new Properties(defProps); alChanged.clear(); } } selektor-3.13.73/src/lib/TrayPopupMenu.java0000644000175000017500000000331413302030722020021 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.Color; import java.awt.Graphics; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.UIManager; /** * * @author Alistair Neil */ public class TrayPopupMenu extends JPopupMenu { private Color bg; public TrayPopupMenu() { super(); bg = super.getBackground(); } @Override public JMenuItem add(JMenuItem mi) { mi.setForeground(new Color(UIManager.getColor("MenuItem.foreground").getRGB())); super.add(mi); return mi; } @Override public void setForeground(Color fg) { super.setForeground(fg); } @Override public void setBackground(Color bg) { super.setBackground(bg); this.bg = bg; } @Override public void paintComponent(final Graphics g) { g.setColor(new Color(bg.getRGB())); g.fillRect(0, 0, getWidth(), getHeight()); } } selektor-3.13.73/src/lib/DesktopNotify.java0000644000175000017500000000612013302030722020031 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.util.logging.Level; import java.util.logging.Logger; /** * This class handles desktop notifications * * @author Alistair Neil */ public class DesktopNotify { private final String iconpath; private String notifytitle; private String notifybody; private String notifysendpath; private final SwingTrayIcon sti; private boolean enabled; private boolean supported = true; public DesktopNotify(SwingTrayIcon sti, String iconpath) { this.sti = sti; this.iconpath = iconpath; if (OSFunction.isLinux()) { this.notifysendpath = OSFunction.findFile("notify-send", "/usr/bin/"); if (this.notifysendpath == null) { Logger.getGlobal().log(Level.WARNING, "notify-send not found."); this.supported = false; } } } /** * Is notifications supported * * @return true if supported */ public boolean isSupported() { return supported; } /** * Are notifications enabled * * @return true if enabled */ public boolean isEnabled() { return enabled; } /** * Disable/Enable notifications * * @param enabled */ public void setEnabled(boolean enabled) { this.enabled = enabled; } /** * Set desktop notification title * * @param text */ public void setNotificationTitle(String text) { notifytitle = text; } /** * Set desktop notification body * * @param text */ public void setNotificationBody(String text) { notifybody = text; } /** * Raise a notification * */ public void raiseNotification() { if (notifybody == null || notifytitle == null || !enabled) { return; } if (OSFunction.isWindows()) { if (sti != null) { sti.displayMessage(notifytitle, notifybody); } } else { if (notifysendpath != null) { OSFunction.launchProcess("notify-send", "-u", "normal", "-i", iconpath, notifytitle, notifybody); } } notifybody = null; } public String getNotifySendPath() { return notifysendpath; } } selektor-3.13.73/src/lib/Localisation.java0000644000175000017500000000602713302030722017656 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package lib; import java.util.Locale; import java.util.ResourceBundle; /** * * @author Alistair Neil, */ public final class Localisation { // Private Stuff private final ResourceBundle resourceBundle; private String encoding = null; public Localisation(String resource) { String strSupportedLangs = "fr,en,pt"; encoding = this.getString("encoding"); if (!strSupportedLangs.contains(getLocale().getLanguage())) { Locale.setDefault(new Locale("en", "GB")); resourceBundle = ResourceBundle.getBundle(resource, Locale.getDefault()); } else { resourceBundle = ResourceBundle.getBundle(resource); } } /** * Get the locale * * @return The locale */ public Locale getLocale() { return Locale.getDefault(); } public String toWebLanguageTag() { return getLocale().toLanguageTag().replace('-', '_'); } /** * Get the country name for supplied iso2 code * * @param iso2 * @return Localised country name */ public String getDisplayCountry(String iso2) { switch (iso2) { case "A1": case "A2": case "O1": case "U1": return getString("iso" + iso2); default: Locale obj = new Locale("", iso2); return obj.getDisplayCountry(); } } /** * Get localised string using given key * * @param key * @return localised string */ public String getString(String key) { try { if (!encoding.contentEquals("encoding")) { byte[] text = resourceBundle.getString(key).getBytes("ISO8859-1"); return new String(text, encoding); } else { return resourceBundle.getString(key); } } catch (Exception ex) { } return key; } /** * Get an array of localised strings using a key array or multiple keys * * @param keys * @return localised string array */ public String[] getStrings(String... keys) { String[] result = new String[keys.length]; int i = 0; for (String key : keys) { result[i++] = getString(key); } return result; } } selektor-3.13.73/src/lib/InfoDialog.java0000644000175000017500000004165613302030722017257 0ustar bannorbannor/* * Copyright (C) 2009-2017 Alistair Neil * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package lib; import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Frame; import java.awt.event.ActionEvent; import javax.swing.JProgressBar; import javax.swing.JTextArea; import javax.swing.Timer; import javax.swing.WindowConstants; /** * * @author Alistair Neil, */ public class InfoDialog extends javax.swing.JDialog { public static final int CANCEL_BUTTON = 0; public static final int CANCEL_WINDOW = 1; public static final int OK = 2; private Color fg = null; private final Frame parent; private String strButtClose; private String strTitle = ""; private final Font fontDefault; private Timer tmrAutoClose; private Timer tmrButtonLock; /** * Creates new InfoDialog, for parent frame with modality modal * * @param parent */ public InfoDialog(Frame parent) { super(parent, true); this.parent = parent; initComponents(); jCheckBoxOption.setVisible(false); jProgressBar.setVisible(false); fg = jTextInfo.getForeground(); fontDefault = jTextInfo.getFont(); setContinueButtonText("Continue"); setCancelButtonText("Cancel"); setCloseButtonText("Close"); } @Override public final Font getFont() { return jPanelMain.getFont(); } /** * Convenience methods * * @param title */ public final void createInfo(String title) { createInfo(title, null); } /** * * @param title * @param info */ public final void createInfo(String title, String info) { super.setTitle(strTitle + " " + title); setModal(true); setCancelVisible(false); setContinueButtonText(strButtClose); jProgressBar.setVisible(false); FontMetrics fm = getFontMetrics(getFont()); int width = fm.stringWidth(getTitle()); if (width > getWidth()) { setSize(width, getHeight()); } jTextInfo.setFont(fontDefault); jTextInfo.setForeground(fg); jTextInfo.setText(""); if (info != null) { jTextInfo.setText(info); } jTextInfo.setCaretPosition(0); setLocationRelativeTo(parent); } /** * Set dialog title * * @param title */ @Override public final void setTitle(String title) { strTitle = title; super.setTitle(strTitle); } /** * * @param title */ public final void createWarn(String title) { createWarn(title, null); } /** * Create warning dialog * * @param title * @param info */ public final void createWarn(String title, String info) { super.setTitle(strTitle + " " + title); setModal(true); setCancelVisible(true); jProgressBar.setVisible(false); FontMetrics fm = getFontMetrics(getFont()); int width = fm.stringWidth(getTitle()); if (width > getWidth()) { setSize(width, getHeight()); } jTextInfo.setFont(fontDefault); jTextInfo.setForeground(fg); jTextInfo.setText(""); if (info != null) { jTextInfo.setText(info); } setLocationRelativeTo(parent); jTextInfo.setCaretPosition(0); } /** * Create progress bar dialog * * @param title * @param info */ public final void createProgress(String title, String info) { super.setTitle(strTitle + " " + title); setModal(true); setCancelVisible(true); jProgressBar.setVisible(true); FontMetrics fm = getFontMetrics(getFont()); int width = fm.stringWidth(getTitle()); if (width > getWidth()) { setSize(width, getHeight()); } jTextInfo.setFont(fontDefault); jTextInfo.setForeground(fg); jTextInfo.setText(""); if (info != null) { jTextInfo.setText(info); } setLocationRelativeTo(parent); jTextInfo.setCaretPosition(0); } /** * Overridable handle for a progress based task * * @param status * @param jpb */ public void progressTask(int status, JProgressBar jpb) { } /** * Create error dialog * * @param title */ public final void createError(String title) { createError(title, null); } /** * Create error dialog * * @param title * @param info */ public final void createError(String title, String info) { super.setTitle(strTitle + " " + title); setModal(true); setCancelVisible(false); setContinueButtonText(strButtClose); jProgressBar.setVisible(false); FontMetrics fm = getFontMetrics(getFont()); int width = fm.stringWidth(getTitle()); if (width > getWidth()) { setSize(width, getHeight()); } jTextInfo.setFont(fontDefault); jTextInfo.setForeground(fg); jTextInfo.setText(""); if (info != null) { jTextInfo.setText(info); } setLocationRelativeTo(parent); jTextInfo.setCaretPosition(0); } public final void setTimeLock(final int secs) { jButtonCancel.setEnabled(false); jButtonContinue.setEnabled(false); this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); final String buttontext = jButtonCancel.getText(); tmrButtonLock = new Timer(1000, new java.awt.event.ActionListener() { int localsecs = secs; @Override public void actionPerformed(ActionEvent e) { localsecs--; if (localsecs == 0) { tmrButtonLock.stop(); jButtonCancel.setText(buttontext); jButtonCancel.setEnabled(true); jButtonContinue.setEnabled(true); } else { jButtonCancel.setText(buttontext + " (" + localsecs + ")"); } } }); jButtonCancel.setText(buttontext + " (" + secs + ")"); tmrButtonLock.start(); } public final void setCloseButtonText(String text) { strButtClose = text; } public final void setCancelButtonText(String text) { jButtonCancel.setText(text); } public final void setContinueButtonText(String text) { jButtonContinue.setText(text); } public final void setCheckBoxText(String text) { jCheckBoxOption.setText(text); } /** * Enable/Disable Autoscrolling * * @param enabled */ public final void setAutoScrollEnabled(boolean enabled) { jTextInfo.setAutoscrolls(enabled); } /** * Append text to the information area, Scrolling should be enabled * * @param text */ public final void appendInfoText(String text) { jTextInfo.append(text); jTextInfo.setCaretPosition(jTextInfo.getText().length()); } /** * Set whether the forms checkbox is enabled * * @param enabled */ public final void setCheckBoxVisible(boolean enabled) { jCheckBoxOption.setVisible(enabled); } /** * Set check box selection status * * @param checked */ public final void setCheckBoxEnabled(boolean checked) { jCheckBoxOption.setSelected(checked); } /** * Test to see if checkbox is selected * * @return boolean True if selected */ public final boolean isCheckBoxSelected() { return jCheckBoxOption.isSelected(); } /** * Set info font * * @param font * @param sizeoffset */ public final void setFont(String font, int sizeoffset) { jTextInfo.setFont(new Font(font, jTextInfo.getFont().getStyle(), jTextInfo.getFont().getSize() + sizeoffset)); } /** * Set the form auto close period in milliseconds * * @param millis */ public final void setAutoClose(int millis) { tmrAutoClose = new Timer(millis, new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { tmrAutoClose.stop(); doClose(CANCEL_WINDOW); } }); tmrAutoClose.start(); } public final JTextArea getTextArea() { return jTextInfo; } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public final int getReturnStatus() { return returnStatus; } /** * Set dialog message body * * @param text */ public final void setInfoText(String text) { jTextInfo.setText(text); } /** * Set dialog message body, and font colour * * @param text * @param fgcolor */ public final void setInfoText(String text, Color fgcolor) { jTextInfo.setForeground(fgcolor); jTextInfo.setText(text); } /** * Set whether Cancel button is enabled * * @param enabled */ public final void setCancelEnabled(boolean enabled) { jButtonCancel.setEnabled(enabled); } /** * Set whether Cancel button is visible * * @param visible */ public final void setCancelVisible(boolean visible) { jButtonCancel.setVisible(visible); } /** * Set whether Ok button is enabled * * @param enabled */ public final void setAckEnabled(boolean enabled) { jButtonContinue.setEnabled(enabled); } /** * Set whether OK button is visible * * @param visible */ public final void setAckVisible(boolean visible) { jButtonContinue.setVisible(visible); } public void setVisibleWithFocus(boolean visible) { super.setVisible(visible); this.requestFocus(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jPanelMain = new javax.swing.JPanel(); jButtonCancel = new javax.swing.JButton(); jCheckBoxOption = new javax.swing.JCheckBox(); jButtonContinue = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jTextInfo = new javax.swing.JTextArea(); jProgressBar = new javax.swing.JProgressBar(); setMinimumSize(new java.awt.Dimension(410, 165)); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jPanelMain.setFont(jPanelMain.getFont().deriveFont(jPanelMain.getFont().getStyle() | java.awt.Font.BOLD, jPanelMain.getFont().getSize()+2)); jPanelMain.setOpaque(false); jButtonCancel.setText("Cancel"); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancelActionPerformed(evt); } }); jCheckBoxOption.setText("Disable this notification."); jButtonContinue.setText("Continue"); jButtonContinue.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonContinueActionPerformed(evt); } }); jTextInfo.setEditable(false); jTextInfo.setColumns(20); jTextInfo.setLineWrap(true); jTextInfo.setRows(5); jTextInfo.setWrapStyleWord(true); jScrollPane2.setViewportView(jTextInfo); jProgressBar.setString(""); jProgressBar.setStringPainted(true); javax.swing.GroupLayout jPanelMainLayout = new javax.swing.GroupLayout(jPanelMain); jPanelMain.setLayout(jPanelMainLayout); jPanelMainLayout.setHorizontalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addComponent(jCheckBoxOption) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE) .addComponent(jButtonCancel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonContinue)) .addComponent(jScrollPane2) .addComponent(jProgressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jPanelMainLayout.setVerticalGroup( jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMainLayout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckBoxOption) .addComponent(jButtonContinue) .addComponent(jButtonCancel))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanelMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanelMain, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// //GEN-END:initComponents private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed doClose(CANCEL_BUTTON); }//GEN-LAST:event_jButtonCancelActionPerformed /** * Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog if (tmrButtonLock == null || !tmrButtonLock.isRunning()) { doClose(CANCEL_WINDOW); } }//GEN-LAST:event_closeDialog private void jButtonContinueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonContinueActionPerformed doClose(OK); }//GEN-LAST:event_jButtonContinueActionPerformed private void doClose(int retStatus) { if (jProgressBar.isVisible()) { progressTask(retStatus, jProgressBar); return; } if (tmrAutoClose != null) { tmrAutoClose.stop(); tmrAutoClose = null; } if (tmrButtonLock != null) { tmrButtonLock.stop(); tmrButtonLock = null; } returnStatus = retStatus; setVisible(false); dispose(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonCancel; private javax.swing.JButton jButtonContinue; private javax.swing.JCheckBox jCheckBoxOption; private javax.swing.JPanel jPanelMain; private javax.swing.JProgressBar jProgressBar; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTextArea jTextInfo; // End of variables declaration//GEN-END:variables private int returnStatus = CANCEL_BUTTON; } selektor-3.13.73/src/lib/TextResourceDialog.form0000644000175000017500000001076113302030722021033 0ustar bannorbannor
selektor-3.13.73/README0000644000175000017500000000045013302030722013707 0ustar bannorbannorRunning the script build-jar will compile the java source files and generate the runtime SelekTOR.jar file. The following dependencies are required to be met in order for the compile to complete successfully. openjdk-7-jdk. proguard 4.8 or better. Regards Alistair Neil (info@dazzleships.net) selektor-3.13.73/build-jar0000755000175000017500000000054613302030722014634 0ustar bannorbannor#!/bin/sh #Create our build folder mkdir build #Java compilation javac -nowarn -d build -sourcepath src src/SelekTOR.java # Build runtime jar jar -cfe build/SelekTOR.jar SelekTOR -C build . -C src resources #Do proguard code optimisation proguard -forceprocessing -include SelekTOR.pro -injars build/SelekTOR.jar -outjars SelekTOR.jar # Cleanup rm build -rf selektor-3.13.73/packaging/0000755000175000017500000000000013302030722014754 5ustar bannorbannorselektor-3.13.73/packaging/DEBIAN/0000755000175000017500000000000013302030722015676 5ustar bannorbannorselektor-3.13.73/packaging/DEBIAN/postrm0000755000175000017500000000041013302030722017143 0ustar bannorbannor#!/bin/sh -e # Remove autostart set -e rm /etc/xdg/autostart/selektor-autostart.desktop -f # Automatically added by dh_icons if which update-icon-caches >/dev/null 2>&1 ; then update-icon-caches /usr/share/icons/selektor.png fi # End automatically added section selektor-3.13.73/packaging/DEBIAN/control0000644000175000017500000000116113302030722017300 0ustar bannorbannorSource: selektor Section: web Priority: optional Version: 3.13.73 Installed-Size: 416 Maintainer: Alistair Neil Homepage: http://www.dazzleships.net Package: selektor Architecture: all Depends: default-jre, libnotify-bin, libglib2.0-bin, tor, tor-geoipdb Description: Tor exit node selector and traffic router SelekTOR is a GUI frontend for the network Tor client. Used for security and anonymization purposes or to bypass some firewall. Simplifies the process of selecting Tor exit nodes and manages selective URL pattern based on routing via system proxying. selektor-3.13.73/packaging/DEBIAN/postinst0000755000175000017500000000043613302030722017512 0ustar bannorbannor#!/bin/sh -e # Move autostart set -e mv /usr/share/applications/selektor-autostart.desktop /etc/xdg/autostart -f # Automatically added by dh_icons if which update-icon-caches >/dev/null 2>&1 ; then update-icon-caches /usr/share/icons/selektor.png fi # End automatically added section selektor-3.13.73/packaging/applications/0000755000175000017500000000000013302030722017442 5ustar bannorbannorselektor-3.13.73/packaging/applications/selektor-proxy-reset.desktop0000644000175000017500000000065013302030722025165 0ustar bannorbannor[Desktop Entry] Version=1.0 Categories=Network;Application; Name=SelekTOR Proxy Reset Name[fr]=Réinit. du mandataire SelekTOR GenericName=SelekTOR Proxy Reset GenericName[fr]=Réinit. du mandataire SelekTOR Comment=SelekTOR System Proxy Reset Comment[fr]=Réinitialisation du mandataire SelekTOR Exec=/usr/bin/selektor --default-proxy Icon=/usr/share/icons/selektor.png Terminal=false Type=Application Keywords=network;tor selektor-3.13.73/packaging/applications/selektor.desktop0000644000175000017500000000034613302030722022670 0ustar bannorbannor[Desktop Entry] Version=1.0 Categories=Network;Application; Name=SelekTOR Comment=Tor Exit Node Selection and Proxying Exec=/usr/bin/selektor Icon=/usr/share/icons/selektor.png Terminal=false Type=Application Keywords=network;tor selektor-3.13.73/packaging/applications/selektor-autostart.desktop0000644000175000017500000000041413302030722024710 0ustar bannorbannor[Desktop Entry] Version=1.0 Categories=Application; Name=SelekTOR Comment=Tor Exit Node Selection and Proxying Exec=/usr/bin/selektor --cleanup --start-delay 5 Icon=/usr/share/icons/selektor.png StartupNotify=false Terminal=false Type=Application Keywords=network;tor selektor-3.13.73/packaging/icons/0000755000175000017500000000000013302030722016067 5ustar bannorbannorselektor-3.13.73/packaging/icons/selektor.png0000644000175000017500000001557413302030722020441 0ustar bannorbannorPNG  IHDR>abKGD pHYs  tIME.tEXtCommentCreated with GIMPWIDATxiy~g8 9$ESV(˒zAT9ݸU\'Hq@ @)/m~ m\]8T,%ۤ(JER$5 9]~we,\?1w{yγ#F1bĈ#F1bĈ#F9D3O~Jҫ(^ JdkOoY\f_.BB ~_^c4d<[Ew(BW$rNT"*FI1n/8C#{( IpCI"?w<nTz()c!HȈȭ"* -N%/1n(l&VZ|w6b FL1b܁0%I]{QvmqX>"DRW5&MA9PNg,Pև1n)HF=$Νd DX{l,gC)7ț>~[?ˆb/IjjM1nyTbG"/y-:A(u61stG DH" MiŎT+D@2OӧTڊ,7WJ`)dhIv%ew3^>ˡa]6&>rktb1Hhw_B'y$Ld2- 5diMIKt΢=]YjvaL)%Q9AP\N!15Eo&PyEL^} GX0CĚ &uB$Dp{M{_N"1?իR@c eKDL[%#ܝY/S_ÏJtB9vt~y{,Gj-:J af*!LBaiI6m_fSvΓPl0IBjleN42MW hmpjy@CYR::%T; ~Aߓ^ٔxcdLuIG_bFC'9oREKBJb6:##Ng$LΜԹ蚾L*ҕ1XD Z, L~(bD*In2G2-gWdrvAB2#g^/o gM2J0eڜ m!['ew;Q=_dK^$J%ƥVkTkeWisF=k C=dY<.RJ)tK.GJ2=5MTD+6NdLGZ (]-!y5\?uA{G+ضkKBRpǫr6X&#"bC -ߗ'E|UՏRC)eˮRi:m Z!y3s̗ d[K_ vF q|~._-xxj-0q}]*ֹTUR'řXlj}mxf2$d((N]|nRb*H ɟ1Axp˓l蹲}?`n< se%Z%5ɛ'~;?L cQ bSr=BI^[]L/DVom։"ى86~y,0 t$oSk5S 9= ־mOij(!4Cd "HuFoQϢnm{>zw[W~Z퓯d{SB]LVAttͤ~zX |ںZo*[F#]J2l E+Iwf^i*ƝIޙ|6R8fpvaNC&( ֊di>{߿!B0&j*ܛ ^DP/YD!чq(> 2-oc.-CbRrR*OOٷp3Zo ٶv ;R t2/ ߃W}BW|Y 'qHwm/3&UQB`Jot Vyd<#%/?:_q ^73Ghg[/>/]cV$f,%CL&C.lF$#**b,N353Iw~3wg@4zsZz4!}t]s}qHfO0a>PP< wy_<ޟ3H[g[y$[,\3`u[@EWN51k%]ImMª7nhA.a9(3L2}+-.0 UO±ɉSf043o09tV$@ ,!| q4AP8M`"5 8+ 'ia;V#|ffxw/gW= 7O>gI[76lҺIN*LTK3Q~W# ֳ!JacYYNqz8N 8WDX7ݚXzc__ hL 2gHTWZtA-!W)SCD0~8poƙgHX+pI:8clEظv?ZMBO|h̊[" hSk#io$G&~|-u{ 54>Q6kRphsd[,MP]NЀPB-ؖR(%\HBhhby ,0;ly#@ c(dmB D5b"k|l+9vU;"`zÿJflLӛXv WYB(j3bKE17aۦ{QKşA뻼BhMϑ%rR8AgJK~Tϑ$9ռNZPD&GTE˓6 fNQo 3-1D!ՇmlhFOfg)zUEU;=u%žm#1, %75F0IS4rWm=c[~Z -i&So*$cwػsd iL[uG$#%sTX:e qQPHҝc= l@-*~ o [eϑoO$%/&z"4Hxc4R_|KbSO[^)9ޙPshFTk50k`"Y>#i\ֳ L゛u+|ПxֵwOvaHZ5نEd?%Ji-ܚ߽K֢뺰f\ 7(֯r$SW(S?d:1Vfd՛szL4I8Uϴ\5e Ner!RI4L"铴mtxͦH9oGtv_SaXAdi3&UbNDlMOrR`c-2$8V(Ui! #pǃt,zp]j[ ם!mӸlM0ٖdA|>iЄF<44{Ǟ"ג²+&;NCWO)i/NbuHw XŃ `MsؘJ1V8Aס!|?x/d3,ѽJ0G)8OZ]gvWx)op%N- qgE}!(2ipR@ >_2ԳN%ޕ"GQϱ@7sq@b5M>bVz@x)N_RR-vۤrٜ'ƻg_/Wػ m]}?RxPӭb liy9eT/?T0 e"TjTVK;6 !]Qw?Gw \{)%~M99iuvBTDovC85ץVsotN37d?.v#"ylmCXIPˎ)UrF #~W6[ե&"c= g9$mt^Z6<>U6B*m73+Ym3SMV<;LU-҅E"<z7tΤVukqK+"@M;MS|z_3i3l4`RFG2={f7b@S_"i0<\>۔/m6uOkjyAL?_h"H4J[s|9Kmf^X+7oбa8}kR\_d!|B!O_ -˯WTk}%>c&G "DeA_`n~NOgߚQ${ZKE:cܳn<Ȇ{HLTSyٟP򦉔bO$Mco \p"#0QF ҠIϋGR f OypIFwNw.eH>:E{6&FlD-^鿦bUH Ͼ@>E;1R|?1WVI):2zA`ƏqzMx)bQwFAB Hy6屏ܒ]e~~)ea (LL"$vb։[ւ5_ ,^?} GYkS@)EXۺ)pE\Z7ѳR#0 NPT> o9I+Oںh7NQɴT*D IJ3E.ZVj묻xq8sC_JBiS '?ިh5NfɩӜ>BMQjw8pQ|֖5󘝙gbb_@@F1#F1bĈ#F1bĈ#F1 \ >\]IENDB`selektor-3.13.73/packaging/doc/0000755000175000017500000000000013302030722015521 5ustar bannorbannorselektor-3.13.73/packaging/doc/help-en.html0000644000175000017500000002332513302030722017744 0ustar bannorbannor SelekTOR Help

SelekTOR Main Window Interface Options

Active Country
Select your desired exit country here. SelekTOR will retrieve the available exit nodes for this country if it has any.

Proxy Mode : Disabled
Proxying via SelekTOR/Tor is disabled, SelekTOR will no longer exert any control over the system proxy settings.
Manual configuration of your web browser proxy settings will be required.

Proxy Mode : Proxy all traffic
Enable this mode to proxy all traffic through the active tor proxy node.
Uses 3 hop circuits for best anonymity (Tor default)
Not suitable for streaming.

Proxy Mode : Proxy by pattern
Enable this mode to proxy selectively by URL pattern through the active tor proxy node.
Uses 2 hop circuits for best latency and sacrifices some anonymity.

Set Guard Nodes
Opens the guard node selection window.

Node Table Options (Right Click)

Node Details
Brings node details of the selected node in your default web browser, provided by Atlas.

Whois
Provides whois information of the selected node.

Begin Test Cycle
Starts a round of node testing.

Active Circuit Information

Nickname
The assigned nickname for the node

IP
The ip address of the node.

Country
The country in which the node is located.

BandWidth (MB/s)
This indicator shows the reported bandwidth of the active node.

Stable
Whether the node has enough uptime to be considered stable.

Latency (ms)
This indicator shows the latency to the test URL via the currently selected Tor exit node. The latency provides an indication of the response time of the node in milliseconds, where 1000ms = 1 second.

Streams
This indicator shows the number of active streams on the active node.

SelekTOR System Tray Interface Options (Right Click System Tray Icon)

Proxy Mode : Disabled
Proxying via SelekTOR/Tor is disabled, SelekTOR will no longer exert any control over the system proxy settings.
Manual configuration of your web browser proxy settings will be required.

Mode: Proxy All
Enable this mode to proxy all traffic through the active tor proxy node.
Not suitable for multimedia streaming.

Mode: Proxy by Pattern
Enable this mode to proxy selectively by URL pattern through the active tor proxy node.

Hide / Show GUI.
Change GUI visibility.

Quit SelekTOR.
Quit the application.

SelekTOR Basic Preferences Options

Hide To Tray on Startup
The GUI will be hidden on start up, can be made visible again by double clicking the SelekTOR icon in the system tray.

Autostart SelekTOR
SelekTOR will autostart at login.

Check for updates on startup.
Will check if any updates of SelekTOR are available from Dazzleships Dot Net.

Disable Tray Icon.
Disables system tray functionality.

Disable desktop notifications
Turn of all desktop notifications from SelekTOR.

Minimise at startup
Minimise SelekTOR to the taskbar on startup.

Minimise instead of exit on close
Instead of quitting SelekTOR minimise to the taskbar on clicking the main window close control icon.

Hide instead of minimise
Instead of minimising SelekTOR to the taskbar completely hide SelekTOR.

Secure delete Tor caches on exit
Securely wipes the Tor caches by renaming and overwriting with zero’s prior to deletion.

SelekTOR Advanced Preferences Options

Tor Listening Port
The main listening port on which the Tor client will listen for incoming connections, usually from whichever proxy server you are using. Port 9054 is the SelekTOR default.

Tor Bridge Address
If you need to bypass an ISP block then enter a valid TOR bridge address in here.
Use the button “Get Bridges” to find valid TOR bridge addresses.

Safe Socks
When enabled, Tor will reject application connections that use unsafe variants of the socks protocol — ones that only provide an IP address, meaning the application is doing a DNS resolve first. Specifically, these are socks4 and socks5 when not doing remote DNS.

Warn Unsafe
When enabled, Tor will warn whenever a request is received that only contains an IP address instead of a hostname. Allowing applications to do DNS resolves themselves is usually a bad idea and can leak your location to attackers.

Test Socks
When enabled, Tor will make a notice-level log entry for each connection to the Socks port indicating whether the request used a safe socks protocol or an unsafe one (see above entry on SafeSocks). This helps to determine whether an application using Tor is possibly leaking DNS requests.

Logging Level
Set the Tor client logging level, all output is to StdOut console to avoid disk writes.

Safe Logging
When enabled, Tor will scrub potentially sensitive strings from log messages (e.g. addresses) by replacing them with the string [scrubbed]. This way logs can still be useful, but they don’t leave behind personally identifying information about what sites a user might have visited.

Avoid Disk Writes
When enabled, Tor will try to write to disk less frequently than we would otherwise. This is useful when running on flash memory or other media that support only a limited number of writes.

Startup Arguments
This will pass any user specified startup arguments to the Tor client, see Tor Manual for a list of valid command line arguments.

Default HTTP Proxy
You can specify a downstream proxy server here, anything not routed through TOR will be sent to the proxy server. Leaving it blank will mean anything not routed through TOR will go directly to the net, this is the default.

TOR Client Monitor

Startup Arguments
This displays all the arguments that are passed at startup to the Tor client.

StdOut Monitor
This displays the output from the Tor clients Stdout logging stream in realtime.

SelekTOR Pattern Editing

Proxy Pattern Editor
The pattern editor allows you to modify, add, delete or disable URL patterns used to redirect specific URL’s via the Tor socks proxy. Only use this if you know what you are doing as any errors made here can cause proxying to fail completely.

Quick Add Pattern
Quick add pattern allows you to quickly add a new pattern for the currently active country. An example is given below:

Description: Newzbin
Pattern: *newzbin.com*

Import Patterns
Pattern files are stored in a ZIP file. This zip file can be directly imported into SelekTOR using this action.

Export Patterns
This allows you to export all your user created pattern files as a SelekTOR compatible zipped import file.

Additional Information

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.

selektor-3.13.73/packaging/doc/changelog0000644000175000017500000013500613302030722017400 0ustar bannorbannorselektor (3.13.73) stable; urgency=low * Removed Patreon support. - Improved responsiveness of menu selection and opening of dialogs, not a real problem on Linux but Win 10 was awful for some reason. - Fixed bug in patterns export if a pattern storage file exceeded 2k in size it would be corrupted inside zip file, likelyhood of happening though was incredibly slim due to the very small size of pattern files, I only noticed it when I reused the code in another app that had much larger files to compress. This is the final Linux release. -- Alistair Neil Fri,25 May 2018 11:45:00 -0400 selektor (3.13.72) stable; urgency=low * Removed WARN_UNSAFE option as it is about to be deprecated in the tor client and it is now considered to be unsafe to unset it. - Removed setListenAddress as it is also soon to be deprecated in the tor client, connection sockets are now hardcoded to localhost 127.0.0.1 - Modified the debian package control file based on some changes made by the debian downstream packager as he is way better at it than me :) -- Alistair Neil Thu,16 Feb 2017 18:47:00 -0400 selektor (3.13.71) stable; urgency=low * Removed auto selection mode, retained all functionality using just the favourites mode - Removed dbl clicking node selection and activate node functionality from exit table, all node activation handled by favourite selection - Changed No Proxy to Disabled, SelekTOR will no longer exert any control over the system proxy in this mode and it will be returned to its initial state prior to SelekTOR starting up, users will be required to manually configure their browser proxy settings in this mode. - Moved GEOIP update file outside of Cloudflare's influence to make its download more reliable, no more download fail due to captcha. - Moved the online version tracking file outside Cloudflare's influence to make update available checking more reliable no more version check fail due to captcha. - Updated copyright dates to reflect new year in all files - Updated language and help files - Added credits window, accessible from Help > Credits - The online help files are now deprecated, Help Contents now opens the locally supplied help files in the default browser, this again is to avoid Cloudflares influence - Made the UI slightly wider for 2 reasons, first to fit the Support button and second folks are creating some tor nodes with rather large names so I have increased the size of the node name fields to accommodate this. - Large number of gtk fixes for better themeing under gtk2 & 3 - Added in some key accelerators to menus - Fixes for KDE's own system proxying mechanism, this fixes Chrome and Chromium functionality under KDE - Disabled tray functionality on KDE5 as they went and broke legacy system tray support for no good reason. - Changed to xdg-open mechanism to handle opening of default docs on Linux as java inbuilt support is broken on KDE. - Remove link to ipleak.net as the site fails to load with the majority of exitnodes. - Fixed KDE5 Plasma desktop detection - Fixed active pac not updating on a pattern change. -- Alistair Neil Mon,6 Feb 2017 15:39:00 -0400 selektor (3.13.70) stable; urgency=low * Added function to access cached processes to OSFunction class. - Modified getVersion() function in TorProcess class to prevent possible startup issue. - Added some additional debug output at --debug-fine level to provide information on current running processes. -- Alistair Neil Sun,16 Oct 2016 14:11:00 -0400 selektor (3.13.69) stable; urgency=low * Fixed neverending launch indicator on various linux docks, when SelekTOR is configured for hide to tray. - Modified how Tor client version is obtained and separated it from the hash password generator code to workaround some Windows client issues. - Implemented a new internal tor hash password generator instead of making a process call to the tor client as its faster. - Fixed bug preventing SelekTOR startup on Fedora 24 due to Tor version detection issue. - Fixed license dialog showing blank contents on Fedora 24. -- Alistair Neil Thu, 7 July 2016 16:40:00 -0400 selektor (3.13.68) stable; urgency=low * Fixed always starting on login as reported in Debian bug tracking #826616 This was down to some changes I made to CLI parsing when I re-arranged the startup code back in 3.13.66 which affected how the --update-disable option was handled. - Also fixed 2 other CLI command issues related to the startup code changes. -- Alistair Neil Thu, 9 June 2016 00:04:00 -0400 selektor (3.13.67) stable; urgency=low * Fixed issue with favourites not always being applied correctly due to the test status of a node being unknown. - Cleaned up a bunch of unused declarations left over from the Utilities class after moving the code into GTKFixes class - Added multiple window close actions to dialogs to ensure correct closing action depending on if a dialog is closed using a button or from the titlebar. -- Alistair Neil Mon, 30 May 2016 16:43:00 -0400 selektor (3.13.66) stable; urgency=low * Fixed issue when Autoselect is disabled the last manually set exit node was being used regardless of country selected. - Slightly re-arranged startup code to simplify initialisation. - Fixed a possible proxy setting issue which didn't seem to cause any problem in normal usage certainly no one reported it, but I found one test case where it could feasibly be an issue, before doing a proxy restore I had a check to see if the proxy setting URL pointed to a local file and if it existed then i restored the settings otherwise I put the settings back to their system defaults forgetting that the URL could also point to an offsite http location so now I just restore the original settings regardless. -- Alistair Neil Fri, 27 May 2016 15:18:00 -0400 selektor (3.13.65) stable; urgency=low * Removed guard node checking as its no longer required as I ensure that a valid guard node is used at circuit creation time. - Changed initial tor process startup time to compensate for Tor 0.2.7.6 slightly slower initialisation, this seems to be strictly a Windows only issue at the moment but I have decided to play it safe and include the change for Linux as well. - Fixed expired non-existent node from causing exception after nodelist generation bringing SelekTOR to a halt. This was due to a node expiring or becoming unavailable between cache updates and have also ensured that if it has been manually selected and no longer exists then it lets Tor decide which node to select - Changing proxy mode no longer restarts testing cycle, this was a hangover from when 2 hop circuits were supported - Fixed some javadoc constructor descriptions - Fixed some variable naming convention errors - Moved all GTK relevant fixes into their own class, makes the Windows porting easier - Update GEOIP can now be cancelled - Some minor UI adjustments -- Alistair Neil Wed, 25 May 2016 14:41:00 -0400 selektor (3.13.64) stable; urgency=low * Fixed regression caused by the test cycle fix in the last release, my apologies for this screw up i'm getting to old for this. - Fixed an incorrectly named method in TorController, codewise it did not affect anything, im just OCD about these things. - Fixed Atlas Details buttons not being disabled at startup when their is no active nodes. -- Alistair Neil Fri, 6 May 2016 20:36:00 -0400 selektor (3.13.63) stable; urgency=low * Fixed rare occurrence of test cycle failing to complete. - Fixed openjdk7 package dependency issue and changed it to default-jre to cope with both jre7 and jre8 as the latest Ubuntu is now shipping with Java 8. - Fixed lintian timestamp warnings in debian install package. -- Alistair Neil Tue, 3 May 2016 12:22:00 -0400 selektor (3.13.62) stable; urgency=low * Changed the default of "Download via Tor" to enabled. As reported in Debian bug tracking #822830 -- Alistair Neil Thu, 28 Apr 2016 15:36:00 -0400 selektor (3.13.61) stable; urgency=low * Add a startup CLI option --update-disable which disables the update version check phone home at startup, and also removes the checkbox option from preferences. - Updated man file. -- Alistair Neil Mon, 4 Apr 2016 14:40:00 -0400 selektor (3.13.60) stable; urgency=low * Fix for unrecognized node (ie. not in cached descriptors) not having their type and stability correctly set, only really affected bridge nodes as they are not held in the descriptors file and did not affect the operation of SelekTOR other than incorrectly reporting the node as not stable. - Some tiny optimisations to nodelist generation, slightly better string handling and parsing. - Fixed error in last release changelog entry date which lintian complained about. - Fixed latency threshold not being reset prior to test cycle after a bridge change. -- Alistair Neil Sun, 13 Mar 2016 14:48:00 -0400 selektor (3.13.59) stable; urgency=low * Fix for issue of poor node selection at startup, if Tor chose a bad node it would not get corrected until after the SelekTOR finished its first test cycle. - On startup SelekTOR now randomly selects a node from a countries listed nodes and also takes any favourites into consideration - Fixed rare nullpointerexception on quitting due to SwingTrayIcon tooltip being updated after being destroyed on exit. - More improvements to application update check - Changed the initial startup countries to {PL} and {FI} as after a good deal of testing these countries provided the most reliable nodes and which do not block dazzleships.net to do the version check via. -- Alistair Neil Fri, 04 Mar 2016 18:01:00 -0400 selektor (3.13.58) stable; urgency=low * Small change in how the active circuit is determined due to a difference in circuit building behaviour between the tor 2.5 client and the 2.6.10 client. This change ensures the same results on either client. - Modified circuit testing routine to improve its speed of testing. - Removed some exitexcludes functionality from TorController class as it was no longer of use and had forgot to remove it on the last release. -- Alistair Neil Mon, 29 Feb 2016 19:37:00 -0400 selektor (3.13.57) stable; urgency=low * Many improvements to circuit activation and maintaining the chosen circuit to overcome as much as possible Tor's natural inclination to create new circuits in place of the chosen circuit. This is tricky to do especially when I do my best to stick to the Tor' clients default settings wherever possible, please note it is not completely foolproof as Tor makes it own decisions based on its network conditions and on the rare occasion when Tor does decide that reaching a given node with a given circuit is not possible and switches to another then the Active Circuit info will now accurately reflect that. - Re-wrote internet access detection as I was not happy with it's reliability again its tricky to do since I can't effectively ping an external website in the clear in order to prevent DNS leakage. - Moved some of Tor initial configuration settings out of the TorProcess class into the main SelekTOR class where they really should be in order to make the TorProcess class generic. - Two hop mode is now no longer possible to do reliably due to the difficulty in maintaining custom circuits so it has been removed. - Active circuit is now constantly in sync with the Tor client and updated every 5 seconds. - Manual node switching is now non-destructive and can be done without affecting existing streams/browser connections. Please node existing connections remain connected to the previous selected node, only new connections after the node change will use the new node. - Implemented support in TorController and TorProcess for 2 additional Tor events, for future use. - Removed selektor-tray.png icon, it is now part of an internal resource package. - Modified SwingTrayIcon to accept images from a resource package - Renamed selektor-app.png to selektor.png and updated all desktop links to this file - Presetting initial startup countries {CA},{NO},{NL},{DE} to improve the chances of retrieving application update information/version via Tor at startup these are overridden by the users selected country once SelekTOR has fully started, The country identifiers can also be seen in the Tor client monitor - Fixed bug in a thankfully unused method in the OSFunction class. - Updated help files. -- Alistair Neil Sun, 28 Feb 2016 15:41:00 -0400 selektor (3.13.56) stable; urgency=low * Moved over some external links to Dazzleships to their new SSL equivalents - Fixed a screwup on the external links that caused the Tor Manual page to go to the wrong URL - Fixed an issue in the patterns editor that was causing problems with the Windows version of the code. - Set up proper handling of index out of bound errors so that they never occur on the exitnode and guardnode tables instead of just lazily catching them with an exception. -- Alistair Neil Tue, 2 Feb 2016 21:07:00 -0400 selektor (3.13.55) stable; urgency=low * Fixed an issue where by the active exit would sometimes report the wrong information at startup due to being overwritten by the test cycle (my bad) Should of used a copy/clone of my active exit nodeitem, which im doing now. - Fixed an issue where the Tor client would try to change to a new circuit for a variety of reasons number one reason being an unreachable website, causing SelekTOR to be out of synch with the Tor client and thus again report the incorrect active node information. Since their is no way to prevent Tor from taking this action, SelekTOR will change it back to the correct circuit immediately. If this circuit is un-reachable on the next test cycle then it wont be used. - Changed when the version update check is done during the startup sequence for a little bit more reliability since it is done via the Tor network. - Disabled auto selection if their is only one good node available. - Some minor preparation work on external page links for my website switchover to SSL, will fully implement on the next release. -- Alistair Neil Mon, 1 Feb 2016 19:41:00 -0400 selektor (3.13.54) stable; urgency=low * Fixed typo in --help output. - New man page, thanks to Paulo Roberto Alves de Oliveira (aka kretcheu) for that and the txt2man generation scripting. - Updated copyright date for the new year in all source files and the About dialog. -- Alistair Neil Sun, 17 Jan 2016 12:55:00 -0400 selektor (3.13.53) stable; urgency=low * Fixed some minor compile issues that generated warnings, code now compiles cleanly. Normally the warnings could be safely ignored but I decided to get OCD on it. -- Alistair Neil Thu, 10 Dec 2015 08:55:00 -0400 selektor (3.13.52) stable; urgency=low * Fixed a localisation issue. - Added Portuguese (Brazil) language support, thank you kretcheu - Added some French language missing text. - Added option to download geoip update via Tor (Experimental) - Fixed issue whereby geoip check time was not updated if you opted to cancel, causing it to repeatedly ask to do the update everytime SelekTOR started up. - Changed Update GEOIP to only be available if their is an active exit node to accommodate the download via tor option. - Fixed rare occasion when Geoip update would cause nodelist generation failure which in turn meant SelekTOR would issue the nodelist failure dialog and then shutdown. -- Alistair Neil Wed, 09 Dec 2015 12:07:00 -0400 selektor (3.13.51) stable; urgency=low * Fixed small issue with when the next geoip check date is saved, so that the date of the next check is changed everytime the geoip is updated. - Renamed the packages to be more in line with Debian packaging guidelines. - Removed Encoding line from desktop entries and included Keywords line. - Simplified build-jar script in the source tarball. - Improved Debian control files. - Javadocs now included in source tarball. -- Alistair Neil Wed, 02 Dec 2015 16:37:00 -0400 selektor (3.13.50) stable; urgency=low * Modified how SelekTOR handles a failed circuit activation, it's a little more graceful. It now first re-requests the failed node and if it fails again it then requests the next best node (if there is one) and if that fails it then lets the tor client choose. This is a better fit now that we have the favourites mode. - Fixed an issue in the calcBestNodes not properly storing all the best nodes and dropping a node if it had the same latency as a previous node. - Fixed system tray popup menu issue on Cinnamon desktop if the panel is set to Intelligent hide mode, its a bit of a hack but should be fine for the majority of desktop configurations. Please note this is not actually a Cinnamon issue but stems from a long time Java on Linux issue and is related to why the tray icon does not properly resize with the tray panel. - Changes made to versioning to be compatible with Debian naming rules - Removed my own geoip files to comply with Debian packaging, it now uses the tor-geoipdb shipped with the distro - Added dependency check to ensure tor-geoipdb is installed - Remote http file retrieval can now handle binary files. - Added sha1 checksum verification routine - Added ability to download up to date geolocation data files. -- Alistair Neil Fri, 27 Nov 2015 18:42:00 -0400 selektor (3.13.49) stable; urgency=low * Fixed issue with http page retrieval which is used for retrieving the latest application version. - Fixed issue with application of favourites. -- Alistair Neil Thu, 29 Oct 2015 10:35:00 -0400 selektor (3.13.48) stable; urgency=low * Fixed index out of bounds error when it tried to autoselect best node prior to first testing cycle. - Modified ClientProcess to be slightly less cpu hungry when starting the Tor client -- Alistair Neil Thu, 22 Oct 2015 16:08:00 -0400 selektor (3.13.47) stable; urgency=low * Fixed regression causing false "No circuits available" indications during testing cycle. - Fixed divide by zero error in best nodes calculation - Increased circuit build timeout to 20 secs. - Improved circuit activation and testing. - Added "All routers down" status indication for tested nodes - Removed some old no longer used stuff from pacfactory class, related to the old default patterns. - Updated geoip -- Alistair Neil Fri, 16 Oct 2015 14:01:00 -0400 selektor (3.13.46) stable; urgency=low * Changes to favourites in Favourites mode will be re-applied after 5 seconds - Fixes and improvements to auto-node selection - Optimised for Tor 2.6.10 but backward compatible to 2.4.x - Various UI adjustments -- Alistair Neil Mon, 12 Oct 2015 15:09:00 -0400 selektor (3.13.45) stable; urgency=low * Implemented a favourites mode - Removed manual node blacklisting as something similar can be implemented using the new favourites system. - Enhanced Tor process monitoring during startup phase - Updated GEOIP - Updated French language files for new favourites feature - Updated Help files. -- Alistair Neil Thu, 8 Oct 2015 19:27:00 -0400 selektor (3.13.44.2) beta; urgency=low * Implemented a favourites mode (instead of a bandwidth mode) - Removed manual node blacklisting as something similar can be implemented using the new favourites system. - Enhanced Tor process monitoring during startup phase - Updated GEOIP -- Alistair Neil Fri, 25 Sep 2015 15:46:00 -0400 selektor (3.13.44.1) beta; urgency=low * Preparation work for implementing auto node select based on bandwidth -- Alistair Neil Mon, 21 Sep 2015 16:27:00 -0400 selektor (3.13.44) stable; urgency=low * Modified initial timeout on Tor client start. - Improved startup which should work better on low speed connections tested down to 256 kbps connections. - Modified handling of No Circuits Available during testing - Modified clientprocess loop monitoring - Minor UI changes to improve efficency of GTK UI element resizing. - Changed wait period for bridge node acquisition to 20 secs - Updated GEOIP -- Alistair Neil Sat, 19 Sep 2015 10:02:00 -0400 selektor (3.13.43.2) beta; urgency=low * Improved startup which should work better on low speed connections tested down to 256 kbps connections. - Reverted internet access detection code to that used in 43 - Modified handling of No Circuits Available during testing -- Alistair Neil Fri, 18 Sep 2015 14:43:00 -0400 selektor (3.13.43.1) beta; urgency=low * Slightly increased time alloted to wait for bridges to be generated. - Minor UI changes to improve efficency of GTK UI element resizing. - Trying out modified internet access detection yet again. -- Alistair Neil Fri, 18 Sep 2015 12:18:00 -0400 selektor (3.13.43) stable; urgency=low * Removed firefox/mozilla warning, now mostly redundant. - Removed code to force setting of Socks remote dns on mozilla browsers as remote dns is the default for Socks5 now. - Reverted internet access check to the version used in 3.13.38 - Changed traffic/read timeout period to 2 minutes - Fixed proxy errors due to tor connections being accidentally closed by SelekTOR under high latency and heavy loads. - Added new CLI option --clear-cache which clears Tor cache on startup - Fixed intermittent tor startup issue -- Alistair Neil Tue, 15 Sep 2015 15:07:00 -0400 selektor (3.13.42.2) beta; urgency=low * Removed firefox/mozilla warning, now mostly redundant. - Removed code to force setting of Socks remote dns on mozilla browsers as remote dns is the default for Socks5 now. -- Alistair Neil Mon, 14 Sep 2015 20:00:00 -0400 selektor (3.13.42.1) beta; urgency=low * Reverted internet access check to the version used in 3.13.38 - Changed traffic/read timeout period to 2 minutes -- Alistair Neil Mon, 14 Sep 2015 14:14:00 -0400 selektor (3.13.42) stable; urgency=low * Fixed an issue introduced in 3.13.39 causing proxy error messages due to node switching under high latency conditions particularly bad on low bandwidth exit nodes. It should not have been switching when their were active browser connections. -- Alistair Neil Sun, 13 Sep 2015 15:56:00 -0400 selektor (3.13.41) stable; urgency=low * Modified internet detection to prevent unnecessary restarting of Tor Client. - Removed StrictNodes option on test clients, as it is now unnecessary and can hamper circuit building. - Modified auto node select to immediately switch nodes if latency exceeds timeout ie is unknown. -- Alistair Neil Wed, 9 Sep 2015 21:16:00 -0400 selektor (3.13.40) stable; urgency=low * Removed recommended nodes facility as this is now virtually redundant. - Fixed possible null exception issue to do with bridges although the exception in this case would not occur due to the variable being initialised externally, it is now initialised correctly locally within TorProcess class. - Fixed some minor UI alignment issues - Update check is no longer done hourly just at startup. - Updated help files -- Alistair Neil Thu, 3 Sep 2015 19:16:00 -0400 selektor (3.13.39) stable; urgency=low * Fixed issue with incorrect node information sometimes being displayed at startup as Tor generates 2 node circuits at startup and sometimes the info for the wrong circuit would be displayed, I now ensure only one circuit is used at startup. - Added the facility to specify hosts, ips not to be proxied in the pattern editor, note it does not support ip ranges you need to specify a list of comma separated ips or hosts. - Modified testing so that if no circuits are available it will close all circuits and signal HUP to the tor test client before testing the next node as sometimes it can cause the next node test to fail. So far I have been unable to determine the reason for Tor sometimes ceasing to build circuits and no errors appear to be generated by Tor itself for me to act on. It may be related to this issue https://trac.torproject.org/projects/tor/ticket/11301 - Reduced the period for which the Tor cache is considered fresh for 3 hrs to 2 hrs. - Added link to DNS leak test to the Help menu. - Added removeMozillaUserPref to BrowserFactory for future use - Added resetGnome3Pref to OSFunction - Removed some unused methods - Tor exit node now needs to be capable of both http & https, instead of just one of them before it is accepted for inclusion in the node list. - Help contents and Tor Manual links now point to their official external web links. - Updated English and French help files. - Various French translation fixes. - Updated geoip files -- Alistair Neil Sun, 23 Aug 2015 15:03:00 -0400 selektor (3.13.38) stable; urgency=low * Fixed startup failure issue related to invalid bridge entry. - Added bridge entry validation. - Added Bridge node indication on Active Circuit info panel - Fixed invalid Internet unavailable message when bridge node is used - Fixed issue with manual node selection being slow due to incorrect circuit information being used - Fixed French localisation issue preventing selektor from generating nodes due to incorrect formating of bandwidth values -- Alistair Neil Fri, 24 Jul 2015 12:54:00 -0400 selektor (3.13.37) stable; urgency=low * Fixed GTK font color theming issues related to mostly poorly implemented dark themes. - Updated default recommended GB exit nodes whitelist - Updated Geoip database files -- Alistair Neil Sun, 05 Jul 2015 15:20:00 -0400 selektor (3.13.36) stable; urgency=low * Fixed focus issue preventing correct operation of Hide/Show GUI in traypopup - Fixed minimise/restore/focus issues on various desktops - Added compositor detection to compensate for issues caused by marco, compiz and kwin. - Tested against the following desktops Unity, Gnome, Mate, Lxde, XFCE, KDE4, Cinnamon, E19 Enlightenment and Windows 7 -- Alistair Neil Wed, 03 Jun 2015 14:12:00 -0400 selektor (3.13.35) stable; urgency=low * Small modification to how GUI visibility toggling is handled from the tray icon when GUI is visible but does not have focus - Remove unused class reference from BrowserFactory - Fixed issue with selected guard nodes sometimes not being properly applied whilst in manual selection mode causeing the check guard dialog to popup. - Adjusted ClientProcess readline timing, making it less cpu hungry - Bandwidth changed to advertised bandwidth in MB\s to match up with Atlas details -- Alistair Neil Thu, 28 May 2015 19:10:00 -0400 selektor (3.13.34) stable; urgency=low * Renamed getLatestAppVersion to getURLAsString in NetFunctions - Modified how app version checking is handled, to improve reliability - Lowered some of the socket timeouts on remote data fetches. - Made some changes to accommodate changes to the Windows release in regards to the Windows release adopting the same versioning scheme as the Linux release -- Alistair Neil Mon, 25 May 2015 14:20:00 -0400 selektor (3.13.33) stable; urgency=low * Restored system tray functionality on Cinnamon as the issue has been fixed on Cinnamon desktop 2.6. - Fix for Firefox browser check that would cause SelekTOR to hang directly after generating nodelist -- Alistair Neil Sat, 23 May 2015 15:47:00 -0400 selektor (3.13.32) stable; urgency=low * Disabled tray functionality on Gnome3, since Java traycion support on that desktop is incomplete. - Some fixes to ensure proper closure of information dialogs. - Some fixes for multiple instance detection. -- Alistair Neil Wed, 20 May 2015 14:50:00 -0400 selektor (3.13.31) stable; urgency=low * Fixed an issue where a hidden dialog on the trayicon would sometimes be visible under the compiz compositor, its opacity is now set to zero to make it truly invisible. - SwingTrayIcon is now a wrapper around tray icon instead of a class extension - Fixes for trayicon tooltip issues where if border space was not reserved by the notification tray dock panel then tooltip failed to display properly. - Added new preferences option "Hide instead of Minimise" for greater flexibility with the multitude of different dock/launcher mechanisms on Linux - Fixed tray icon being removed when a compositor such as compiz, compton etc is toggled on/off it now gets automatically reloaded. - Modified application icon to be a better fit in the dock by adding a transparent border, so that modern dock dot markers show up better. - System tray functionality is disabled on Cinnamon desktop due to issues that desktop has with Java's native trayicon. - Added linux desktop detection, to detect when Cinnamon desktop is active in order to disable tray functionality on this desktop - Set a minimum size on the Tor Monitor window. -- Alistair Neil Fri, 8 May 2015 23:24:00 -0400 selektor (3.13.30) stable; urgency=low * TorController.getTrafficFailCount now returns -1 if Tor fails to respond, this fixes a false Internet access un-available notification being raised when net access is restored. - Hopefully fixed all internet access restoration issues, its a tricky one as tor appears to behave differently under windows compared to linux. - Added new debug feature in that you can now specify a debug output file with all the various debug options. - Some more improvements to SwingTrayIcon tooltip - Updated geoip -- Alistair Neil Thu, 30 Apr 2015 19:34:00 -0400 selektor (3.13.29) stable; urgency=low * Fixed tray tooltip sometimes not being hidden. - Modified net access detection to prevent a rare failure to restart Tor on net access restoration. - Fixed pattern changes not being immediately applied on save in pattern editor -- Alistair Neil Sun, 26 Apr 2015 18:02:00 -0400 selektor (3.13.28) stable; urgency=low * Added check and warning for not enough active guard nodes. - Renamed java package lang to resources. - Added default recommended exitnodes list as a fallback incase for any reason SelekTOR is unable to connect to Dazzleships to download the remotely stored recommended list. This means SelekTOR now has full functionality even without access to Dazzleships. - Minor adjustments to column widths on exitnode table - Modified how mouse location on Swingtray is handled. - Improved secure delete, zero wiped files and folders are now renamed prior to deletion, sequence is now zerowipe,zerolength,rename,delete. - Modified NetFunctions saveURLToFile to override age check if required. - Added more debug output to NetFunctions.saveURLToFile - Improved detection of Tor client startup failure -- Alistair Neil Sun, 12 Apr 2015 15:51:00 -0400 selektor (3.13.27) stable; urgency=low * Fixed possible but extremely rare shutdown issue due to an exception which may occur when building a circuit and a Quit is requested. - More improvements to tray icon tooltip placement. - Fixed changelog dates. -- Alistair Neil Fri, 10 Apr 2015 13:59:00 -0400 selektor (3.13.26) stable; urgency=low * Minor tweaks to trayicon, just some polish. - Moved Tor cache to the user settings area on Linux you can find it at ~/.SelekTOR/3xx/cache instead of tmp as I forgot on some/most linux systems tmp gets cleared at startup. - Fixed not honouring manual node selection on proxy mode change -- Alistair Neil Thu, 9 Apr 2015 13:12:00 -0400 selektor (3.13.25) stable; urgency=low * Desktop notifications now handled by its own class instead of SwingTrayIcon - New class which acts as a simplification wrapper around SwingTrayIcon called TrayUtility - Extensive code audit to ensure all resources that could stop the JVM from properly exiting are closed and disposed of in a controlled manner. This should in future ensure clean shutdowns of SelekTOR Also added more comments as part of audit. - Updated geoip files. -- Alistair Neil Fri, 27 Mar 2015 19:42:00 -0400 selektor (3.13.24) stable; urgency=low * Partial re-write of clientprocess to fix startup issues as the fixes I introduced in 3.13.23 were not reliable especially if internet access was lost. -- Alistair Neil Mon, 23 Mar 2015 15:26:00 -0400 selektor (3.13.23) stable; urgency=low * Update notification dialog is now set to auto close after 30 seconds - Modification to SelekTOR to handle a stalled Tor client startup which sometimes occurs at Bootstrapped 5% Connecting to directory server. If this notification is received 3 times the SelekTOR initiates a restart of the Tor client. - Improved test client startup times, by fixing a bug where they should of been using previously cached descriptors instead of re-downloading microdescriptors. -- Alistair Neil Sat, 21 Mar 2015 16:59:00 -0400 selektor (3.13.22) stable; urgency=low * More fixes for swingtray, practically a rewrite to address issues when run on the Cinnamon desktop. - Fixed some object alignment issues on Guardnode and Pattern editor dialogs. -- Alistair Neil Sun, 08 Mar 2015 21:24:00 -0400 selektor (3.13.21) stable; urgency=low * Fixed issues with swingtray tooltip -- Alistair Neil Sat, 07 Mar 2015 19:03:00 -0400 selektor (3.13.20) stable; urgency=low * Fixed bandwidth sort. - Reduced number of tor threads to 3 instead of 6 which reduces memory consumption by about 45% approx 150MB over the previous version. - Speeded up testing to compensate for less tor test threads. - Unused tor test threads are now shutdown after every test cycle has completed reducing memory usage further. - Added bandwidth column to guard table for sorting by bandwidth. - Added proxy mode checkboxes to buttongroups to fix selection issue - Added closeActiveStreams() method to TorController - Improved stale cache handling -- Alistair Neil Sat, 28 Feb 2015 23:34:00 -0400 selektor (3.13.19) stable; urgency=low * Fixed bug in TorController.getEntryGuardsAsCSV() which would cause an exception and testing to hang if an unuseable entry node was returned. -- Alistair Neil Mon, 16 Feb 2015 15:55:00 -0400 selektor (3.13.17) stable; urgency=low * Removed the internal force node switch option when in proxy all traffic mode to allow long lived tor connections such as when used by IRC. - Fixed issue with not immediately selecting a new node after testing. - Added desktop notification functionality - Fixed Selektor quitting when used with a torrent client, although you should not be torrenting via tor as a lot of nodes block bittorrent. - Fixed menu selection foreground colour issues due to java gtk bugs. - Fixed issue of loss of guard entries if a startup error was encountered - Fixed issue of slow shutdown of tor clients on quit due to a code regression fault. - Merged FixGTK functions into Utilities class, for easier Windows porting - Some object renaming and documentation. -- Alistair Neil Tue, 3 Feb 2015 14:07:00 -0400 selektor (3.13.16) stable; urgency=low * Now send the TOR QUIT command instead of relying completely on process destroy. - Update check is now done every 30 minutes as well as at startup. - Small fix to traffic fail count method in TorController -- Alistair Neil Tue, 27 Jan 2015 20:37:00 -0400 selektor (3.13.15) stable; urgency=low * Major improvements to bridge handling - Fixed testing cycle being re-triggered while testing. - Greatly improved net detection and recovery from net failure - Fixed issues with import patterns and zip extraction -- Alistair Neil Sat, 24 Jan 2015 18:42:00 -0400 selektor (3.13.14) stable; urgency=low * Some minor localisation fixes - Changed the order of display of exitnode and guardnode info in tray tooltip - Restart tor client immediately in the event of no viable exits - Small change to version routine in Utilities class to make porting to Windows slightly easier - Updated geoip files - Modified how startup delay on autostart is handled. - Tor monitor window now resizable - Fixed bridges issue causing a hang -- Alistair Neil Fri, 23 Jan 2015 15:17:00 -0400 selektor (3.13.13) stable; urgency=low * Initial snapshot of experimental branch 3-13-13-beta to become stable branch - Various fixes to SwingTray to fix positional issues when compiz is running - Added --reset-defaults in order to reset to default safe settings from the console. - Prevented setting of listening port below 9054 -- Alistair Neil Sun, 18 Jan 2015 17:42:00 -0400 selektor (3.12.18) stable; urgency=low * Removed Unamed and Stable nodes only options as I now need all nodes to be loaded, these should of been removed in 3.12.16 but I forgot. I could implement a view filter for them but its more hassle than its worth. - Fixed an incorrect null response after an interrupt on the thread sleep during client process startup. - Added catch for not enough directory information message, which will force a cache refresh on restart. - Added tor cache age check every time a tor client is started - Improved debugging log statements, and added more startup debug options - Removed unused constant from TorController - Updated language files and help files. -- Alistair Neil Wed, 03 Dec 2014 14:00:00 -0400 selektor (3.12.17) stable; urgency=low * Fixed testing cycle stalling, a regression on my part (stupid me) -- Alistair Neil Fri, 28 Nov 2014 01:05:00 -0400 selektor (3.12.16) stable; urgency=low * Re-worked Nodelist generation - Fixed some node being rejected due to having different fingerprints but the same ip address. This combo is possible and valid so we cant reject them as it can cause a Null exception being thrown during a node lookup. You should now see a lot more nodes in the nodelist. -- Alistair Neil Tue, 25 Nov 2014 14:22:00 -0400 selektor (3.12.15) stable; urgency=low * Modified start up sequence to fix intermittent problem with fetching remote data from dazzleships caused by the initial tor chosen circuits not always being capable of handling http on port 80. Now i wait for nodelist generation to complete which filters out nodes that cant handle port 80, once those nodes have been applied to tor I wait for tor to generate new circuits using my filtered list then fetch the remote data, this slightly increases initial startup time. - Increased circuit build timeout to 15 secs per circuit. - If a node has no exit routes then I abort testing immediately instead of waiting for the timeout which slightly improves the speed of testing. - Various other minor fixes. -- Alistair Neil Thu, 20 Nov 2014 15:58:00 -0400 selektor (3.12.14) stable; urgency=low * Lowered package version requirements for libglib2.0-bin 2.32+ - This should fix the reported issue with Debian Wheezy. -- Alistair Neil Tue, 18 Nov 2014 12:41:00 -0400 selektor (3.12.13) stable; urgency=low * Fixed a regression which would cause test threads to fail with the - No Circuits Available status message. -- Alistair Neil Mon, 17 Nov 2014 04:15:00 -0400 selektor (3.12.12) stable; urgency=low * Preparation work for merge from experimental branch - Restructuring for possible incorporation of additional guard node functionality. - Some variable and class renaming. - Redesigned ClientProcess class, gives improved startup time and reduced CPU usage. - Renamed blacklist and whitelist file. - Reduced tor client restart delays to 2000ms - Improved threading, and reduced usage of swingworkers. - Implemented detection of "no exit routers" to a tor node. - General efficiency improvements, reducing CPU usage. - More debug options, run "selektor --help" to list them. - Circuit building wait time slighty increased to 250ms - Improved firefox browser check, warning only issued if browser requires restart to apply new settings. If settings are already applied then warning is not issued. - Added filtering for port 443 - Added own geoip6 support so tor-geoipdb is no longer required - Updated geoip databases - Fixed sometimes failing to on remotedata fetch. -- Alistair Neil Thu, 13 Nov 2014 15:15:00 -0400 selektor (3.12.11) stable; urgency=low * Moved language files into main jar. - Enable predictive circuits on Tor startup. - Renamed GlobalVariable to GlobalServices. - Fixed hanging at Bootstrap Done 100% caused by app update check failure due to the slower nature of Tor, added error detection to prevent the hanging. - Increased timeout on app aupdate and nodelist fetch due to the slower nature of Tor, added error detection. - Added method to set default socket timeout in NetFunctions. - Circuit building wait time reduced to 100ms from 500ms making circuit build detection a bit faster. -- Alistair Neil Wed, 5 Nov 2014 16:17:00 -0400 selektor (3.12.10) stable; urgency=low * Small tweak to net reachability detection to ensure no false detections. - Fixed bug in version check routine. -- Alistair Neil Mon, 3 Nov 2014 20:00:00 -0400 selektor (3.12.9) stable; urgency=low * Local DNS leakproofing, SeleKTOR now works without any local DNS resolution. - App update check and fetching of the recommended nodelist is done via Tor including their DNS lookups. - Removed net latency field so no more local DNS resolves or pinging of Google are done directly via the net. - Net unreachable detection is now done using Tor. - Whois is now done in default browser. - Updated help files. -- Alistair Neil Mon, 3 Nov 2014 13:48:00 -0400 selektor (3.12.8) stable; urgency=low * Fixed Bad Package error on Ubuntu - Implemented Installed-Size in Debian control file. - Added a dummy class to SelekTORLang, to prevent lintian complaining about empty jar. -- Alistair Neil Fri, 31 Oct 2014 20:06:00 -0400 selektor (3.12.7) stable; urgency=low * Fixed a proxy reset issue. - Modified proxy restore so that if it doesnt find a valid proxy backup file then it will just reset the proxy to the system defaults. - Fixed a debian packaging issue whereby the autostart link was not removed on package uninstall. - Fixed issues with tarball install/uninstall scripts -- Alistair Neil Thu, 30 Oct 2014 13:46:00 -0400 selektor (3.12.6) stable; urgency=low * Fixed main tor thread shutdown issue on quit. - Fixed tor sometimes failing to restart, when listen port was changed. -- Alistair Neil Tue, 28 Oct 2014 20:08:00 -0400 selektor (3.12.5) stable; urgency=low * Switched build structure over to Debian style. - Improved UI layout for better font and language scaling - Added .deb package. - See chlogoldstyle.gz for older changelog entries. -- Alistair Neil Sun, 26 Oct 2014 14:28:00 -0400 selektor-3.13.73/packaging/doc/help-fr.html0000644000175000017500000002676113302030722017760 0ustar bannorbannor

Options de l’interface de la fenêtre principale de SelekTOR

Pays actif
Choisissez votre pays de sortie désiré ici. SelekTOR récupérera les nœuds de sortie proposés pour ce pays s’il en a.

Mode de relais: désactivé
Le relais par SelekTOR/Tor est désactivé, SelekTOR ne contrôlera plus
les paramètres de mandataire du système.
La configuration manuelle des paramètres de serveur mandataire de
votre navigateur sera requise.

Mode de relais : relayer tout le trafic
Activer ce mode pour relayer tout le trafic par le nœud mandataire Tor actif.
Ce mode utilise des circuits à 3 sauts pour un meilleur anonymat (valeur par défaut de Tor)
Ne convient pas à la diffusion en flux continu.

Mode de relais : relais par modèle
Activer ce mode pour relayer sélectivement par le nœud mandataire Tor actif par modèle d’URL.
Ce mode utilise des circuits à 2 sauts pour un délai de transit réduit en sacrifiant un peu l’anonymat.

Définir les nœuds de garde
Ouvre la fenêtre de sélection des nœuds de garde.

Options du tableau des nœuds (clic droit)

Activer le nœud
Les nœuds peuvent être activés manuellement en utilisant cette option. Vous devriez désactiver le Choix automatique du nœud si vous désirez vous assurer que l’activation reste permanente.

Détails du nœud
Affiche les détails du nœud choisi dans votre navigateur Web, fourni par Atlas.

Qui est
Fourni les informations Qui est sur le nœud choisi.

Commencer le cycle de test
Lance un cycle de test du nœud.

Informations sur le circuit actif

Pseudonyme
Le pseudonyme assigné à ce nœud.

IP
L’adresse IP du nœud.

Pays
Le pays où le nœud est situé.

Bande-passante (MB/s)
Cet indicateur montre la bande-passante rapportée pour le nœud actif.

Stable
Cet indicateur montre si la période de fonctionnement du nœud est assez longue pour qu’il soit considéré stable.

Délai de transit (ms)
Cet indicateur montre le délai de transit vers l’URL de test par le nœud de sortie Tor choisi. Le délai de transit fourni une indication du temps de réponse du nœud en millisecondes, où 1 000 ms = 1 seconde.

Flux
Cet indicateur montre le nombre de flux actifs pour le nœud actif.

Options de l’interface de la zone de notification de SelekTOR (clic droit sur l’icône de notification)

Mode : pas de relais
Le relayage par Tor peut être désactivé en choisissant cette option. Tout le trafic système sortira vers Internet normalement.

Mode : relayer tout le trafic
Activer ce mode pour relayer tout le trafic par le nœud mandataire Tor actif.
Ne convient pas pour la diffusion en flux continu.

Mode : relayer par modèle
Activer ce mode pour relayer sélectivement par le nœud mandataire Tor actif par modèle d’URL.

Cacher / montrer l’IUG
Changer la visibilité de l’IUG.

Quitter SelekTOR
Quitter l’application.

Options des préférences de base de SelekTOR

Cacher vers la zone de notification au démarrage
L’IUG sera cachée au démarrage et redeviendra visible en double cliquant sur l’icône SelekTOR dans la zone de notification.

Démarrage automatique de SelekTOR
SelekTOR démarrera automatiquement à la connexion.

Vérifier les mises à jour au démarrage
Il sera vérifié si des mises à jour de SelekTOR sont proposées sur Dazzleships point net.

Désactiver l’icône de notification
Désactive la fonction de zone de notification.

Minimiser au démarrage
Minimise SelekTOR vers la barre des tâches au démarrage.

Minimiser au lieu de quitter lors de la fermeture
Au lieu de quitter SelekTOR, minimiser vers la barre des tâches après avoir cliqué sur l’icône de fermeture de la fenêtre principale.

Cacher au lieu de minimiser
Au lieu de minimiser SelekTOR vers la barre des tâches, cacher complètement SelekTOR.

Effacement sécurisé des caches de Tor lors de la fermeture
Supprime les caches de Tor de façon sécurisée en renommant et en remplissant de zéros avant de supprimer.

Afficher une fenêtre d’avertissement si un nœud de garde non spécifié est utilisé
Ouvre une fenêtre d’avertissement si vous avez choisi des nœuds de garde manuellement et si un nœud de garde autre que ceux spécifiés est utilisé. Cette condition ne se présente que si Tor ne peut se connecter à aucun de vos nœuds de garde désignés, ce qui est rare.
Si cela se passe toutefois, vous devriez vérifier votre choix de nœuds de garde.

Options avancées des préférences de SelekTOR

Port d’écoute de Tor
Le port d’écoute principal sur lequel le client Tor écoutera les connexions entrantes, habituellement de n’importe quel serveur mandataire que vous utilisez. 9054 est le port par défaut de SelekTOR.

Adresse de pont de Tor
S’il vous faut contourner le blocage d’un FSI, saisissez alors ici une adresse de pont de Tor valide.
Utilisez le bouton « Obtenir des ponts » pour trouver des adresses de ponts de Tor valides.

Socks sécuritaire
Activée, Tor rejettera les connexions logicielles qui utilisent des variantes dangereuses du protocole Socks — celles qui fournissent seulement une adresse IP, ce qui signifie que l’application fait d’abord une résolution DNS. Spécifiquement, il s’agit de socks4 et socks5 s’il n’y a pas de DNS distant.

Avertir si à risque
Activée, Tor avertira à chaque fois qu’une requête est reçue contenant seulement une adresse IP au lieu d’un nom d’hôte. Permettre aux applications de faire elles-mêmes des résolutions DNS est habituellement une mauvaise idée et pourrait divulguer votre emplacement à des attaquants.

Tester Socks
Activée, Tor journalisera une entrée de journal de niveau « avis » pour chaque connexion en indiquant si elle utilise un protocole Socks sécuritaire ou dangereux (voir l’entrée ci-dessus à propos de Socks sécuritaire). Ceci aide à déterminer si une application utilisant Tor divulgue possiblement des requêtes DNS.

Niveau de journalisation
Définir le niveau de journalisation du client Tor, toutes les sorties vont vers la sortie standard pour éviter les écritures sur le disque.

Journalisation sécuritaire
Activée, Tor nettoiera les chaînes potentiellement sensibles des messages de journalisation (p. ex. les adresses) en les remplaçant par la chaîne [scrubbed] (nettoyée). De cette manière les journaux peuvent encore être utiles, mais ils ne laissent apparaître aucune information personnelle sur les sites qu’un utilisateur pourrait avoir consultés.

Éviter les écritures sur le disque
Activée, Tor essaiera d’écrire moins fréquemment sur le disque que nous ne le ferions autrement. Ceci est utile lors de l’exécution sur de la mémoire flash ou autre support ne prenant en charge qu’un nombre limité d’écritures.

Arguments de démarrage
Ceci passera tout argument de démarrage spécifié par l’utilisateur au client Tor, voir le manuel de Tor pour une liste d’arguments valides en ligne de commande.

Relais HTTP par défaut
Vous pouvez spécifier ici un serveur mandataire descendant. Tout ce qui n’est pas acheminé par Tor sera envoyé au serveur mandataire. En laissant ce champ vide, tout ce qui n’est pas acheminé par Tor sera envoyé directement vers Internet. Ceci est la valeur par défaut.

Moniteur du client Tor

Arguments de démarrage
Affiche tous les arguments passés au démarrage au client Tor.

Moniteur de sortie standard
Affiche en temps réel le flux de journalisation de la sortie standard du client Tor.

Modification des modèles de SelekTOR

Éditeur de modèles de relais
L’éditeur de modèles vous permet de modifier, ajouter, supprimer ou désactiver les modèles d’URL utilisés pour réacheminer des URL spécifiques par le mandataire Socks de Tor. N’utilisez ceci que si vous savez ce que vous faites car toute erreur ici peut entraîner un échec complet du relayage.

Ajout rapide d’un modèle
L’ajout rapide d’un modèle vous permet d’ajouter rapidement un nouveau modèle pour le pays actuellement actif. Un exemple est donné ci-dessous :

Description : Newzbin
Modèle : *newzbin.com*

Importer des modèles
Les fichiers de modèles sont stockés dans un fichier ZIP. Ce fichier ZIP peut être importé directement dans SelekTOR en utilisant cette action.

Exporter des modèles
Ceci vous permet d’exporter tous les fichiers de modèles créés par l’utilisateur comme fichier d’importation compressé compatible avec SelekTOR.

Informations complémentaires

Ce produit inclut des données de GeoLite2 data créé par MaxMind, disponible sur http://www.maxmind.com.

selektor-3.13.73/packaging/doc/copyright0000644000175000017500000000174613302030722017464 0ustar bannorbannorCopyright (C) 2009 - 2017 Alistair Neil This software was put together by Alistair Neil , from the following sources available for download at the SelekTOR Homepage. SelekTOR Homepage : http://www.dazzleships.net/?page_id=71 SelekTOR is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SelekTOR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SelekTOR. If not, see . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. selektor-3.13.73/packaging/doc/help-pt-br.html0000644000175000017500000002354513302030722020372 0ustar bannorbannor Ajuda SelekTOR

Opções da janela principal do SelekTOR

País ativo
Selecione aqui o país de saída que deseja. O SelekTOR irá buscar os nós de saída disponíveis para eese país caso exista.

Modo do proxy : Desabilitado
Proxy atravéz do SelekTOR/Tor está desabilitado, SelekTOR não irá exercer nenhum controle sob as configurações de proxy.
Será necessária a configuração manual de proxy do seu navegador web.

Modo do proxy : Proxy para todo tráfego
Habilite esse modo para que todo tráfego não roteado pelo Tor seja redirecionado por esse proxy HTTP.
Use circuitos de 3 saltos para melhor anonimato (padrão no Tor)
Não adequado para fluxos multimedia.

Modo do proxy : Proxy por modelo
Habilite esse modo para usar o proxy Tor ativo seletivamente por modelo de URLs.
Use circuitos de 2 saltos para melhor latência com algum sacrifício de anonimato.

Seleção de nós guarda
Abre a janela de seleção de nós guarda.

Opções da tabela de nós (Clique direito)

Ativar nó
Nós podem ser ativados manualmente usando essa opção, você deve desabilitar o modo de auto seleção se quiser que a ativação seja permanente.

Detalhe do nó
Obtém os detalhes do nó selecionado no seu navegador padrão, fornecido por Atlas.

Whois
Fornece informações whois do nó selecionado.

Inicia ciclo de teste
Inicia um ciclo de teste de nós.

Informação do circuito ativo

Apelido
Apelido definido para o nó.

IP
Endereço ip do nó.

País
País em que cada nó está localizado.

Largura de banda (MB/s)
Esse indicador mostra a largura de banda do nó ativo.

Estável
Se o nó está ativo a tempo suficiente para ser considerado estável.

Latência (ms)
Esse indicador mostra a latência da URL através do atual nó de saída. A latência fornece uma indicação do tempo de resposta do nó em milissegundos, onde 1000ms = 1 segundo.

Fluxos
Esse indicador mostra o número de fluxos no nó ativo.

Opções da interface do SelekTor da bandeja do sistema (Clique direito sobre o ícone da bandeja)

Modo: Sem proxy
O proxy via Tor pode ser desabilitado selecionando essa opção. Todo tráfego sairá normalmente via internet.

Modo: Proxy para todo tráfego
Habilite esse modo para que todo tráfego passe através do proxy do Tor ativo. Use circuitos de 3 saltos para melhor anonimato (padrão do Tor)
Não adequado para fluxos multimídia.

Modo: Proxy por modelo
Habilite esse modo para usar o proxy seletivamente por modelo de URLs através do nó ativo do Tor.
Use circuitos de 2 saltos para uma melhor latência com algum sacrifício do anonimato.

Esconde/mostra GUI.
Modifica a visualização da interface gráfica (GUI).

Fechar SelekTOR.
Fechar a aplicação.

Configuração básica do SelekTOR

Minimizar ao inciair
A GUI estará oculta na iniciação, pode ser visível novamente dando um clique duplo no ícone do SelekTOR na bandeja do sistema.

Iniciar o SelekTOR automaticamente
O SelekTOR irá iniciar no login.

Verificar atualizações ao iniciar.
Verifica se há atualizações do SelekTOR disponíveis em dazzleships.net.

Desabilita ícone da bandeja.
Desabilita a funcionalidade do ícone da bandeja.

Desabilita notificações
Desabilita as notificações do SelekTOR.

Minimizar ao iniciar
Minimizar o SelekTOR quando iniciar.

Minimiar ao invés de fechar
Minimizar o SelekTOR ao invés de sair ao clicar no ícone fechar.

Oculta ao invés de minimizar
Ao invés de minimizar ocultar o SelekTOR completamente.

Apagar dados armazenados do Tor ao sair
Apagamento seguro do armazenamento do Tor que será renomeado e sobrescrito por zeros antes de apagar.

Alertar se um nó guarda não especificado for usado
Abre uma janela de alerta se selecionou nós guarda manualmente e um nó não selecionado for usado. Essa condição só ocorre quando o Tor não consegue conectar a nenhum dos nós guarda selecionados e raramente ocorre. Se isso acontecer você deve verificar suas seleções de nós guarda.

Opções avançadas do SelekTOR

Porta de esculta do Tor
A porta de escuta principal que o cliente Tor irá usar para conexões de entrada. Normalmente qualquer que seja seu proxy a porta 9054 é a padrão do SelekTOR.

Endereço de ponte do Tor
Se precisar pular bloqueios do provedor, selecione aqui um endereço válido de ponte do TOR. Use o botão “Obter pontes” para encontrar endereços válidos de pontes TOR.

Socks seguro
Quando habilitado, o Tor irá rejeitar conexões que usem variações inseguras do protocolo socks, aquelas que fornecem apenas um endereço IP, significando que a aplicação está usando DNS primeiro. Especificamente quando socks4 e socks5 não estão usando um DNS remoto.

Alerta se inseguro
Quando habilitado, o Tor alertará toda vez que uma requisição recebida contenha apenas um endereço de IP ao invés de um nome de máquina. Permitir que aplicações façam resolução DNS por si mesmas é uma má ideia e pode vazar sua localização aos atacantes.

Teste de Socks
Quando habilitado, o Tor irá gerar uma mensagem de log nível notificação para cada conexão para a porta do socks, indicando quando a requisição usa socks seguro ou inseguro (veja acima a entrada socks seguro). Isso ajuda a determinar quando uma aplicação usando Tor está possivelmente vazando requisições de DNS.

Nível de log
Defina o nível de log do cliente Tor. Toda saída irá para a saída padrão do console para evitar escrita no disco.

Log seguro
Quando habilitado, o Tor irá limpar o texto potencialmente crítico das mensagens de log, como endereços, substituindo-os pelo texto [scrubbed]. Deste modo os logs ainda podem ser úteis, mas não deixam informações de identificação pessoal sobre os sites que um usuário possa ter visitado.

Escrever no disco com menos frequência
Quando habilitado, o Tor tentará escrever no disco com menos frequência. Isso é especialmente útil quando está usando cartões de memória ou outro dispositivo que tenha limite do número de operações de escrita.

Parâmetros iniciais
Isso irá passar parâmetros de iniciação específicos, definidos pelo usuário ao cliente Tor. Veja o manual do Tor para obter uma lista de parâmetros válidos.

Proxy HTTP padrão
Você pode especificar aqui um servidor proxy para que qualquer coisa que não vá através do TOR seja enviada para esse proxy. Deixar em branco significa que o que não passar pelo Tor irá diretamente via rede, esse é o padrão.

Monitor do cliente TOR

Parâmetros iniciais
Isso mostra todos os parâmetros passados na iniciação do cliente Tor.

Monitor de saída
Isso mostra o fluxo das mensagens do cliente Tor em tempo real.

Editor de modelo do SelekTOR

Editor de modelo de Proxy
O editor de modelo permite modificar, adicionar, apagar ou desabilitar modelos de URLs através do proxy socks do Tor. Use isso apenas se souber o que está fazendo, pois qualquer erro aqui pode fazer com que o proxy falhe completamente.

Adicione modelo rapidamente
Permite que adicione rapidamente um novo modelo para o país atualmente ativo. Segue um exemplo:

Descrição: Newzbin
Modelo: *newzbin.com*

Importar modelos
Modelos são armazenados em um arquivo Zip. Esse arquivo Zip pode ser importado para o SelekTOR usando essa ação.

Exportar modelos
Isso permite exportar todos os seus modelos de usuário para um arquivo Zip compatível com o arquivo de importação do SelekTOR.

Informações adicionais

Esse produto inclui os dados do GeoLite2 criado por MaxMind, disponível em http://www.maxmind.com.

selektor-3.13.73/packaging/man/0000755000175000017500000000000013302030722015527 5ustar bannorbannorselektor-3.13.73/packaging/man/man1/0000755000175000017500000000000013302030722016363 5ustar bannorbannorselektor-3.13.73/packaging/man/man1/selektor.1.gz0000644000175000017500000000214113302030722020712 0ustar bannorbannorVmOF_1ӝJWӥ@!-M$>l챽z]'Կ_gmȁh $73%ԟTJlZpڂR*SOzC; &OJ}j֚օL 4φ N_l0y' Fg-ٷfB$ː(>/fܤR(f飹N3Q9څ" +ijy8XWpe'H\lKDW (g H"97Okuztb9k_ڮ  }e0-fթ}-k v0gIt݂em_I ,{xPXS[ Q 3#I241 C#="7b)hi#mt=~K!Ur