Documentation
¶
Index ¶
- Variables
- func CheckI2PIsInstalledDefaultLocation() (bool, error)
- func CheckI2PIsRunning() (bool, error)
- func CheckI2PUserName() (string, error)
- func ConditionallyLaunchI2P() (bool, error)
- func FindI2PIsInstalledDefaultLocation() (string, error)
- func GetFirewallPort() (string, error)
- func UserFind() string
Constants ¶
This section is empty.
Variables ¶
var ( // I2CP_HOST is the i2cp host I2CP_HOST string // I2CP_PORT is the i2cp port I2CP_PORT string // WINDOWS_DEFAULT_LOCATION WINDOWS_DEFAULT_LOCATION string = `C:\\Program Files\i2p\i2psvc.exe` // WINDOWS_ZERO_NSIS_DEFAULT_LOCATION WINDOWS_ZERO_NSIS_DEFAULT_LOCATION string = `C:\\Program Files\I2P-Zero\router\i2p-zero.exe` // I2PD_WINDOWS_DEFAULT_LOCATION I2PD_WINDOWS_DEFAULT_LOCATION string = `C:\\Program Files\I2Pd\i2pd.exe` // LINUX_SYSTEM_LOCATION LINUX_SYSTEM_LOCATION []string = []string{"/usr/bin/i2prouter", "/usr/sbin/i2prouter"} // I2PD_LINUX_SYSTEM_LOCATION I2PD_LINUX_SYSTEM_LOCATION []string = []string{"/usr/sbin/i2pd", "/usr/bin/i2pd"} // I2P_ASUSER_HOME_LOCATION This is the path to the default I2P config directory when running as a user I2P_ASUSER_HOME_LOCATION string = inithome(home()) // HOME_DIRECTORY_LOCATION can use config/run from a user's $HOME directory, this is the path to that router HOME_DIRECTORY_LOCATION string = inithome("/i2p/i2prouter") // OSX_DEFAULT_LOCATION OSX_DEFAULT_LOCATION string = inithome("/Library/Application Support/i2p/clients.config") )
Functions ¶
func CheckI2PIsInstalledDefaultLocation ¶
CheckI2PIsInstalledDefaultLocation looks in various locations for the presence of an I2P router.
func CheckI2PIsRunning ¶
CheckI2PIsRunning is frequently the only thing I need a reliable, non-SAM way to test at runtime.
func CheckI2PUserName ¶
CheckI2PUserName looks in various locations for the presence of an I2P router and guesses the username it should run under. On Windows it returns the EXE name.
func ConditionallyLaunchI2P ¶
ConditionallyLaunchI2P If an already-installed I2P router is present, then make sure that it is started, i.e. launch the router *only* if it is not already running.
func FindI2PIsInstalledDefaultLocation ¶
FindI2PIsInstalledDefaultLocation looks in various locations for the presence of an I2P router, reporting back the location
func GetFirewallPort ¶
GetFirewallPort finds the configured UDP port of your I2P router to help configure firewalls. It does this by finding the router.config and reading it. This function will not work on I2Pd routers yet but it should be easy to add support once I get some more time to test and research it.
Types ¶
This section is empty.