Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
deprecate this repo (#47)
Browse files Browse the repository at this point in the history
* deprecate this repo

* release v0.3.0
  • Loading branch information
marten-seemann authored May 25, 2022
1 parent 07a026b commit 4505c85
Show file tree
Hide file tree
Showing 7 changed files with 996 additions and 190 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# DEPRECATION NOTICE

This package has moved into go-libp2p as a sub-package, github.com/libp2p/go-libp2p/p2p/net/pnet.

go-libp2p-pnet
==================

Expand Down
11 changes: 7 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ module github.com/libp2p/go-libp2p-pnet
go 1.17

require (
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018
github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-libp2p-core v0.5.0
github.com/libp2p/go-libp2p v0.20.0
github.com/libp2p/go-libp2p-core v0.16.1
)

require golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
require (
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
)
983 changes: 980 additions & 3 deletions go.sum

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions protector.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
// Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/net/pnet.
package pnet

import (
"errors"
"github.com/libp2p/go-libp2p/p2p/net/pnet"
"net"

ipnet "github.com/libp2p/go-libp2p-core/pnet"
)

// NewProtectedConn creates a new protected connection
// Deprecated: use github.com/libp2p/go-libp2p/p2p/net/pnet.NewProtectedConn instead.
func NewProtectedConn(psk ipnet.PSK, conn net.Conn) (net.Conn, error) {
if len(psk) != 32 {
return nil, errors.New("expected 32 byte PSK")
}
var p [32]byte
copy(p[:], psk)
return newPSKConn(&p, conn)
return pnet.NewProtectedConn(psk, conn)
}
83 changes: 0 additions & 83 deletions psk_conn.go

This file was deleted.

92 changes: 0 additions & 92 deletions psk_conn_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v0.2.0"
"version": "v0.3.0"
}

0 comments on commit 4505c85

Please sign in to comment.