38 Commits

Author SHA1 Message Date
Steven Allen
86a587ec70 improve parse error
This includes the bad multiaddr in the error and should improve UX (see
https://github.com/ipfs/go-ipfs/issues/4190).
2019-05-17 11:11:17 -07:00
Steven Allen
312b9db355
Merge pull request #87 from RTradeLtd/master
onionv3 and i2p base64 addresses
2018-12-18 17:13:04 -08:00
Matt Joiner
6f524a4380 Use the original protocol name for address missing errors
Reduces confusion due to aliased protocol names.

License: MIT
Signed-off-by: Matt Joiner <anacrolix@gmail.com>
2018-12-14 19:37:13 +11:00
idk
54ddf83b00
Switch to using base64 i2p addresses to facilitate transport 2018-11-26 05:03:37 -05:00
Steven Allen
58bcbc8e51 add component/foreach helpers
This adds a `Component` helper type and a `ForEach` helper method.

The first attempt used an interface but interfaces imply allocation. We really
can't afford to allocate here.
2018-10-01 21:18:11 -07:00
Steven Allen
7989a080af don't put the buffer struct on the heap
This showed up when profile go-ipfs.
2018-10-01 17:10:03 -07:00
Steven Allen
6c70a3d7b5 remove protocol correctness test
This is checked when the protocol is *registered*. There's no reason to test it
twice.
2018-10-01 16:56:58 -07:00
Steven Allen
ece734f18d remove redundant case 2018-06-22 18:32:03 -07:00
Steven Allen
1fc094e0e0 explicitly throw away impossible write errors 2018-06-22 14:31:41 -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
Jakub Sztandera
1919305418
add Transocoder functionality
Allowing multiaddr extensions to have data with
2016-10-14 11:48:19 -04:00
Lars Gierth
e20e4e73a9 Update multiformats imports 2016-09-29 14:52:32 +02:00
jbenet
bdf3e3a444 added unix path protocol 2016-09-19 11:06:27 +08:00
Ian Preston
e32e9cd0f0 Implemented byte decoder for onion addresses. Corrected onion bit size. 2016-08-09 19:21:28 +01:00
Jeromy
ad12fa30fe respond to CR feedback 2016-05-04 13:26:50 -07:00
Jeromy
91752fd546 a bit more cleanup, use a bytes.Buffer instead of appending bytes 2016-05-04 12:11:09 -07:00
Jeromy
9e13209db1 fix underflow error found by fuzzing 2016-05-04 10:51:57 -07:00
Jeromy
9c4a0baf6d cleanup panics and make NewFromBytes faster 2016-04-29 14:16:41 -07:00
David Stainton
fca4278010 Ensure port is above minimum port number for onions 2015-09-26 01:35:58 +02:00
David Stainton
0e7ae0d2ee Renamed tor to onion and added embedded port field 2015-08-31 03:19:47 +02:00
David Stainton
ed310561bd Add Tor .onion address support and unit test cases 2015-08-29 19:48:07 +02:00
Juan Batiz-Benet
c13f11bbfe varint-prefixed mvariable sized addrs 2015-01-20 14:16:49 -08:00
Juan Batiz-Benet
f529ec7884 added http, https, and ipfs protocols 2015-01-17 21:12:54 -08:00
Juan Batiz-Benet
0d7b54ba43 err correction 2015-01-09 05:57:03 -08:00
Juan Batiz-Benet
17f4666d01 Protocols now value 2015-01-09 05:37:39 -08:00
Juan Batiz-Benet
ed277d56f8 better errs, and test parsing 2015-01-09 05:30:33 -08:00
Juan Batiz-Benet
59f6cfc921 implement varints + add utp, udt 2014-11-19 13:02:06 -08:00
Juan Batiz-Benet
4a5dcd3a4d Split: added split method 2014-11-04 23:20:17 -08:00
Juan Batiz-Benet
2a572df05c ignore trailing slashes 2014-10-10 20:40:51 -07:00
Juan Batiz-Benet
a4b7753f74 use constants, fix ipv6 bug 2014-09-13 04:47:37 -07:00
Juan Batiz-Benet
b90678896b go lint + unexporting some funcs 2014-09-11 10:47:56 -07:00
Juan Batiz-Benet
6ee313e6db do not accept invalid-start multiaddrs 2014-09-11 10:45:20 -07:00
Juan Batiz-Benet
9033141fca gofmt 2014-07-04 11:21:39 -07:00
Juan Batiz-Benet
3855a29d4e en/decapsulation 2014-07-04 00:48:33 -07:00
Juan Batiz-Benet
3f5984c93d panic handler + construct 2014-07-03 23:52:58 -07:00
Juan Batiz-Benet
47a6842e35 rm convert 2014-07-03 23:44:09 -07:00
Juan Batiz-Benet
c5510ff4b8 string <> []byte 2014-07-03 23:42:24 -07:00