Skip to content

Commit

Permalink
Merge pull request #158 from libp2p/feat/config-crypto-channels
Browse files Browse the repository at this point in the history
add config options for security protocols
  • Loading branch information
jacobheun committed May 7, 2020
2 parents a738d68 + bf39395 commit 4169fec
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 61 deletions.
12 changes: 12 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ type PProf struct {
Port uint
}

type Security struct {
SECIO bool
Noise bool
TLS bool
}

const DHTFullMode = "full"
const DHTClientMode = "client"

Expand All @@ -100,6 +106,7 @@ type Config struct {
NoListen bool
MetricsAddress string
PProf PProf
Security Security
}

func (c *Config) UnmarshalJSON(b []byte) error {
Expand Down Expand Up @@ -176,5 +183,10 @@ func NewDefaultConfig() Config {
Enabled: false,
Port: 0,
},
Security: Security{
SECIO: true,
Noise: false,
TLS: false,
},
}
}
40 changes: 26 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,34 @@ module github.com/libp2p/go-libp2p-daemon
go 1.12

require (
github.com/ChainSafe/log15 v1.0.0 // indirect
github.com/gogo/protobuf v1.3.1
github.com/hashicorp/go-multierror v1.0.0
github.com/ipfs/go-cid v0.0.4
github.com/ipfs/go-log v0.0.1
github.com/libp2p/go-libp2p v0.5.1
github.com/ipfs/go-cid v0.0.5
github.com/ipfs/go-log v1.0.3
github.com/libp2p/go-libp2p v0.8.1
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-circuit v0.1.4
github.com/libp2p/go-libp2p-connmgr v0.2.1
github.com/libp2p/go-libp2p-core v0.2.5
github.com/libp2p/go-libp2p-kad-dht v0.5.0
github.com/libp2p/go-libp2p-peerstore v0.1.4
github.com/libp2p/go-libp2p-pubsub v0.2.5
github.com/libp2p/go-libp2p-quic-transport v0.2.3
github.com/multiformats/go-multiaddr v0.2.0
github.com/multiformats/go-multiaddr-net v0.1.2
github.com/libp2p/go-libp2p-circuit v0.2.1
github.com/libp2p/go-libp2p-connmgr v0.1.1
github.com/libp2p/go-libp2p-core v0.5.1
github.com/libp2p/go-libp2p-kad-dht v0.3.2
github.com/libp2p/go-libp2p-noise v0.1.1-0.20200507064022-02dc2ad5c414
github.com/libp2p/go-libp2p-peerstore v0.2.2
github.com/libp2p/go-libp2p-pubsub v0.2.4
github.com/libp2p/go-libp2p-quic-transport v0.2.2
github.com/libp2p/go-libp2p-secio v0.2.2
github.com/libp2p/go-libp2p-tls v0.1.3
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/multiformats/go-multiaddr v0.2.1
github.com/multiformats/go-multiaddr-net v0.1.4
github.com/multiformats/go-multihash v0.0.13
github.com/prometheus/client_golang v1.4.1
github.com/stretchr/testify v1.4.0
github.com/prometheus/client_golang v1.2.1
github.com/stretchr/testify v1.5.1
github.com/whyrusleeping/go-logging v0.0.1 // indirect
go.uber.org/atomic v1.5.1 // indirect
go.uber.org/multierr v1.4.0 // indirect
go.uber.org/zap v1.13.0 // indirect
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
)
Loading

0 comments on commit 4169fec

Please sign in to comment.