Remove custom url forwarding for tapir module
This commit is contained in:
parent
905dc52b7a
commit
b68d838295
|
@ -1,7 +1,7 @@
|
||||||
package tapir
|
package tapir
|
||||||
|
|
||||||
import (
|
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
|
// Capability defines a status granted to a connection, from an application. That allows the connection to access
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package applications
|
package applications
|
||||||
|
|
||||||
import (
|
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
|
// ApplicationChain is a meta-app that can be used to build complex applications from other applications
|
||||||
|
|
|
@ -2,9 +2,9 @@ package applications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
|
|
|
@ -2,9 +2,9 @@ package applications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,8 +2,8 @@ package applications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"cwtch.im/tapir"
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
"cwtch.im/tapir/primitives/core"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package applications
|
package applications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/primitives/privacypass"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package tokenboard
|
package tokenboard
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/applications"
|
|
||||||
"cwtch.im/tapir/primitives/auditable"
|
|
||||||
"cwtch.im/tapir/primitives/privacypass"
|
|
||||||
"encoding/json"
|
"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"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package tokenboard
|
package tokenboard
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir/primitives/auditable"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/auditable"
|
||||||
"cwtch.im/tapir/primitives/privacypass"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/privacypass"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AppHandler allows clients to react to specific events.
|
// AppHandler allows clients to react to specific events.
|
||||||
|
|
|
@ -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.
|
// NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/applications"
|
|
||||||
"cwtch.im/tapir/primitives/auditable"
|
|
||||||
"cwtch.im/tapir/primitives/privacypass"
|
|
||||||
"encoding/json"
|
"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"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package tokenboard
|
package tokenboard
|
||||||
|
|
||||||
import (
|
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"
|
"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"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package applications
|
package applications
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
"cwtch.im/tapir/primitives/core"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module cwtch.im/tapir
|
module git.openprivacy.ca/cwtch.im/tapir
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.openprivacy.ca/openprivacy/connectivity v1.4.0
|
git.openprivacy.ca/openprivacy/connectivity v1.4.0
|
||||||
|
|
|
@ -2,10 +2,10 @@ package tor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir"
|
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
"git.openprivacy.ca/openprivacy/connectivity"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
|
@ -23,6 +23,7 @@ type BaseOnionService struct {
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Metrics provide metrics for services
|
||||||
func (s *BaseOnionService) Metrics() tapir.ServiceMetrics {
|
func (s *BaseOnionService) Metrics() tapir.ServiceMetrics {
|
||||||
s.lock.Lock()
|
s.lock.Lock()
|
||||||
defer s.lock.Unlock()
|
defer s.lock.Unlock()
|
||||||
|
|
|
@ -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.
|
// WARNING NOTE: This is a sketch implementation, Not suitable for production use. The real auditable store is still being designed.
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir/persistence"
|
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"cwtch.im/tapir/primitives/core"
|
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"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"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package auditable
|
package auditable
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir/persistence"
|
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/persistence"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
@ -2,7 +2,7 @@ package primitives
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir/utils"
|
"git.openprivacy.ca/cwtch.im/tapir/utils"
|
||||||
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@ package privacypass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir/primitives/core"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
ristretto "github.com/gtank/ristretto255"
|
ristretto "github.com/gtank/ristretto255"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ package privacypass
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir/primitives/core"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
ristretto "github.com/gtank/ristretto255"
|
ristretto "github.com/gtank/ristretto255"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package privacypass
|
package privacypass
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir/persistence"
|
"git.openprivacy.ca/cwtch.im/tapir/persistence"
|
||||||
"cwtch.im/tapir/primitives/core"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"github.com/gtank/ristretto255"
|
"github.com/gtank/ristretto255"
|
||||||
"golang.org/x/crypto/sha3"
|
"golang.org/x/crypto/sha3"
|
||||||
|
|
|
@ -3,10 +3,10 @@ package privacypass
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir/persistence"
|
|
||||||
"cwtch.im/tapir/primitives/core"
|
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/persistence"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
|
||||||
ristretto "github.com/gtank/ristretto255"
|
ristretto "github.com/gtank/ristretto255"
|
||||||
"golang.org/x/crypto/sha3"
|
"golang.org/x/crypto/sha3"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
|
@ -2,8 +2,8 @@ package tapir
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"cwtch.im/tapir/primitives"
|
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
"git.openprivacy.ca/openprivacy/connectivity"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
|
@ -12,6 +12,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ServiceMetrics are metrics for servers...
|
||||||
type ServiceMetrics struct {
|
type ServiceMetrics struct {
|
||||||
ConnectionCount int
|
ConnectionCount int
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package testing
|
package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
"cwtch.im/tapir/applications"
|
"git.openprivacy.ca/cwtch.im/tapir/applications"
|
||||||
"cwtch.im/tapir/networks/tor"
|
"git.openprivacy.ca/cwtch.im/tapir/networks/tor"
|
||||||
"cwtch.im/tapir/primitives"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
"git.openprivacy.ca/openprivacy/connectivity"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package testing
|
package testing
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/tapir"
|
"git.openprivacy.ca/cwtch.im/tapir"
|
||||||
"cwtch.im/tapir/applications"
|
"git.openprivacy.ca/cwtch.im/tapir/applications"
|
||||||
"cwtch.im/tapir/networks/tor"
|
"git.openprivacy.ca/cwtch.im/tapir/networks/tor"
|
||||||
"cwtch.im/tapir/primitives"
|
"git.openprivacy.ca/cwtch.im/tapir/primitives"
|
||||||
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
torProvider "git.openprivacy.ca/openprivacy/connectivity/tor"
|
||||||
"git.openprivacy.ca/openprivacy/log"
|
"git.openprivacy.ca/openprivacy/log"
|
||||||
"golang.org/x/crypto/ed25519"
|
"golang.org/x/crypto/ed25519"
|
||||||
|
@ -25,7 +25,6 @@ func TestTapirMaliciousRemote(t *testing.T) {
|
||||||
builder := new(torProvider.TorrcBuilder)
|
builder := new(torProvider.TorrcBuilder)
|
||||||
builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc")
|
builder.WithHashedPassword("tapir-integration-test").Build("./tor/torrc")
|
||||||
|
|
||||||
|
|
||||||
// Connect to Tor
|
// Connect to Tor
|
||||||
acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"})
|
acn, err := torProvider.NewTorACNWithAuth("./", "", 9051, torProvider.HashedPasswordAuthenticator{Password: "tapir-integration-test"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue