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

@ -1,5 +1,5 @@
// Code generated by go generate; DO NOT EDIT.
// Generated: 2021-09-28 12:05:19.868647 +0200 CEST m=+0.105301959
// Generated: 2021-09-28 18:13:54.361886 +0200 CEST m=+0.453564501
package netxlite
@ -16,7 +16,6 @@ const (
//
// System errors
//
FailureOperationCanceled = "operation_canceled"
FailureConnectionRefused = "connection_refused"
FailureConnectionReset = "connection_reset"
FailureHostUnreachable = "host_unreachable"
@ -67,7 +66,6 @@ const (
// failureMap lists all failures so we can match them
// when they are wrapped by quic.TransportError.
var failuresMap = map[string]string{
"operation_canceled": "operation_canceled",
"connection_refused": "connection_refused",
"connection_reset": "connection_reset",
"host_unreachable": "host_unreachable",
@ -120,8 +118,6 @@ func classifySyscallError(err error) string {
return ""
}
switch errno {
case ECANCELED:
return FailureOperationCanceled
case ECONNREFUSED:
return FailureConnectionRefused
case ECONNRESET: