Commit Graph

3366 Commits

Author SHA1 Message Date
Steven Allen
978091a626 feat: implement peering service
MVP for #6097

This feature will repeatedly reconnect (with a randomized exponential backoff)
to peers in a set of "peered" peers.

In the future, this should be extended to:

1. Include a CLI for modifying this list at runtime.
2. Include additional options for peers we want to _protect_ but not connect to.
3. Allow configuring timeouts, backoff, etc.
4. Allow groups? Possibly through textile threads.
5. Allow for runtime-only peering rules.
6. Different reconnect policies.

But this MVP should be a significant step forward.
2020-05-25 20:24:41 -07:00
Steven Allen
707b5506ba
Merge pull request #7360 from ipfs/feat/better_dir_etag
Include the git blob id of the dir-index bundle in the ETag
2020-05-25 13:21:55 -07:00
Steven Allen
c17bcbd4e0
Merge pull request #7340 from ipfs/feat/boostrap-when-low
feat: bootstrap in dht when the routing table is empty
2020-05-25 13:01:08 -07:00
Peter Rabbitson
2d5f8b4ebe Include the git blob id of the dir-index bundle in the ETag
While the content of raw files retrieved via the gateway should never
change, the look and feel of the directory index can and will change
between versions of go-ipfs.

Incorporate the hash of assets/bindata.go into the ETag when appropriate
2020-05-25 18:42:07 +00:00
Steven Allen
ff17485cbb feat: bootstrap in dht when the routing table is empty
Otherwise, we could end up with only DHT clients and never re-bootstrap.

I've left the default go-ipfs bootstrapping code in for now as it's technically
possible to disable the DHT entirely.
2020-05-24 22:55:30 -07:00
Steven Allen
4714c0cecc feat: enable QUIC by default
But only if private networks are disabled.
2020-05-22 13:48:58 -07:00
Steven Allen
03c1f769d7 fix: remove strict signature verification option
Signature verification is now always strict.
2020-05-22 13:48:26 -07:00
@RubenKelevra
2dc1f691f1 quic: remove experimental status and add it to the default config 2020-05-22 04:54:19 +02:00
Steven Allen
6a2fe0a20d fix: support directory listings even if a 404 page is present
fixes https://github.com/ipfs/go-ipfs/pull/4233#issuecomment-631454543

Basically, there's a trade-off here:

1. We can support directory listings while supporting 404 pages (this PR).
2. If a 404 page is present, directory listings don't work.

Given that option 1 is more flexible and users shouldn't be _too_ confused if
they land on a directory with no index.html page, I've gone with that option.
2020-05-20 19:11:50 -07:00
Steven Allen
0a8b2f117b chore: update deps
And remove use of mafilter library (now rolled into go-multiaddr).
2020-05-20 17:51:04 -07:00
Steven Allen
febdc3bed6
Merge pull request #7335 from ipfs/chore/update-libp2p
chore: update libp2p
2020-05-20 17:42:15 -07:00
Steven Allen
69ccf99915 chore: update libp2p 2020-05-20 16:56:22 -07:00
Peter Wu
d4952f2a73 fix(gateway): ensure directory listings have Content-Type text/html
Files already have an explicit Content-Type set. Be sure to do this for
directory listings as well to avoid a fallback to autodetection in
net/http. That fallback fails when a ResponseWriter is installed that
performs compression.
2020-05-20 15:20:33 +02:00
Peter Wu
7c7888c4db fix(gateway): fix status code for HEAD on redirects
Report a consistent status code for HEAD requests that end up in a
redirect.
2020-05-20 14:03:58 +02:00
JP Hastings-Spital
dfceafdbd3 Gateway renders pretty 404 pages if available
In the same way that an `index.html` file is rendered, if one is present, when the
requested path is a directory, now an `ipfs-404.html` file is rendered if
the requested file is not present within the specified IPFS object.

`ipfs-404.html` files are looked for in the directory of the requested path and each
parent until one is found, falling back on the well-known 404 error message.

License: MIT
Signed-off-by: JP Hastings-Spital <jphastings@gmail.com>
2020-05-19 14:41:21 -07:00
Steven Allen
5751917f49 feat: add a stats dht command
Currently, it just prints out the routing tables.
2020-05-14 23:32:18 -07:00
Steven Allen
3339ce3b0e
Merge pull request #6774 from MichaelMure/pincoreapi
pin: implement pin/ls with only CoreApi
2020-05-05 18:49:19 -07:00
Michael Muré
6388f5a1c2
pin: honor the context more accurately 2020-05-05 14:19:38 +02:00
Michael Muré
6ef190f5a6 pin: implement pin/ls with only CoreApi 2020-05-04 18:02:50 -07:00
Steven Allen
0189e42bcb
Merge pull request #7061 from RubenKelevra/patch-1
README.md: typo
2020-05-04 17:53:52 -07:00
Gowtham G
e93f2002f5 optimize import order 2020-05-02 14:19:01 +05:30
Gowtham G
214d29ebf8 #7252 - print error message 2020-05-01 22:37:20 +05:30
Gowtham G
9201b1dde6 #7252 - read content directly instead of sending 512bytes 2020-05-01 20:29:32 +05:30
Gowtham G
2e87ac88a3 Fixes #7252 - Uses gabriel-vasile/mimetype to support additional content types 2020-05-01 12:19:36 +05:30
RubenKelevra
a048008c5b fix typo in command texts 2020-04-30 20:36:00 +02:00
Steven Allen
46ae021733 feat: show the absolute path every time
Even for dnslink websites.

fixes https://github.com/ipfs/go-ipfs/issues/7205
2020-04-26 17:19:17 -07:00
Steven Allen
d8bc5c991e feat: always show the hash
Previously, we only showed this /ipns paths. However, knowing the hash of the
current directory is useful regardless.
2020-04-26 16:09:02 -07:00
Dominic Della Valle
048adadb5e reformat log helptext (80 char width) 2020-04-24 12:17:00 -04:00
Dominic Della Valle
05d0573e02 update log helptext to match actual levels 2020-04-24 12:13:34 -04:00
Steven Allen
5d13ac370b fix: fix duplicate block issue in bitswap
1. Increase broadcast timeout.
2. Fix use of sessions when pinning.

This also includes some bitswap changes to reduce some memory allocations and
optimize some hot spots.
2020-04-23 00:31:06 -07:00
Steven Allen
9033ba9cad
Merge pull request #7181 from rex4539/fix-typos
Fix typos and cleanup
2020-04-20 21:43:47 -07:00
Dimitris Apostolou
1e437c7e97
Fix typos and cleanup 2020-04-20 22:00:01 +03:00
@RubenKelevra
8a85c0a344 merge conflicts with upstream 2020-04-18 13:11:56 +02:00
Henrique Dias
135c451997
feat: webui 2.7.5 2020-04-17 20:10:21 +01:00
Marcin Rataj
8290ec11c3
fix: subdomain redirect for dir CIDs
Closes #7164

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-04-15 23:50:53 +02:00
Steven Allen
1f23fc000c feat: add autonat config options
1. Enable AutoNATService on _all_ nodes by default. If it's an issue, we can
disable it in RC3 but this will give us the best testing results.
2. Expose options to configure AutoNAT rate limiting.
2020-04-14 20:54:58 -07:00
Marcin Rataj
7d397ac219
feat: webui v2.7.4
(supersedes v2.7.3)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-04-14 17:51:25 +02:00
Steven Allen
28e31e17a8
Merge pull request #7127 from ipfs/feat/dual-dht
feat: introduce the dual WAN/LAN DHT
2020-04-13 19:01:12 -07:00
Steven Allen
d0d508b2e1 fix: fix 'dht query' command to actually return the closest peers
Then improve the tests such that they actually work.
2020-04-13 17:42:03 -07:00
Steven Allen
b64d17b924 properly expose dual dht 2020-04-13 15:58:12 -07:00
Steven Allen
8679954f9b chore: update flatfs
And remove retry logic. This was flatfs specific and we've moved the logic down
into flatfs itself.

This update:

* Retries in more cases when we run out of file descriptors.
* Ensures we don't leak temporary files on batch put.
2020-04-10 16:42:29 -07:00
Steven Allen
e55c688fca fix: run tests in "dht server" mode
Otherwise, we'd need to wait a delay on start for nodes to start becoming
servers.
2020-04-09 23:07:27 -07:00
Steven Allen
bb08f7fe56 assign public IP addresses for tests that need them 2020-04-09 21:41:42 -07:00
Steven Allen
8a002250dc feat: introduce the dual WAN/LAN DHT
And only join the WAN DHT if we're publicly reachable.
2020-04-09 21:41:38 -07:00
Peter Rabbitson
fbe40883e6 Remove PresentInImport tracking as per conversation 2020-04-08 14:54:49 -07:00
Peter Rabbitson
90c58d6cac Dag import functionality only ( no progress )
This still works over "loosely defined" .car files
Please refer to the sharness tests for extra info

We can tighten this up if the sentiment is "Postel was wrong"
2020-04-08 14:54:49 -07:00
Peter Rabbitson
1a85fddfeb For now remove export from the gateway whitelist 2020-04-08 14:54:49 -07:00
Peter Rabbitson
4772ca6134 Add simple byte-counting export progress-bar 2020-04-08 14:54:49 -07:00
Peter Rabbitson
ae5a9e0549 Bring back pipe closure from other end 2020-04-08 14:54:49 -07:00
Peter Rabbitson
380bffa146 Move commented out code together 2020-04-08 14:54:49 -07:00