diff -Naur surf-0.7/surf.c surf-0.7-new/surf.c | |
--- surf-0.7/surf.c 2015-12-19 14:59:30.000000000 +0000 | |
+++ surf-0.7-new/surf.c 2016-04-25 03:12:03.448015000 +0000 | |
@@ -837,6 +837,10 @@ | |
rp = realpath(uri, NULL); | |
u = g_strdup_printf("file://%s", rp); | |
free(rp); | |
+ } else if (g_str_has_prefix(uri, "ipfs://")) { | |
+ GRegex *regex; | |
+ regex = g_regex_new("^ipfs://", 0, 0, NULL); | |
+ u = g_regex_replace(regex, uri, -1, 0, "http://127.0.0.1:8080/ipfs/", 0, NULL); | |
} else { | |
u = g_strrstr(uri, "://") ? g_strdup(uri) | |
: g_strdup_printf("http://%s", uri); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
IPFS support for Suckless' Surf browser. Only works with
surf ipfs://Q...
and not for links inside content.