forked from cwtch.im/cwtch
Renaming to cwtch.im
This commit is contained in:
parent
6de91969ae
commit
77e62b1b66
|
@ -1,7 +1,7 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/peer"
|
||||
"cwtch.im/cwtch/peer"
|
||||
"log"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
app2 "cwtch.im/cwtch/app"
|
||||
"fmt"
|
||||
app2 "git.mascherari.press/cwtch/app"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
"strings"
|
||||
|
|
|
@ -2,9 +2,9 @@ package model
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"golang.org/x/crypto/nacl/secretbox"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
|
@ -55,7 +55,7 @@ func (t *Timeline) Swap(i, j int) {
|
|||
t.Messages[i], t.Messages[j] = t.Messages[j], t.Messages[i]
|
||||
}
|
||||
|
||||
// Less checks 2 messages (i andj) in the timeline and returns true if i occcured before j, else false
|
||||
// Less checks 2 messages (i and j) in the timeline and returns true if i occcured before j, else false
|
||||
func (t *Timeline) Less(i, j int) bool {
|
||||
|
||||
if t.Messages[i].Timestamp.Before(t.Messages[j].Timestamp) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
|
|
@ -3,10 +3,10 @@ package model
|
|||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"encoding/asn1"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"golang.org/x/crypto/ed25519"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package connections
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/model"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/model"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package connections
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/peer/peer"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/peer/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
"github.com/s-rah/go-ricochet/identity"
|
||||
//"github.com/s-rah/go-ricochet/utils"
|
||||
"git.mascherari.press/cwtch/model"
|
||||
"cwtch.im/cwtch/model"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
|
|
@ -2,9 +2,9 @@ package connections
|
|||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"git.mascherari.press/cwtch/model"
|
||||
"git.mascherari.press/cwtch/peer/peer"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/model"
|
||||
"cwtch.im/cwtch/peer/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
|
@ -86,7 +86,7 @@ func TestPeerPeerConnection(t *testing.T) {
|
|||
}
|
||||
|
||||
profile := model.GenerateNewProfile("sarah")
|
||||
ppc := NewPeerPeerConnection("127.0.0.1:5452|" + onionAddr, profile)
|
||||
ppc := NewPeerPeerConnection("127.0.0.1:5452|"+onionAddr, profile)
|
||||
//numcalls := 0
|
||||
tp := new(TestPeer)
|
||||
tp.Init()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package connections
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/peer/fetch"
|
||||
"cwtch.im/cwtch/peer/listen"
|
||||
"cwtch.im/cwtch/peer/send"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/peer/fetch"
|
||||
"git.mascherari.press/cwtch/peer/listen"
|
||||
"git.mascherari.press/cwtch/peer/send"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
|
|
|
@ -2,9 +2,9 @@ package connections
|
|||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/server/fetch"
|
||||
"git.mascherari.press/cwtch/server/send"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/server/fetch"
|
||||
"cwtch.im/cwtch/server/send"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package peer
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/model"
|
||||
"cwtch.im/cwtch/peer/connections"
|
||||
"cwtch.im/cwtch/peer/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.mascherari.press/cwtch/model"
|
||||
"git.mascherari.press/cwtch/peer/connections"
|
||||
"git.mascherari.press/cwtch/peer/peer"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/connection"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package fetch
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package fetch
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package listen
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package listen
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package peer
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package peer
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package send
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol/spam"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/protocol/spam"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package send
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/protocol/spam"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol/spam"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
cwtchserver "git.mascherari.press/cwtch/server"
|
||||
cwtchserver "cwtch.im/cwtch/server"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
@ -14,11 +14,11 @@ func checkAndGenPrivateKey(privateKeyFile string) {
|
|||
if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) {
|
||||
log.Printf("no private key found!")
|
||||
log.Printf("generating new private key...")
|
||||
pk, pk_err := utils.GeneratePrivateKey()
|
||||
if pk_err != nil {
|
||||
pk, err := utils.GeneratePrivateKey()
|
||||
if err != nil {
|
||||
log.Fatalf("error generating new private key: %v\n", err)
|
||||
}
|
||||
err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
|
||||
err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
|
||||
if err != nil {
|
||||
log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package fetch
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package fetch
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package listen
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package listen
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package send
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol/spam"
|
||||
"errors"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/protocol/spam"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package send
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/protocol/spam"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol/spam"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/wire/control"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/server/fetch"
|
||||
"git.mascherari.press/cwtch/server/listen"
|
||||
"git.mascherari.press/cwtch/server/send"
|
||||
"git.mascherari.press/cwtch/storage"
|
||||
"cwtch.im/cwtch/server/fetch"
|
||||
"cwtch.im/cwtch/server/listen"
|
||||
"cwtch.im/cwtch/server/send"
|
||||
"cwtch.im/cwtch/storage"
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/server/listen"
|
||||
"git.mascherari.press/cwtch/storage"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/server/listen"
|
||||
"cwtch.im/cwtch/storage"
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"github.com/s-rah/go-ricochet/channels"
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"git.mascherari.press/cwtch/storage"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"cwtch.im/cwtch/storage"
|
||||
"github.com/s-rah/go-ricochet/application"
|
||||
"os"
|
||||
"testing"
|
||||
|
|
|
@ -2,9 +2,9 @@ package storage
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package storage
|
||||
|
||||
import (
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"os"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package testing
|
||||
|
||||
import (
|
||||
"cwtch.im/cwtch/model"
|
||||
"cwtch.im/cwtch/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
cwtchserver "cwtch.im/cwtch/server"
|
||||
"fmt"
|
||||
"git.mascherari.press/cwtch/model"
|
||||
"git.mascherari.press/cwtch/peer"
|
||||
"git.mascherari.press/cwtch/protocol"
|
||||
cwtchserver "git.mascherari.press/cwtch/server"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/s-rah/go-ricochet"
|
||||
"github.com/s-rah/go-ricochet/utils"
|
||||
|
@ -28,11 +28,11 @@ var (
|
|||
func checkAndGenPrivateKey(privateKeyFile string) (generated bool) {
|
||||
if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) {
|
||||
fmt.Println("generating new private key...")
|
||||
pk, pk_err := utils.GeneratePrivateKey()
|
||||
if pk_err != nil {
|
||||
pk, err := utils.GeneratePrivateKey()
|
||||
if err != nil {
|
||||
log.Fatalf("error generating new private key: %v\n", err)
|
||||
}
|
||||
err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
|
||||
err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400)
|
||||
if err != nil {
|
||||
log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue