Documentation
¶
Overview ¶
Package fcw wraps a Firefox process from start-to-finish, and allows the user to pass a profile directory to that process where it will find pre-configured settings. It's useful for using Firefox as an interface to applications, and for applying specific settings for use when browsing overlay networks like Tor or I2P.
Index ¶
- Variables
- func DeAppifyUserJS(profile string) error
- func LoadCertificate(certPath string) (*x509.Certificate, error)
- func LocateFirefox() string
- func MessageBox(title, text string) bool
- func PortablePath() string
- func PromptDownload()
- func Run() error
- func UnpackApp(profileDir string, offline bool) (string, error)
- type CertManager
- type UI
Constants ¶
This section is empty.
Variables ¶
var FirefoxExecutable = LocateFirefox
FirefoxExecutable returns a string which points to the preferred Firefox executable file as calculated by the LocateFirefox variable
var UserChrome []byte
var UserOverrides []byte
Functions ¶
func DeAppifyUserJS ¶ added in v0.0.9
func LoadCertificate ¶ added in v0.0.9
func LoadCertificate(certPath string) (*x509.Certificate, error)
LoadCertificate loads a certificate from a PEM file
func LocateFirefox ¶
func LocateFirefox() string
LocateFirefox returns a path to the Firefox binary, or an empty string if Firefox installation is not found.
func MessageBox ¶
MessageBox creates a dialog box which prompts the user to download and install Firefox if they have not already.
func PortablePath ¶
func PortablePath() string
PortablePath determines if there is a "Portable" Firefox in a sub-directory of the runtime directory
func PromptDownload ¶
func PromptDownload()
PromptDownload asks user if they want to download and install Firefox, and opens a download web page if the user agrees.
Types ¶
type CertManager ¶ added in v0.0.9
type CertManager struct {
// contains filtered or unexported fields
}
CertManager handles Firefox certificate operations
func NewCertManager ¶ added in v0.0.9
func NewCertManager(profileDir string) (*CertManager, error)
NewCertManager creates a certificate manager for the given Firefox profile
func (*CertManager) AddCertificate ¶ added in v0.0.9
func (cm *CertManager) AddCertificate(certPath, nickname string) error
AddCertificate imports a certificate from a PEM file
func (*CertManager) ListCertificates ¶ added in v0.0.9
func (cm *CertManager) ListCertificates() ([]cert9util.CertificateInfo, error)
ListCertificates returns all certificates in the database
func (*CertManager) RemoveCertificate ¶ added in v0.0.9
func (cm *CertManager) RemoveCertificate(nickname string) error
RemoveCertificate removes a certificate by its nickname
type UI ¶
type UI interface {
Done() <-chan struct{}
Close() error
Log() string
CertManager() (*CertManager, error)
}
UI is a wrapper/manager for a Firefox external process.
func BasicFirefox ¶
BasicFirefox sets up a new Firefox instance, and creates the profile directory if it does not already exist.
func NewFirefox ¶
NewFirefox creates a new instance of the Firefox manager.