31 lines
409 B
Go
31 lines
409 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"log"
|
|
"os"
|
|
|
|
"dynatron.me/x/windport/pkg/windscribe"
|
|
)
|
|
|
|
func main() {
|
|
a := windscribe.Auth{}
|
|
err := json.NewDecoder(os.Stdin).Decode(&a)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
c := windscribe.New()
|
|
ctx := context.Background()
|
|
|
|
err = c.Auth(ctx, a)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
err = c.MatchingPort(ctx)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|