add an -offline(work offline) flag
This commit is contained in:
8
main.go
8
main.go
@ -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 {
|
||||||
|
Reference in New Issue
Block a user