1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

2728 Commits

Author SHA1 Message Date
7aa4a83f2e addr: proper filter + subtract 2015-01-12 20:49:06 -08:00
ddd5c4faee p2p/net/swarm: fix connect self problems
This adds two checks after a successful conn.Dial
* if the remote peer is not who we wanted, close conn
* if the remove peer is outselves, close conn

(the second is redundant, but the codebase may evolve to
end up disabling the first check, so keeping the second
in place helps)

note:
Loopback addresses are actually sent out (they _have to be_,
in cases where there are >1 node in the same machine), so
many times when trying connections, nodes end up dialing
themselves.
2015-01-12 20:17:54 -08:00
81aff954d1 Merge pull request #544 from jbenet/fix/linklocal
dont send ip6 link local addrs
2015-01-12 19:54:10 -08:00
ceadfbe791 core: some logging for addresses 2015-01-12 19:15:02 -08:00
0cb0f27b68 bootstrap: print error when failed 2015-01-12 19:15:02 -08:00
7ec1a674e3 p2p/net/swarm: do not usre link local addrs 2015-01-12 19:15:02 -08:00
b36ca66f7c multiaddr update: recognize link local ip6 2015-01-12 19:15:02 -08:00
1389500461 Merge pull request #530 from jbenet/fix/diag
use conns to enumerate peers for network diagnostic
2015-01-12 11:38:37 -08:00
711bb6a054 peers: was not setting the map...
cc @whyrusleeping
2015-01-12 11:20:57 -08:00
ab824a51ff added debug printing to peerstream 2015-01-12 10:53:53 -08:00
a768e841bc update printout for net diag 2015-01-12 02:55:15 -08:00
6cb46a706c keep track of number of same connections 2015-01-12 02:55:15 -08:00
5d86ce1f71 adjust naming 2015-01-12 02:55:15 -08:00
98f9ee916e a better fix for duplicate peers in getPeers() 2015-01-12 02:55:15 -08:00
a2ec7f28dc use conns to enumerate peers for network diagnostic 2015-01-12 02:55:14 -08:00
cac7e025b8 daemon: log error from gateway 2015-01-12 01:31:59 -08:00
4afb4e090f daemon gateway async 2015-01-12 01:14:32 -08:00
b299c424da Merge pull request #541 from jbenet/gateway-server
Gateway Server
2015-01-12 01:10:21 -08:00
2c83cd5627 daemon: only try gateway addr if there 2015-01-12 01:05:15 -08:00
f215eee3ed gateway: cleaned up ServeHTTP func 2015-01-12 01:01:22 -08:00
ed41ac27fd daemon: refactor common parts of serve funcs 2015-01-12 01:01:21 -08:00
f39f3fe432 cmd/ipfs: Redirect requests to /webui to webui app 2015-01-11 22:15:33 -08:00
b5300f1d27 cmd/ipfs: Added gateway MIME type resolution 2015-01-11 22:15:33 -08:00
e25b08231c cmd/ipfs: Renamed 'ipfsHandler' to 'gatewayHandler' 2015-01-11 22:15:33 -08:00
cb84a376bd cmd/ipfs: Added an ipfsHandler constructor 2015-01-11 22:15:33 -08:00
64cb1b6bf8 CR updates
replaced H
moved internal errors into function.

Signed-off-by: Simon Kirkby <tigger@interthingy.com>
2015-01-11 22:15:33 -08:00
32823d2085 Static Website serving and listing
adds
 trailing slash redirection
 index.html return
 templated directory listing

Signed off : Simon Kirkby <tigger@interthingy.com>
2015-01-11 22:15:33 -08:00
9119435cb6 cmd/ipfs: Added gateway server to daemon 2015-01-11 22:15:32 -08:00
8603e8294f config: Added a gateway server address 2015-01-11 22:15:32 -08:00
cfbe44004b Merge pull request #531 from jbenet/ds-query
ds-query + ipfs refs local
2015-01-11 21:39:58 -08:00
6a8414bcfb blockstore Allkeys: ignore non multihash keys 2015-01-11 21:19:47 -08:00
0d059a3881 change block datastore prefix to "/b"
the prefix should be as short as possible, as this is a
per-block overhead.
2015-01-11 20:52:34 -08:00
7867e01c90 ipfs ping wording 2015-01-11 20:52:34 -08:00
f7941e9841 ping: use context 2015-01-11 20:52:34 -08:00
374a75b612 refs: tie the contexts together 2015-01-11 20:52:33 -08:00
322d6d0b05 cmds: use flushCopy instrad of copychunks
@mappum would this work?
2015-01-11 20:52:33 -08:00
ddd7540186 cmds: flush output on standard readers
cc @mappum can we do this for the copyChunks case?
2015-01-11 20:52:33 -08:00
0e2a554c8d cmds: fix error header output
using Header().Set after WriteHeader() has no effect.
cc @mappum
2015-01-11 20:52:33 -08:00
92e8a7bcd5 updated datastore for proper query handling
Queries now can be cancelled and the resources collected
2015-01-11 20:52:33 -08:00
c0cc951118 updated goprocess 2015-01-11 16:59:22 -08:00
708e47fcbc ipfs blocks local command
ipfs blocks local returns _all_ local refs. For now this is one
long op. future commits will make it async.
2015-01-11 16:59:22 -08:00
da976a5f21 blocks: AllKeys + tests 2015-01-11 16:59:22 -08:00
f9ca67ef04 updated datastore (Query) 2015-01-11 16:59:22 -08:00
dac2e449a2 Merge pull request #540 from jbenet/listener-fixes
fix listener problems
2015-01-11 13:43:27 -08:00
4e2431a0e4 p2p/net/swarm/listener: consume peerstream listeners 2015-01-11 12:55:33 -08:00
14b4c8223b updated peerstream: fixed hanging bug
peerstream would hang when it got many temporary errors.
temp errors should not count as an error. Now, it will
only exit when an error is not temporary.

I kept the acceptErr channel because it will no longer
cause a bad hang. The goroutine is exiting, so if it
blocks until acceptErr is read, it's fine. If users
launch tons of listers and see goroutines building up,
they know they should be reading + logging those.
2015-01-11 12:55:33 -08:00
b7a4e92121 p2p/net/conn/Listener: ignore conns failed to secure
Instead of erroring out, which would break the listener,
we instead log a message and continue. This is not an error,
the internet is a place with lots of probing + connection
failures.
2015-01-11 12:55:33 -08:00
4525269cd8 p2p/net/conn/listener: ignore certain errors
This should handle early breakages, where a failing connection
would take out the listener entirely.

There are probably other errors we should be handling here,
like secure connection failures.
2015-01-11 12:55:33 -08:00
387c0508fe p2p/net/conn/dialer: added Dialer field 2015-01-11 12:55:33 -08:00
fd3e0bb37c added temp-err-catcher 2015-01-11 12:55:33 -08:00