a849213b59
This diff breaks the circular dependency between session and tunnel, by introducing the concept of early session. An early session is a session that is able to fetch the psiphon configuration file _only_ if it's embedded in the binary. This breaks `miniooni --tunnel=psiphon` for users who have access to the OONI backend. They are not the users we are writing this feature for, though, so I think this is reasonable. At the same time, this opens up the possibility of creating a psiphon tunnel when constructing a session, which is the approach I was following in https://github.com/ooni/probe-cli/pull/286. This work is part of https://github.com/ooni/probe/issues/985. Once this diff is in, I can land https://github.com/ooni/probe-cli/pull/286.
18 lines
291 B
Go
18 lines
291 B
Go
// Command miniooni is a simple binary for research and QA purposes
|
|
// with a CLI interface similar to MK and OONI Probe v2.x.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
defer func() {
|
|
if s := recover(); s != nil {
|
|
fmt.Fprintf(os.Stderr, "FATAL: %s\n", s)
|
|
}
|
|
}()
|
|
Main()
|
|
}
|