149 Commits

Author SHA1 Message Date
Steven Allen
41068aa69c correctly format ip4-in-6 addresses
fixes part one of #77
2018-09-30 16:41:00 -07:00
Steven Allen
a80cfc331f gx publish 1.3.1 2018-09-24 02:07:54 -07:00
Steven Allen
8988e82d78
Merge pull request #69 from mwnx/ip6z
Add "ip6%" multiaddr (IPv6 with zone ID)
2018-09-24 09:03:16 +00:00
Steven Allen
6f084e635d validate ipv6 zone 2018-09-14 18:51:03 -07:00
mwnx
1f9df061aa Add "zone" multiaddr (IPv6 zone)
See [rfc4007].

Can be prefixed to "ip6" like so:

    /zone/eth0/ip6/fe80::1

This corresponds to the rfc4007 address `fe80::1%eth0`

[rfc4007] https://tools.ietf.org/html/rfc4007
2018-09-14 18:41:48 -07:00
Steven Allen
de7d6d8195
Merge pull request #75 from overbool/docs/modify-readme
docs(README): modify readme
2018-09-14 16:00:47 +00:00
Overbool
c7b4679a01 docs(README): modify readme 2018-09-14 22:13:38 +08:00
Steven Allen
d6ad8896de
Merge pull request #73 from multiformats/feat/better-protocol
add protocol by code map
2018-07-21 00:31:18 +00:00
Steven Allen
1ae1320955 refactor the protocol definition files
Also use `AddProtocol` for *all* protocols (even predefined ones).
2018-07-18 09:09:29 -07:00
Steven Allen
6688376452 unexport ProtocolsByName and add protocolsByCode 2018-06-26 14:53:06 -07:00
Steven Allen
47e3ab13b2 validate protocol definition in add protocol 2018-06-22 18:34:55 -07:00
Steven Allen
ece734f18d remove redundant case 2018-06-22 18:32:03 -07:00
Steven Allen
9680498266
Merge pull request #71 from multiformats/fix/panic
fully validate multiaddr byte representations on construction
2018-06-22 21:55:16 +00:00
Steven Allen
2b4e098f3e gx publish 1.3.0 2018-06-22 14:36:39 -07:00
Steven Allen
1fc094e0e0 explicitly throw away impossible write errors 2018-06-22 14:31:41 -07:00
Steven Allen
1e80322cf0 add test case for panic 2018-06-22 13:29:31 -07:00
Steven Allen
1e4c6be785 fully validate p2p addresses when decoding from bytes
Otherwise, .String() can panic.
2018-06-22 13:29:31 -07:00
Steven Allen
5416c663d5 simplify variable-length argument handling
Instead of having the transformers deal with variable length argument prefixes,
just do this in the bytesToString/stringToBytes functions.
2018-06-22 13:29:31 -07:00
Steven Allen
b68c4a264d go fmt 2018-06-22 13:28:00 -07:00
Steven Allen
84fb105635
Merge pull request #66 from multiformats/feat/p2p-transition
begin transition from /ipfs/ to /p2p/ multiaddrs
2018-06-19 01:34:16 +00:00
Steven Allen
7f59fc3f88 add tests for /p2p addrs 2018-06-18 18:31:18 -07:00
Steven Allen
a778a9db10 add a round-trip test 2018-06-18 18:27:39 -07:00
Jeromy
dea70a9f19 begin transition from /ipfs/ to /p2p/ multiaddrs 2018-06-18 18:24:36 -07:00
Steven Allen
997959a3cb
Merge pull request #68 from mwnx/master
Two small bugfixes
2018-06-16 20:42:20 +00:00
Steven Allen
b9548e77d7 bump minimum go version to 1.10 2018-06-16 13:35:24 -07:00
mwnx
7bf24dca81 Fix CodeToVarint []byte size
We were missing a logarithm... CodeToVarint would previously allocate
more bytes than necessary (exponentially) for the varint slice. This bug
was silent but deserves to be fixed nonetheless.
2018-06-16 19:53:08 +02:00
mwnx
ae494b7f0c Fix ipv6 parser error message ("ip4" → "ip6") 2018-06-16 19:53:08 +02:00
Steven Allen
f36800afeb gx publish 1.2.7 2018-06-08 20:23:07 -07:00
Steven Allen
123a717755 gx publish 1.2.6 2018-01-19 20:50:56 -08:00
Whyrusleeping
781e075f3d
Merge pull request #61 from multiformats/gx/update-5osgb9
gx: update go-multihash
2017-12-04 20:10:07 +01:00
Steven Allen
fb72fb2a8e gx publish 1.2.5 2017-12-03 20:35:08 -08:00
Steven Allen
6a3fc2bc0c Merge pull request #59 from multiformats/feat/test-bytes
Add test for Bytes()
2017-10-22 10:07:33 -07:00
Lars Gierth
b11b0e541e Add test for Bytes() 2017-10-22 17:18:59 +01:00
Jeromy Johnson
f5c34dfc88 Merge pull request #56 from multiformats/feat/perf
preallocate protocol slice
2017-09-20 18:40:42 -07:00
Steven Allen
d814073552 remove debugging code
no point in slowing things down unnecessarily just for some debugging code.
2017-09-20 18:19:29 -07:00
Steven Allen
6362ccb0d2 preallocate protocol slice
This was showing up on CPU profiles as a significant source of repeated
allocations. We don't really care about over allocation (don't keep these slices
around) and should rarely have more than 8 protocols in a single address.
2017-09-20 18:17:12 -07:00
Steven Allen
6addc7f583 Merge pull request #54 from Stebalien/fix/table
Fix protocol multicodecs numbers
2017-07-30 19:56:20 -07:00
Steven Allen
1a9014dbd5 ci: update travis go version to 1.8 2017-07-30 19:50:27 -07:00
Steven Allen
a8637d432a Change QUIC multicodec to a unique number
It conflicted with CBOR.

part of multiformats/multicodec#55
2017-07-30 19:50:20 -07:00
Steven Allen
71c1bfde36 Fix protocol multicodecs numbers
1. Swap udt/utp.
2. Fix udp (17 is SHA1)
3. Change them to hex so it's easier to compare them with the official
   multicodec table.
4. Remove the local protocols.csv table.

Fixes #49
Fixes multiformats/multicodec#51
2017-07-20 14:39:12 -07:00
Jakub Sztandera
c31e9eec23 Merge pull request #47 from tabrath/fix/codecov
Switched to codecov
2017-07-19 21:40:21 +02:00
Jeromy
6c0f82541b gx publish 1.2.4 2017-07-10 23:10:15 -07:00
Jeromy
33741da7b3 gx publish 1.2.2 2017-03-23 18:43:16 -07:00
Jeromy
168733adeb gx publish 1.2.1 2017-03-18 17:13:16 -07:00
Jeromy
c69ec140a5 update go-multihash dep 2017-03-18 13:41:42 -07:00
Jeromy Johnson
7debba7a9f Merge pull request #48 from marten-seemann/master
add QUIC
2017-03-17 22:22:04 -07:00
Marten Seemann
22c78388e2
add QUIC 2017-03-17 13:26:26 +07:00
Trond Bråthen
525acb7bc4 switched to codecov 2017-02-25 11:25:18 +01:00
Jeromy
5ea81f9b8a gx publish 1.1.3 2017-02-01 20:25:00 -08:00
Jeromy
23ad6db6f8 updating go-multihash 2017-02-01 20:24:58 -08:00