diff --git a/application.go b/application.go index 1fd47b9..0be1173 100644 --- a/application.go +++ b/application.go @@ -1,7 +1,7 @@ package tapir import ( - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ) // Capability defines a status granted to a connection, from an application. That allows the connection to access diff --git a/applications/application_chain.go b/applications/application_chain.go index 3b440af..32d50f9 100644 --- a/applications/application_chain.go +++ b/applications/application_chain.go @@ -1,7 +1,7 @@ package applications import ( - "cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir" ) // ApplicationChain is a meta-app that can be used to build complex applications from other applications diff --git a/applications/auth.go b/applications/auth.go index 898bd55..e7ea405 100644 --- a/applications/auth.go +++ b/applications/auth.go @@ -2,9 +2,9 @@ package applications import ( "crypto/subtle" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" diff --git a/applications/auth_test.go b/applications/auth_test.go index ef5f08f..be41015 100644 --- a/applications/auth_test.go +++ b/applications/auth_test.go @@ -2,9 +2,9 @@ package applications import ( "crypto/rand" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "golang.org/x/crypto/ed25519" "testing" ) diff --git a/applications/proof_of_work_app.go b/applications/proof_of_work_app.go index 602f2f2..bdf0c61 100644 --- a/applications/proof_of_work_app.go +++ b/applications/proof_of_work_app.go @@ -2,8 +2,8 @@ package applications import ( "crypto/sha256" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/token_app.go b/applications/token_app.go index 11e4970..263bc6f 100644 --- a/applications/token_app.go +++ b/applications/token_app.go @@ -1,9 +1,9 @@ package applications import ( - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/client.go b/applications/tokenboard/client.go index 13ed6fd..171263e 100644 --- a/applications/tokenboard/client.go +++ b/applications/tokenboard/client.go @@ -1,11 +1,11 @@ package tokenboard import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/common.go b/applications/tokenboard/common.go index ba746e1..9c9385a 100644 --- a/applications/tokenboard/common.go +++ b/applications/tokenboard/common.go @@ -1,8 +1,8 @@ package tokenboard import ( - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" ) // AppHandler allows clients to react to specific events. diff --git a/applications/tokenboard/server.go b/applications/tokenboard/server.go index 54bd3cc..39c6df4 100644 --- a/applications/tokenboard/server.go +++ b/applications/tokenboard/server.go @@ -3,11 +3,11 @@ package tokenboard // NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed. import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "encoding/json" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/log" ) diff --git a/applications/tokenboard/tokenboard_integration_test.go b/applications/tokenboard/tokenboard_integration_test.go index 81617ad..0446206 100644 --- a/applications/tokenboard/tokenboard_integration_test.go +++ b/applications/tokenboard/tokenboard_integration_test.go @@ -1,13 +1,13 @@ package tokenboard import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" - "cwtch.im/tapir/primitives/auditable" - "cwtch.im/tapir/primitives/privacypass" "errors" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir/primitives/auditable" + "git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass" "git.openprivacy.ca/openprivacy/connectivity" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" diff --git a/applications/transcript_app.go b/applications/transcript_app.go index 5a89f95..d11b096 100644 --- a/applications/transcript_app.go +++ b/applications/transcript_app.go @@ -1,8 +1,8 @@ package applications import ( - "cwtch.im/tapir" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ) diff --git a/go.mod b/go.mod index 3125992..79b95b7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module cwtch.im/tapir +module git.openprivacy.ca/cwtch.im/tapir require ( git.openprivacy.ca/openprivacy/connectivity v1.4.0 diff --git a/networks/tor/BaseOnionService.go b/networks/tor/BaseOnionService.go index f7aec1d..c6a30a8 100644 --- a/networks/tor/BaseOnionService.go +++ b/networks/tor/BaseOnionService.go @@ -2,10 +2,10 @@ package tor import ( "crypto/rand" - "cwtch.im/tapir" - "cwtch.im/tapir/primitives" "encoding/base64" "errors" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -23,6 +23,7 @@ type BaseOnionService struct { lock sync.Mutex } +// Metrics provide metrics for services func (s *BaseOnionService) Metrics() tapir.ServiceMetrics { s.lock.Lock() defer s.lock.Unlock() diff --git a/primitives/auditable/auditablestore.go b/primitives/auditable/auditablestore.go index a4574a2..90910a6 100644 --- a/primitives/auditable/auditablestore.go +++ b/primitives/auditable/auditablestore.go @@ -3,11 +3,11 @@ package auditable // WARNING NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed. import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives" - "cwtch.im/tapir/primitives/core" "encoding/base64" "errors" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" "sync" diff --git a/primitives/auditable/auditablestore_test.go b/primitives/auditable/auditablestore_test.go index 2e0623f..aeae0fb 100644 --- a/primitives/auditable/auditablestore_test.go +++ b/primitives/auditable/auditablestore_test.go @@ -1,9 +1,9 @@ package auditable import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/log" "os" "testing" diff --git a/primitives/identity.go b/primitives/identity.go index 1ac8995..b63e6a8 100644 --- a/primitives/identity.go +++ b/primitives/identity.go @@ -2,7 +2,7 @@ package primitives import ( "crypto/rand" - "cwtch.im/tapir/utils" + "git.openprivacy.ca/cwtch.im/tapir/utils" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "golang.org/x/crypto/ed25519" ) diff --git a/primitives/privacypass/dlogeq.go b/primitives/privacypass/dlogeq.go index c57dafc..438a4f3 100644 --- a/primitives/privacypass/dlogeq.go +++ b/primitives/privacypass/dlogeq.go @@ -2,7 +2,7 @@ package privacypass import ( "crypto/rand" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ristretto "github.com/gtank/ristretto255" ) diff --git a/primitives/privacypass/token.go b/primitives/privacypass/token.go index 8bc9a77..e4ffc0d 100644 --- a/primitives/privacypass/token.go +++ b/primitives/privacypass/token.go @@ -3,8 +3,8 @@ package privacypass import ( "crypto/hmac" "crypto/rand" - "cwtch.im/tapir/primitives/core" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" ristretto "github.com/gtank/ristretto255" diff --git a/primitives/privacypass/token_test.go b/primitives/privacypass/token_test.go index bca04cd..8033a6e 100644 --- a/primitives/privacypass/token_test.go +++ b/primitives/privacypass/token_test.go @@ -1,8 +1,8 @@ package privacypass import ( - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives/core" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" "git.openprivacy.ca/openprivacy/log" "github.com/gtank/ristretto255" "golang.org/x/crypto/sha3" diff --git a/primitives/privacypass/tokenserver.go b/primitives/privacypass/tokenserver.go index c5036d2..72a279b 100644 --- a/primitives/privacypass/tokenserver.go +++ b/primitives/privacypass/tokenserver.go @@ -3,10 +3,10 @@ package privacypass import ( "crypto/hmac" "crypto/rand" - "cwtch.im/tapir/persistence" - "cwtch.im/tapir/primitives/core" "encoding/hex" "fmt" + "git.openprivacy.ca/cwtch.im/tapir/persistence" + "git.openprivacy.ca/cwtch.im/tapir/primitives/core" ristretto "github.com/gtank/ristretto255" "golang.org/x/crypto/sha3" "sync" diff --git a/service.go b/service.go index f010179..f7b5408 100644 --- a/service.go +++ b/service.go @@ -2,8 +2,8 @@ package tapir import ( "crypto/rand" - "cwtch.im/tapir/primitives" "encoding/binary" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -12,6 +12,7 @@ import ( "sync" ) +// ServiceMetrics are metrics for servers... type ServiceMetrics struct { ConnectionCount int } diff --git a/testing/tapir_integration_test.go b/testing/tapir_integration_test.go index b5116ce..36c883f 100644 --- a/testing/tapir_integration_test.go +++ b/testing/tapir_integration_test.go @@ -1,10 +1,10 @@ package testing import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" "git.openprivacy.ca/openprivacy/connectivity" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" diff --git a/testing/tapir_malicious_remote_integration_test.go b/testing/tapir_malicious_remote_integration_test.go index 1574bd9..80244e9 100644 --- a/testing/tapir_malicious_remote_integration_test.go +++ b/testing/tapir_malicious_remote_integration_test.go @@ -1,10 +1,10 @@ package testing import ( - "cwtch.im/tapir" - "cwtch.im/tapir/applications" - "cwtch.im/tapir/networks/tor" - "cwtch.im/tapir/primitives" + "git.openprivacy.ca/cwtch.im/tapir" + "git.openprivacy.ca/cwtch.im/tapir/applications" + "git.openprivacy.ca/cwtch.im/tapir/networks/tor" + "git.openprivacy.ca/cwtch.im/tapir/primitives" torProvider "git.openprivacy.ca/openprivacy/connectivity/tor" "git.openprivacy.ca/openprivacy/log" "golang.org/x/crypto/ed25519" @@ -25,7 +25,6 @@ func TestTapirMaliciousRemote(t *testing.T) { builder := new(torProvider.TorrcBuilder) builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc") - // Connect to Tor acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"}) if err != nil {