make it build with modules and add the checklist from ire

This commit is contained in:
idk
2021-04-19 20:43:37 -04:00
parent ce52510de1
commit 6c7b8d48ea
48 changed files with 143 additions and 66 deletions

View File

@ -6,6 +6,50 @@ A pure Go implementation of the I2P router.
go-i2p is in early development.
### Implemented Features
- Cryptographic primitives
- Signing
- [ ] ECDSA_SHA256_P256
- [ ] ECDSA_SHA384_P384
- [ ] ECDSA_SHA512_P521
- [ ] Ed25519
- Verifying
- [ ] DSA
- [ ] ECDSA_SHA256_P256
- [ ] ECDSA_SHA384_P384
- [ ] ECDSA_SHA512_P521
- [ ] RSA_SHA256_2048
- [ ] RSA_SHA384_3072
- [ ] RSA_SHA512_4096
- [ ] Ed25519
- [ ] ElGamal
- [ ] AES256
- I2NP
- [ ] Message parsing
- [ ] Message handling
- NetDB
- [ ] Local storage
- [ ] Persistence to disk
- [ ] Reseeding
- [ ] Lookups
- [ ] Expiry
- [ ] Exploration
- [ ] Publishing
- [ ] Floodfill
- Transports
- [ ] Transport manager
- NTCP
- [ ] Handshake
- [ ] Session tracking
- [ ] Automatic session creation
- NTCP2
- [ ] Handshake
- [ ] Session tracking
- [ ] Automatic session creation
- [ ] SSU
## Contributing
See CONTRIBUTING.md for more information.

9
go.mod Normal file
View File

@ -0,0 +1,9 @@
module github.com/go-i2p/go-i2p
go 1.16
require (
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc
)

24
go.sum Normal file
View File

@ -0,0 +1,24 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc h1:+q90ECDSAQirdykUN6sPEiBXBsp8Csjcca8Oy7bgLTA=
golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -1,6 +1,6 @@
package bootstrap
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
// interface defining a way to bootstrap into the i2p network
type Bootstrap interface {

View File

@ -28,7 +28,7 @@ payload :: data
import (
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)
// Certificate Types

View File

@ -9,9 +9,9 @@ Identical to KeysAndCert
*/
import (
"github.com/hkparker/go-i2p/lib/common/base32"
"github.com/hkparker/go-i2p/lib/common/base64"
"github.com/hkparker/go-i2p/lib/crypto"
"github.com/go-i2p/go-i2p/lib/common/base32"
"github.com/go-i2p/go-i2p/lib/common/base64"
"github.com/go-i2p/go-i2p/lib/crypto"
"strings"
)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
cert := common.Certificate(data)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
destination := common.Destination(data)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
keys_and_cert, _, _ := common.ReadKeysAndCert(data)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
router_address, _, _ := common.ReadRouterAddress(data)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
router_identity, _, _ := common.ReadRouterIdentity(data)

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/common"
import "github.com/go-i2p/go-i2p/lib/common"
func Fuzz(data []byte) int {
str, _, _ := common.ReadString(data)

View File

@ -28,8 +28,8 @@ payload :: data
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/crypto"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/crypto"
)
// Key Certificate Signing Key Types

View File

@ -47,8 +47,8 @@ total length: 387+ bytes
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/crypto"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/crypto"
)
// Sizes of various KeysAndCert structures and requirements

View File

@ -82,8 +82,8 @@ signature :: Signature
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/crypto"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/crypto"
)
// Sizes of various structures in an I2P LeaseSet

View File

@ -28,7 +28,7 @@ val_string :: String
import (
"encoding/binary"
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"sort"
)

View File

@ -37,7 +37,7 @@ options :: Mapping
import (
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)
// Minimum number of bytes in a valid RouterAddress

View File

@ -9,7 +9,7 @@ Identical to KeysAndCert
*/
import (
"github.com/hkparker/go-i2p/lib/crypto"
"github.com/go-i2p/go-i2p/lib/crypto"
)
//

View File

@ -75,7 +75,7 @@ signature :: Signature
import (
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)
type RouterInfo []byte

View File

@ -8,7 +8,7 @@ Accurate for version 0.9.24
import (
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)
// Maximum number of bytes that can be stored in an I2P string

View File

@ -2,8 +2,8 @@ package config
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/common"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/common"
"strings"
"unicode/utf8"
)

View File

@ -2,7 +2,7 @@ package crypto
import (
"crypto/rand"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"io"
"testing"
)

View File

@ -3,7 +3,7 @@ package crypto
import (
"bytes"
"crypto/rand"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/openpgp/elgamal"
"io"
"testing"

View File

@ -2,9 +2,9 @@ package i2np
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/tunnel"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/tunnel"
"time"
)

View File

@ -1,8 +1,8 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/tunnel"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/tunnel"
"github.com/stretchr/testify/assert"
"testing"
)

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
)
/*

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
)
/*

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
)
/*

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
)
/*

View File

@ -1,6 +1,6 @@
package exportable
import "github.com/hkparker/go-i2p/lib/i2np"
import "github.com/go-i2p/go-i2p/lib/i2np"
func Fuzz(data []byte) int {
i2np.ReadI2NPNTCPHeader(data)

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
"time"
)

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
"time"
)

View File

@ -1,8 +1,8 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/tunnel"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/tunnel"
)
/*

View File

@ -2,8 +2,8 @@ package i2np
import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/common"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/common"
"time"
)

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/stretchr/testify/assert"
"testing"
)

View File

@ -1,7 +1,7 @@
package i2np
import (
"github.com/hkparker/go-i2p/lib/tunnel"
"github.com/go-i2p/go-i2p/lib/tunnel"
)
/*

View File

@ -1,7 +1,7 @@
package netdb
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
"io"
)

View File

@ -1,8 +1,8 @@
package netdb
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/tunnel"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/tunnel"
"time"
)

View File

@ -1,8 +1,8 @@
package netdb
import (
"github.com/hkparker/go-i2p/lib/bootstrap"
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/bootstrap"
"github.com/go-i2p/go-i2p/lib/common"
"time"
)

View File

@ -3,10 +3,10 @@ package netdb
import (
"bytes"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/bootstrap"
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/common/base64"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/bootstrap"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common/base64"
"io"
"os"
"path/filepath"

View File

@ -1,8 +1,8 @@
package router
import (
"github.com/hkparker/go-i2p/lib/config"
"github.com/hkparker/go-i2p/lib/netdb"
"github.com/go-i2p/go-i2p/lib/config"
"github.com/go-i2p/go-i2p/lib/netdb"
)
// i2p router type

View File

@ -1,7 +1,7 @@
package transport
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
)
// muxes multiple transports into 1 Transport

View File

@ -1,8 +1,8 @@
package transport
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/hkparker/go-i2p/lib/i2np"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/i2np"
)
// a session between 2 routers for tranmitting i2np messages securly

View File

@ -3,8 +3,8 @@ package tunnel
import (
"encoding/binary"
"errors"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/common"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/common"
)
/*

View File

@ -1,7 +1,7 @@
package tunnel
import (
"github.com/hkparker/go-i2p/lib/common"
"github.com/go-i2p/go-i2p/lib/common"
"github.com/stretchr/testify/assert"
"testing"
)

View File

@ -2,8 +2,8 @@ package tunnel
import (
"encoding/binary"
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/crypto"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/crypto"
)
/*

View File

@ -1,7 +1,7 @@
package tunnel
import (
"github.com/hkparker/go-i2p/lib/crypto"
"github.com/go-i2p/go-i2p/lib/crypto"
)
type Participant struct {

View File

@ -1,8 +1,8 @@
package main
import (
log "github.com/Sirupsen/logrus"
"github.com/hkparker/go-i2p/lib/router"
log "github.com/sirupsen/logrus"
"github.com/go-i2p/go-i2p/lib/router"
)
func main() {