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
parent 9ef4d9df7d
commit 9523753b87
11 changed files with 188 additions and 53 deletions
+2 -2
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