fix: allow to build miniooni for windows (#520)

I need to run test on Windows and I just discovered that:

1. the `errno_unix.go` filename does not mean anything because
`unix` is not a valid platform, so we need a filename for
each platform that we care about;

2. on Windows we need to use WSA prefixed names;

3. `i/e/session_psiphon.go` was not building because of the
migration from `netxlite/iox` to `netxlite`.

This diff attempts to fix all three issues.

The reference issue is https://github.com/ooni/probe/issues/1733,
because I was working on such an issue.
This commit is contained in:
Simone Basso 2021-09-28 18:27:28 +02:00 committed by GitHub
commit 9523753b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 188 additions and 53 deletions

View file

@ -9,7 +9,7 @@ import (
_ "embed"
"filippo.io/age"
"github.com/ooni/probe-cli/v3/internal/netxlite/iox"
"github.com/ooni/probe-cli/v3/internal/netxlite"
)
//go:embed psiphon-config.json.age
@ -35,7 +35,7 @@ func (s *sessionTunnelEarlySession) FetchPsiphonConfig(ctx context.Context) ([]b
if err != nil {
return nil, err
}
return iox.ReadAllContext(ctx, output)
return netxlite.ReadAllContext(ctx, output)
}
// FetchPsiphonConfig decrypts psiphonConfigJSONAge using