Commit Graph

413 Commits

Author SHA1 Message Date
Jeromy e142795053 remove dependency on key 2015-11-13 16:18:52 -08:00
Jeromy d68ac4ce4a add gitignore 2015-11-11 16:44:54 -08:00
Jeromy 51fd99e363 extract from 0.4.0 2015-11-11 16:19:51 -08:00
Juan Benet 5a0162c75f Merge pull request #2 from WeMeetAgain/patch-1
Update README.md
2015-10-02 06:28:43 -04:00
Cayman 9f1acc3551 Update README.md
remove duplicate word: project
2015-10-01 14:39:39 -07:00
Juan Batiz-Benet 339bbdaab9 util metrics 2015-09-30 19:24:18 -04:00
Juan Batiz-Benet 2392434b6d rewrote imports to p2p 2015-09-30 19:24:00 -04:00
Juan Batiz-Benet 5dd1bd5e72 added docs 2015-09-30 19:08:00 -04:00
Juan Batiz-Benet 885d86219e move to p2p dir 2015-09-30 18:42:55 -04:00
Jeromy 983ed327ce extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
Jeromy 5d1b82954f cache nat port mappings for a short period of time
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-10 12:59:08 -07:00
Jeromy 78eb217249 WIP: quick fix to the NAT spam too many open fd's bug
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-10 12:45:36 -07:00
Jeromy 72696c9852 fix mock notification test
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-03 14:28:53 -07:00
rht c3858e87c1 Refactor FullMeshLinked and ConnectAll()
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-28 17:39:05 +07:00
Jeromy 0f3e3fe264 replace nodebuilder with a nicer interface
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

use NewNode instead of NewIPFSNode in most of the codebase

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

make mocknet work with node constructor better

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

finish cleanup of old construction method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

blockservice.New doesnt return an error anymore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

break up node construction into separate function

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add error case to default filling on node constructor

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-27 08:43:10 -07:00
rht fc3c6838fb Replace context.TODO in test files with context.Background
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:55:45 +07:00
Pavol Rusnak 71ef02797c remove elliptic.P224 usage
Fedora/RedHat distros comply with US patent law and remove this curve,
which makes it impossible to run ipfs with distro provided Golang.

License: MIT
Signed-off-by: Pavol Rusnak <stick@gk2.sk>
2015-08-03 16:41:10 +02:00
Jeromy c65f633de1 fix same test in swarm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-22 16:15:50 -07:00
Jeromy 57e6cb40bd fix race condition in notifications test
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-22 14:38:13 -07:00
Juan Benet 1879bb06e6 Merge pull request #1471 from heems/master
add transport from netsim and bandwidth to mocknet
2015-07-19 23:36:25 -07:00
Jeromy dff9366ef9 make timing tests actually not run under CI
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-19 16:11:06 -07:00
Karthik Bala 536c183b37 add transport logic to mocknet
License: MIT
Signed-off-by: Karthik Bala <karthikbala444@gmail.com>
2015-07-15 19:36:15 -07:00
Juan Batiz-Benet 034d422d3f Merge pull request #1473 from ipfs/godep-peerstream
update go-peerstream to newest version
2015-07-14 21:29:38 -07:00
Jeromy 7b6ff6f13c update go-peerstream to newest version
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-14 16:23:30 -07:00
Jeromy aae565ae89 making the daemon shutdown quicker
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-14 14:04:56 -07:00
Jeromy 5140ff6ba1 make ping its own protocol
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-13 19:19:25 -07:00
Juan Batiz-Benet cbbbda109a expose internal/pb packages.
we shouldn't use internal packages.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-10 11:08:49 -07:00
rht 0c742fd960 Make sure process context is set last
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-05 09:35:36 +07:00
rht 2a7f53f790 Use WithContextAndTeardown whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-05 09:19:06 +07:00
rht 316ba886a9 Change Process interface into object variable
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
rht e2481a24f3 Replace ctxgroup.ContextGroup -> goprocess.Process
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
Juan Batiz-Benet 8ad672a767 Merge pull request #1433 from ipfs/fix/addr-filter
add filters from config to addr filter in swarm
2015-07-02 17:00:36 -07:00
Lars Gierth bafe1b04fe swarm: fix peers_total metric
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-07-01 21:59:08 +02:00
Jeromy 1c1e389d89 add command to manipulate address filters and a sharness test for them
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 18:25:34 -07:00
Jeromy c5cdd981e2 add filters from config to addr filter in swarm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 15:03:56 -07:00
Lars Gierth 910ebfe9a5 swarm: export ipfs_p2p_peers_total metric
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-30 16:32:46 +02:00
Juan Batiz-Benet dae8ff49a1 fix swarm notif tests
they were failing intermittently

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-27 00:41:19 -07:00
Juan Batiz-Benet 1cef084e57 mock: fix notif test
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-27 00:18:12 -07:00
Juan Batiz-Benet 19f3395231 daemon option to optionally disable secio
This commit adds an option to turn off all encryption. This is a mode
used for tests, debugging, achieving protocol implementation interop,
learning about how the protocol works (nc ftw), and worst case
networks which _demand_ to be able to snoop on all the traffic.
(sadly, there are some private intranets like this...). (We should
consider at least _signing_ all this traffic.)

Because of the severity of this sort of thing, this is an
all-or-nothing deal. Either encryption is ON or OFF _fully_.
This way, partially unencrypted nodes cannot be accidentally left
running without the user's understanding. Nodes without encrypted
connections will simply not be able to speak to any of the global
bootstrap nodes, or anybody in the public network.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:43 -07:00
Jeromy 49b3571994 filter incoming connections and add a test of functionality
- add extra check to dialblock test
- move filter to separate package
- also improved tests
- sunk filters down into p2p/net/conn/listener

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-23 01:30:16 -07:00
Jeromy 9a3d287c80 broke filters out into a struct
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
Jeromy 89c1c82865 add in basic address dial filtering
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
rht b1702b084d Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
Juan Batiz-Benet f5a9795de0 p2p/net/identify: clump addr observers into groups
Different mutliaddrs is not enough. Nodes may share transports.
NAT port mappings will likely only work on the base IP/TCP port
pair. We go one step further, and require different root (IP)
addrs. Just in case some NATs group by IP. In practice, this is
what we want: use addresses only if hosts that are on different
parts of the network have seen this address.
2015-06-07 17:00:56 -07:00
Juan Batiz-Benet c754f21013 p2p/protocol/identify: dont double count observers
If the same peer observed the same address twice, it would be
double counted as different observations. This change adds a map
to make sure we're counting each observer once.

This is easily extended to require more than two observations,
but i have not yet encountered NATs for whom this is relevant.
2015-06-07 16:48:02 -07:00
rht 2acaf71e32 Swap all 'crypto/rand' rng in tests with 'math/rand' 2015-06-03 18:12:34 +07:00
Jeromy 9839d64fd8 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
Juan Batiz-Benet 78a6ca3f0c Merge pull request #1294 from rht/cleanup-tour
Cleanup tour
2015-05-29 16:59:17 -07:00
Henry c0474823e5 mdns: use my fork of hashicorp/mdns
upstream didn't respond to the request to update their dependencies
2015-05-29 01:30:44 +02:00
rht 1db542481a Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00