Browse Source

Remove custom url forwarding for tapir module

pull/29/head
Sarah Jamie Lewis 1 year ago
parent
commit
b68d838295
  1. 2
      application.go
  2. 2
      applications/application_chain.go
  3. 4
      applications/auth.go
  4. 4
      applications/auth_test.go
  5. 4
      applications/proof_of_work_app.go
  6. 4
      applications/token_app.go
  7. 8
      applications/tokenboard/client.go
  8. 4
      applications/tokenboard/common.go
  9. 8
      applications/tokenboard/server.go
  10. 12
      applications/tokenboard/tokenboard_integration_test.go
  11. 4
      applications/transcript_app.go
  12. 2
      go.mod
  13. 5
      networks/tor/BaseOnionService.go
  14. 6
      primitives/auditable/auditablestore.go
  15. 4
      primitives/auditable/auditablestore_test.go
  16. 2
      primitives/identity.go
  17. 2
      primitives/privacypass/dlogeq.go
  18. 2
      primitives/privacypass/token.go
  19. 4
      primitives/privacypass/token_test.go
  20. 4
      primitives/privacypass/tokenserver.go
  21. 3
      service.go
  22. 8
      testing/tapir_integration_test.go
  23. 9
      testing/tapir_malicious_remote_integration_test.go

2
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

2
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

4
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"

4
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"
)

4
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"
)

4
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"
)

8
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"
)

4
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.

8
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"
)

12
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"

4
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"
)

2
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

5
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()

6
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"

4
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"

2
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"
)

2
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"
)

2
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"

4
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"

4
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"

3
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
}

8
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"

9
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 {

Loading…
Cancel
Save