Commit Graph

151 Commits

Author SHA1 Message Date
Lars Gierth
05cb7a1bc2 metrics: add transport label to p2p_peers_total
Gives us per-transport peers counts:

	ipfs_p2p_peers_total{transport="/ip4/tcp"} 25
	ipfs_p2p_peers_total{transport="/ip6/tcp"} 13
	ipfs_p2p_peers_total{transport="/ip6/udp/utp"} 17

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-05-18 22:30:52 +02:00
Jeromy
e22345ae65 update go-libp2p 3.2.2, nil maddr fixes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-17 10:23:10 -07:00
Jeromy
23c8ed93fd update libp2p to v3.2.1
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-16 11:22:36 -07:00
Jeromy Johnson
7732411475 Merge pull request #2672 from kpcyrd/feature/cache-control-immutable
Set Cache-Control immutable
2016-05-13 16:01:43 -07:00
Jeromy
a657ccf6c0 update deps to introduce yamux hang fix
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-13 13:42:46 -07:00
kpcyrd
c2a3e3169d Set Cache-Control immutable
Given that /ipfs/ resources never change, we can easily benefit from this
new cache control extension.

Support for this is about to land in Firefox 49:

https://bugzilla.mozilla.org/show_bug.cgi?id=1267474

For more details, there is a good blogpost about this here:

https://bitsup.blogspot.de/2016/05/cache-control-immutable.html

This header is ignored by clients that don't support it.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2016-05-12 12:16:42 +02:00
Jeromy
6359dc9d5e update libp2p with go-multiaddr and go-stream-muxer updates
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-05-10 16:06:28 -07:00
Hector Sanjuan
57b494a70c Update go-log to 1.1.0 and fix calls to go-log.Uuid
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2016-05-04 23:17:21 +02:00
Jeromy
cffec77cea update libp2p with utp dep
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-04-27 14:10:54 -07:00
Lars Gierth
00ec976e1d Use extracted go-libp2p-crypto, -secio, -peer packages
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-16 21:48:06 -07:00
Lars Gierth
907f4fadbd Update go-libp2p
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-16 21:23:47 -07:00
Lars Gierth
caec086c28 metrics: add prometheus back
With a proper IpfsCollector object and tests, this time.
The collector object makes it easy to add further metrics,
like e.g. bitswap wants/provs.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-11 19:33:16 -07:00
Jeromy
bdc5456d52 update libp2p dep to fix hanging listeners problem
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-11 12:52:54 -07:00
Jeromy
8f3a51ac42 switch to new libp2p with mss crypto
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-07 15:55:41 -07:00
Lars Gierth
09937f84b6 gateway: enforce allowlist for path prefixes
The gateway accepts an X-Ipfs-Path-Prefix header,
and assumes that it is mounted in a reverse proxy
like nginx, at this path. Links in directory listings,
as well as trailing-slash redirects need to be rewritten
with that prefix in mind.

We don't want a potential attacker to be able to
pass in arbitrary path prefixes, which would end up
in redirects and directory listings, which is why
every prefix has to be explicitly allowed in the config.

Previously, we'd accept *any* X-Ipfs-Path-Prefix header.

Example:

We mount blog.ipfs.io (a dnslink page) at ipfs.io/blog.

nginx_ipfs.conf:

    location /blog/ {
        rewrite "^/blog(/.*)$" $1 break;
        proxy_set_header Host blog.ipfs.io;
        proxy_set_header X-Ipfs-Gateway-Prefix /blog;
        proxy_pass http://127.0.0.1:8080;
    }

.ipfs/config:

    "Gateway": {
        "PathPrefixes": ["/blog"],
        // ...
    },

dnslink:

    > dig TXT _dnslink.blog.ipfs.io
    dnslink=/ipfs/QmWcBjXPAEdhXDATV4ghUpkAonNBbiyFx1VmmHcQe9HEGd

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-04-04 16:31:57 -04:00
Jeromy
9f75ac4d75 update utp and cleanup more godeps along the way
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-29 19:18:14 -07:00
dignifiedquire
c0ec80215e feat: Update the webui to work with the latest changes in 0.4
License: MIT
Signed-off-by: dignifiedquire <dignifiedquire@gmail.com>
2016-03-14 20:49:18 +01:00
Jeromy
97d583dd8f update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-09 09:53:19 -08:00
Jeromy Johnson
91c6f0f3db Merge pull request #2359 from mildred/ipld
Simplify merkledag package interface to ease IPLD inclusion
2016-03-04 12:02:37 -08:00
Mildred Ki'Lya
b3c9922c7b merkledag: Remove unused AddRecursive and RemoveRecursive
License: MIT
Signed-off-by: Mildred Ki'Lya <mildred-pub.git@mildred.fr>
2016-03-04 07:48:34 +01:00
Stephen Whitmore
1ee3645a49 adds tests for gateway url escaping
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-03-02 16:46:49 -08:00
Adrian Ulrich
ec7623bb81 Use net/url to escape paths in web-ui
License: MIT
Signed-off-by: Adrian Ulrich <adrian@blinkenlights.ch>
2016-03-02 15:46:58 -08:00
Jeromy
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Jeromy
3faedb5208 remove goprocess from godeps, use gx vendored one
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Robert Carlsen
5367ee76d0 fix another panic where CloseNotify was called from wrong goroutine
panic: net/http: CloseNotify called after ServeHTTP finished

    goroutine 180 [running]:
    net/http.(*response).CloseNotify(0xc8220684e0, 0x0)
        /home/r/go/src/net/http/server.go:1535 +0x9d
    github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/prometheus/client_golang/
        /home/r/src/github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/prome
    github.com/ipfs/go-ipfs/core/corehttp.(*gatewayHandler).getOrHeadHandler.func1(0x7
        /home/r/src/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go:119 +
    created by github.com/ipfs/go-ipfs/core/corehttp.(*gatewayHandler).getOrHeadHandle
        /home/r/src/github.com/ipfs/go-ipfs/core/corehttp/gateway_handler.go:123 +

License: MIT
Signed-off-by: Robert Carlsen <rwcarlsen@gmail.com>
2016-02-09 11:09:43 -06:00
Jeromy
2263539c1c do that last thing again
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 15:37:39 -08:00
Jeromy
c0101c0c4b update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 10:19:50 -08:00
Jeromy
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
Jeromy
3d0aa592ec go-keyspace dep from libp2p added
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:08 -08:00
Jeromy
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
Marcin Rataj
8651143344 Gateway: add support for HTTP OPTIONS request type
OPTIONS is a noop request that is used by the browsers
to check if server will accept cross-site XMLHttpRequest
(indicated by the presence of CORS headers)

Before this fix user could enable CORS headers in the Gateway config,
but XHR failed due to the lack of support for OPTIONS request type
(as described in https://git.io/vzgGe)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2016-01-21 23:22:54 +01:00
Etienne Laurin
a83c3a334f use ServeContent for index.html
One advantage is that it sets the Content-Type header correctly.

License: MIT
Signed-off-by: Etienne Laurin <etienne@atnnn.com>
2016-01-12 08:22:55 -08:00
rht
743f3edcbb strings.Split -> path.SplitList
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
rht
ffd859232d Replace strings.Join(elms, "/") with path.Join(elms)
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
Jeromy
bf955f3560 add closenotify and large timeout to gateway
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
Jeromy
efac042e82 rework editor creation and finalization
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
Jeromy
b12ee40aba implement mark and sweep GC
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

dont GC blocks used by pinner

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

comment GC algo

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

add lock to blockstore to prevent GC from eating wanted blocks

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

improve FetchGraph

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

separate interfaces for blockstore and GCBlockstore

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

reintroduce indirect pinning, add enumerateChildren dag method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
Tommi Virtanen
c9ce2e724a Simplify Pinner interface by folding ManualPinner into Pinner
Pinner had method GetManual that returned a ManualPinner, so every
Pinner had to implement ManualPinner anyway.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
dignifiedquire
ab61ef2024 feat: Update to the latest version of the webui
License: MIT
Signed-off-by: Friedel Ziegelmayer <dignfiedquire@gmail.com>
2016-01-12 16:41:58 +01:00
Jeromy
8ad1141436 fixup panic catching in http handler funcs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-12-28 04:18:56 -08:00
Dominic Della Valle
a6eb32b77c Fix path parsing for add command
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
2015-12-22 10:59:17 -05:00
Juan Benet
0f39687fb6 Merge pull request #2019 from ipfs/Dignifiedquire-fix/access-controll-headers
Dignifiedquire fix/access controll headers
2015-12-09 00:55:06 -08:00
Jeromy
bdc1b27c51 hard code things
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-30 14:43:37 -08:00
Lars Gierth
3e03ae8f77 gateway: add CurrentCommit to /version
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-25 02:51:05 +01:00
Lars Gierth
8ab0ddfe44 gateway: add tests for /version
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-25 02:51:05 +01:00
Lars Gierth
021ef43418 gateway: add path prefix for directory listings
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-16 07:00:57 +01:00
Jeromy
2f5563b3c0 fix log hanging issue, and implement close-notify for commands
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:28 -08:00
Jeromy
94bdce63a7 vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
Juan Batiz-Benet
b675bfc595 webui updated to disable logs
to: /ipfs/QmR9MzChjp1MdFWik7NjEjqKQMzVmBkdK3dz14A6B5Cupm

https://github.com/ipfs/webui/pull/91

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-10-31 01:22:42 -04:00
Juan Benet
f703b2c375 Merge pull request #1886 from ipfs/fix/ThatPut
fixing putHandler
2015-10-31 01:03:33 -04:00