From 4bf58a3c21be5becd686eb8e0a0050d5bdf88501 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 15 Oct 2020 14:38:02 -0700 Subject: [PATCH] Replace all Paths --- README.md | 6 +++--- control/cmd_conf.go | 2 +- control/cmd_event.go | 2 +- control/cmd_misc.go | 2 +- control/cmd_onion.go | 4 ++-- control/cmd_protocolinfo.go | 2 +- examples/embeddedfileserver/main.go | 4 ++-- examples/embeddedversion/main.go | 2 +- examples/httpaltsvc/main.go | 4 ++-- examples/simpleclient/main.go | 2 +- examples/simpleserver/main.go | 2 +- go.mod | 1 - go.sum | 2 -- process/embedded/process.go | 4 ++-- process/embedded/tor-0.3.3/embeddedtest/main.go | 2 +- process/embedded/tor-0.3.3/process.go | 2 +- process/embedded/tor-0.3.5/embeddedtest/main.go | 4 ++-- process/embedded/tor-0.3.5/process.go | 2 +- process/process.go | 2 +- tests/context_test.go | 2 +- tests/control_cmd_authenticate_test.go | 2 +- tests/control_cmd_conf_test.go | 2 +- tests/control_cmd_hiddenservice_test.go | 2 +- tests/tor_dialer_test.go | 2 +- tests/tor_geoip_test.go | 4 ++-- tests/tor_isolate_socks_auth_test.go | 2 +- tests/tor_listen_test.go | 4 ++-- tor/listen.go | 6 +++--- torutil/ed25519/ed25519.go | 2 +- torutil/ed25519/ed25519_test.go | 2 +- torutil/key.go | 6 +++--- torutil/key_test.go | 2 +- 32 files changed, 43 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 90b773f..f719d9d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ import ( "net/http" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" ) func main() { @@ -67,9 +67,9 @@ func main() { ``` If in `main.go` it can simply be run with `go run main.go`. Of course this uses a separate `tor` process. To embed Tor -statically in the binary, follow the [embedded package docs](https://godoc.org/github.com/cretz/bine/process/embedded) +statically in the binary, follow the [embedded package docs](https://godoc.org/git.openprivacy.ca/openprivacy/bine/process/embedded) which will require [building Tor statically](https://github.com/cretz/tor-static). Then with -`github.com/cretz/bine/process/embedded` imported, change the start line above to: +`git.openprivacy.ca/openprivacy/bine/process/embedded` imported, change the start line above to: ```go t, err := tor.Start(nil, &tor.StartConf{ProcessCreator: embedded.NewCreator()}) diff --git a/control/cmd_conf.go b/control/cmd_conf.go index c0446e5..27f84bd 100644 --- a/control/cmd_conf.go +++ b/control/cmd_conf.go @@ -3,7 +3,7 @@ package control import ( "strings" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil" ) // SetConf invokes SETCONF. diff --git a/control/cmd_event.go b/control/cmd_event.go index 578a800..bad9f0d 100644 --- a/control/cmd_event.go +++ b/control/cmd_event.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil" ) // EventCode represents an asynchronous event code (ref control spec 4.1). diff --git a/control/cmd_misc.go b/control/cmd_misc.go index 6c3fa49..fe2742d 100644 --- a/control/cmd_misc.go +++ b/control/cmd_misc.go @@ -3,7 +3,7 @@ package control import ( "strings" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil" ) // Signal invokes SIGNAL. diff --git a/control/cmd_onion.go b/control/cmd_onion.go index b298d36..0185d10 100644 --- a/control/cmd_onion.go +++ b/control/cmd_onion.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/cretz/bine/torutil" - "github.com/cretz/bine/torutil/ed25519" + "git.openprivacy.ca/openprivacy/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil/ed25519" ) // KeyType is a key type for Key in AddOnion. diff --git a/control/cmd_protocolinfo.go b/control/cmd_protocolinfo.go index 346b36d..37ba921 100644 --- a/control/cmd_protocolinfo.go +++ b/control/cmd_protocolinfo.go @@ -3,7 +3,7 @@ package control import ( "strings" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil" ) // ProtocolInfo is the protocol info result of Conn.ProtocolInfo. diff --git a/examples/embeddedfileserver/main.go b/examples/embeddedfileserver/main.go index 96924b6..7ecfad4 100644 --- a/examples/embeddedfileserver/main.go +++ b/examples/embeddedfileserver/main.go @@ -10,8 +10,8 @@ import ( "path/filepath" "time" - "github.com/cretz/bine/process/embedded" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/process/embedded" + "git.openprivacy.ca/openprivacy/bine/tor" ) func main() { diff --git a/examples/embeddedversion/main.go b/examples/embeddedversion/main.go index 49cb202..eebb7e9 100644 --- a/examples/embeddedversion/main.go +++ b/examples/embeddedversion/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/cretz/bine/process/embedded" + "git.openprivacy.ca/openprivacy/bine/process/embedded" ) func main() { diff --git a/examples/httpaltsvc/main.go b/examples/httpaltsvc/main.go index 279a7bf..f1d8905 100644 --- a/examples/httpaltsvc/main.go +++ b/examples/httpaltsvc/main.go @@ -14,8 +14,8 @@ import ( "path/filepath" "strings" - "github.com/cretz/bine/tor" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/tor" + "git.openprivacy.ca/openprivacy/bine/torutil" ) var verbose bool diff --git a/examples/simpleclient/main.go b/examples/simpleclient/main.go index d345d39..6e6118d 100644 --- a/examples/simpleclient/main.go +++ b/examples/simpleclient/main.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" "golang.org/x/net/html" ) diff --git a/examples/simpleserver/main.go b/examples/simpleserver/main.go index cee6456..2ef2c4e 100644 --- a/examples/simpleserver/main.go +++ b/examples/simpleserver/main.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" ) func main() { diff --git a/go.mod b/go.mod index 70cdea9..b14cab6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module git.openprivacy.ca/openprivacy/bine go 1.14 require ( - github.com/cretz/bine v0.1.0 github.com/stretchr/testify v1.6.1 golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee golang.org/x/net v0.0.0-20201010224723-4f7140c49acb diff --git a/go.sum b/go.sum index 28af907..89214e6 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/cretz/bine v0.1.0 h1:1/fvhLE+fk0bPzjdO5Ci+0ComYxEMuB1JhM4X5skT3g= -github.com/cretz/bine v0.1.0/go.mod h1:6PF6fWAvYtwjRGkAuDEJeWNOv3a2hUouSP/yRYXmvHw= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/process/embedded/process.go b/process/embedded/process.go index fb22d10..4d54f1b 100644 --- a/process/embedded/process.go +++ b/process/embedded/process.go @@ -21,9 +21,9 @@ package embedded import ( - "github.com/cretz/bine/process" + "git.openprivacy.ca/openprivacy/bine/process" - tor035 "github.com/cretz/bine/process/embedded/tor-0.3.5" + tor035 "git.openprivacy.ca/openprivacy/bine/process/embedded/tor-0.3.5" ) // NewCreator creates a process.Creator for statically-linked Tor embedded in diff --git a/process/embedded/tor-0.3.3/embeddedtest/main.go b/process/embedded/tor-0.3.3/embeddedtest/main.go index ed7137f..1261029 100644 --- a/process/embedded/tor-0.3.3/embeddedtest/main.go +++ b/process/embedded/tor-0.3.3/embeddedtest/main.go @@ -5,7 +5,7 @@ import ( "log" "os" - tor033 "github.com/cretz/bine/process/embedded/tor-0.3.3" + tor033 "git.openprivacy.ca/openprivacy/bine/process/embedded/tor-0.3.3" ) // Simply calls Tor will the same parameters diff --git a/process/embedded/tor-0.3.3/process.go b/process/embedded/tor-0.3.3/process.go index fdde598..bc637f6 100644 --- a/process/embedded/tor-0.3.3/process.go +++ b/process/embedded/tor-0.3.3/process.go @@ -8,7 +8,7 @@ import ( "fmt" "net" - "github.com/cretz/bine/process" + "git.openprivacy.ca/openprivacy/bine/process" ) /* diff --git a/process/embedded/tor-0.3.5/embeddedtest/main.go b/process/embedded/tor-0.3.5/embeddedtest/main.go index 9c2b957..2dca2f6 100644 --- a/process/embedded/tor-0.3.5/embeddedtest/main.go +++ b/process/embedded/tor-0.3.5/embeddedtest/main.go @@ -7,8 +7,8 @@ import ( "net/textproto" "os" - "github.com/cretz/bine/control" - tor035 "github.com/cretz/bine/process/embedded/tor-0.3.5" + "git.openprivacy.ca/openprivacy/bine/control" + tor035 "git.openprivacy.ca/openprivacy/bine/process/embedded/tor-0.3.5" ) // Simply calls Tor will the same parameters, unless "embedconn" is the arg diff --git a/process/embedded/tor-0.3.5/process.go b/process/embedded/tor-0.3.5/process.go index d97c381..b922fb9 100644 --- a/process/embedded/tor-0.3.5/process.go +++ b/process/embedded/tor-0.3.5/process.go @@ -9,7 +9,7 @@ import ( "net" "os" - "github.com/cretz/bine/process" + "git.openprivacy.ca/openprivacy/bine/process" ) /* diff --git a/process/process.go b/process/process.go index 88c6389..4633af4 100644 --- a/process/process.go +++ b/process/process.go @@ -16,7 +16,7 @@ import ( "strconv" "strings" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/torutil" ) // Process is the interface implemented by Tor processes. diff --git a/tests/context_test.go b/tests/context_test.go index b7643b1..73cf77f 100644 --- a/tests/context_test.go +++ b/tests/context_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" "github.com/stretchr/testify/require" ) diff --git a/tests/control_cmd_authenticate_test.go b/tests/control_cmd_authenticate_test.go index b61e463..93ecc21 100644 --- a/tests/control_cmd_authenticate_test.go +++ b/tests/control_cmd_authenticate_test.go @@ -3,7 +3,7 @@ package tests import ( "testing" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" ) func TestAuthenticateNull(t *testing.T) { diff --git a/tests/control_cmd_conf_test.go b/tests/control_cmd_conf_test.go index 8e2642c..9ad71a2 100644 --- a/tests/control_cmd_conf_test.go +++ b/tests/control_cmd_conf_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "testing" - "github.com/cretz/bine/control" + "git.openprivacy.ca/openprivacy/bine/control" ) func TestGetSetAndResetConf(t *testing.T) { diff --git a/tests/control_cmd_hiddenservice_test.go b/tests/control_cmd_hiddenservice_test.go index 270909b..67cc141 100644 --- a/tests/control_cmd_hiddenservice_test.go +++ b/tests/control_cmd_hiddenservice_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/cretz/bine/control" + "git.openprivacy.ca/openprivacy/bine/control" ) func TestHSFetch(t *testing.T) { diff --git a/tests/tor_dialer_test.go b/tests/tor_dialer_test.go index 4f5003e..2fcaa62 100644 --- a/tests/tor_dialer_test.go +++ b/tests/tor_dialer_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" "golang.org/x/net/context/ctxhttp" ) diff --git a/tests/tor_geoip_test.go b/tests/tor_geoip_test.go index 40ffcea..377f7dd 100644 --- a/tests/tor_geoip_test.go +++ b/tests/tor_geoip_test.go @@ -3,8 +3,8 @@ package tests import ( "testing" - "github.com/cretz/bine/tor" - "github.com/cretz/bine/torutil/geoipembed" + "git.openprivacy.ca/openprivacy/bine/tor" + "git.openprivacy.ca/openprivacy/bine/torutil/geoipembed" ) func TestEmbeddedGeoIPFile(t *testing.T) { diff --git a/tests/tor_isolate_socks_auth_test.go b/tests/tor_isolate_socks_auth_test.go index a080206..cfc9a45 100644 --- a/tests/tor_isolate_socks_auth_test.go +++ b/tests/tor_isolate_socks_auth_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/cretz/bine/tor" + "git.openprivacy.ca/openprivacy/bine/tor" "golang.org/x/net/proxy" ) diff --git a/tests/tor_listen_test.go b/tests/tor_listen_test.go index 0feed99..e0e5edf 100644 --- a/tests/tor_listen_test.go +++ b/tests/tor_listen_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/cretz/bine/tor" - "github.com/cretz/bine/torutil" + "git.openprivacy.ca/openprivacy/bine/tor" + "git.openprivacy.ca/openprivacy/bine/torutil" ) func TestListenSimpleHTTPV2(t *testing.T) { diff --git a/tor/listen.go b/tor/listen.go index 7912ca0..2d01131 100644 --- a/tor/listen.go +++ b/tor/listen.go @@ -21,7 +21,7 @@ type OnionService struct { // Key is the private key for this service. It is either the set key, the // generated key, or nil if asked to discard the key. If present, it is // *crypto/rsa.PrivateKey (1024 bit) when Version3 is false or - // github.com/cretz/bine/torutil/ed25519.KeyPair when Version3 is true. + // git.openprivacy.ca/openprivacy/bine/torutil/ed25519.KeyPair when Version3 is true. Key crypto.PrivateKey // Version3 says whether or not this service is a V3 service. @@ -66,9 +66,9 @@ type ListenConf struct { // Key is the private key to use. If not present, a key is generated based // on whether Version3 is true or false. If present, it must be a // *crypto/rsa.PrivateKey (1024 bit), a - // github.com/cretz/bine/torutil/ed25519.KeyPair, a + // git.openprivacy.ca/openprivacy/bine/torutil/ed25519.KeyPair, a // golang.org/x/crypto/ed25519.PrivateKey, or a - // github.com/cretz/bine/control.Key. + // git.openprivacy.ca/openprivacy/bine/control.Key. Key crypto.PrivateKey // Version3 determines whether, when Key is nil, a version 2 or version 3 diff --git a/torutil/ed25519/ed25519.go b/torutil/ed25519/ed25519.go index c27378f..352874d 100644 --- a/torutil/ed25519/ed25519.go +++ b/torutil/ed25519/ed25519.go @@ -12,7 +12,7 @@ import ( "errors" "io" - "github.com/cretz/bine/torutil/ed25519/internal/edwards25519" + "git.openprivacy.ca/openprivacy/bine/torutil/ed25519/internal/edwards25519" "golang.org/x/crypto/ed25519" ) diff --git a/torutil/ed25519/ed25519_test.go b/torutil/ed25519/ed25519_test.go index 77df6b0..5437b22 100644 --- a/torutil/ed25519/ed25519_test.go +++ b/torutil/ed25519/ed25519_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "github.com/cretz/bine/torutil/ed25519/internal/edwards25519" + "git.openprivacy.ca/openprivacy/bine/torutil/ed25519/internal/edwards25519" ) // Taken from https://github.com/golang/crypto/blob/1a580b3eff7814fc9b40602fd35256c63b50f491/ed25519/ed25519_test.go diff --git a/torutil/key.go b/torutil/key.go index 70407e2..c5900ca 100644 --- a/torutil/key.go +++ b/torutil/key.go @@ -9,7 +9,7 @@ import ( "fmt" "strings" - "github.com/cretz/bine/torutil/ed25519" + "git.openprivacy.ca/openprivacy/bine/torutil/ed25519" "golang.org/x/crypto/sha3" ) @@ -17,7 +17,7 @@ var serviceIDEncoding = base32.StdEncoding.WithPadding(base32.NoPadding) // OnionServiceIDFromPrivateKey generates the onion service ID from the given // private key. This panics if the private key is not a 1024-bit -// crypto/*rsa.PrivateKey or github.com/cretz/bine/torutil/ed25519.KeyPair. +// crypto/*rsa.PrivateKey or git.openprivacy.ca/openprivacy/bine/torutil/ed25519.KeyPair. func OnionServiceIDFromPrivateKey(key crypto.PrivateKey) string { switch k := key.(type) { case *rsa.PrivateKey: @@ -30,7 +30,7 @@ func OnionServiceIDFromPrivateKey(key crypto.PrivateKey) string { // OnionServiceIDFromPublicKey generates the onion service ID from the given // public key. This panics if the public key is not a 1024-bit -// crypto/*rsa.PublicKey or github.com/cretz/bine/torutil/ed25519.PublicKey. +// crypto/*rsa.PublicKey or git.openprivacy.ca/openprivacy/bine/torutil/ed25519.PublicKey. func OnionServiceIDFromPublicKey(key crypto.PublicKey) string { switch k := key.(type) { case *rsa.PublicKey: diff --git a/torutil/key_test.go b/torutil/key_test.go index 5d2dcda..375f441 100644 --- a/torutil/key_test.go +++ b/torutil/key_test.go @@ -7,7 +7,7 @@ import ( "math/big" "testing" - "github.com/cretz/bine/torutil/ed25519" + "git.openprivacy.ca/openprivacy/bine/torutil/ed25519" "github.com/stretchr/testify/require" )