add an -offline(work offline) flag

This commit is contained in:
idk
2022-02-07 21:17:05 -05:00
parent 749aafbb45
commit 79571c19e7

View File

@ -115,7 +115,7 @@ func main() {
if err != nil { if err != nil {
log.Fatal("Couldn't create client", err) log.Fatal("Couldn't create client", err)
} }
if *i2pbrowser { if *i2pbrowser || *i2pconfig {
if tbget.TestHTTPDefaultProxy() { if tbget.TestHTTPDefaultProxy() {
log.Println("I2P HTTP proxy OK") log.Println("I2P HTTP proxy OK")
} else { } else {
@ -177,18 +177,14 @@ func main() {
} }
if *profile != "" && !*offline { if *profile != "" && !*offline {
log.Println("Using a custom profile") log.Println("Using a custom profile")
if tbget.FileExists(*profile) { client.TBS.RunTBBWithProfile(*profile)
client.TBS.RunTBBWithProfile(*profile)
}
} else if *offline { } else if *offline {
if *profile == "" { if *profile == "" {
*profile = "firefox.offline" *profile = "firefox.offline"
} }
log.Println("Working offline") log.Println("Working offline")
//if tbget.FileExists(*profile) {
client.TBS.RunTBBWithOfflineProfile(*profile, *offline) client.TBS.RunTBBWithOfflineProfile(*profile, *offline)
//}
} else if *i2pbrowser { } else if *i2pbrowser {
client.TBS.RunI2PBWithLang() client.TBS.RunI2PBWithLang()
} else if *i2pconfig { } else if *i2pconfig {