$ git clone https://socialnetwork.ion.nu/socialnetwork.git
commit 03c0d3851d96a7ceebe29dcc4e6c3a9c926fb199
Author: Alicia <...>
Date: Mon Jun 4 22:15:53 2018 +0200
socialtest: added a 'bootstrap' command.
diff --git a/socialtest.c b/socialtest.c
index 52271d7..9ba0792 100644
--- a/socialtest.c
+++ b/socialtest.c
@@ -1,6 +1,6 @@
/*
Socialnetwork, a truly peer-to-peer social network (in search of a better name)
- Copyright (C) 2017 alicia@ion.nu
+ Copyright (C) 2017-2018 alicia@ion.nu
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
@@ -254,6 +254,27 @@ int main(int argc, char** argv)
// Note: we're also setting the privacy setting that will be referenced for future friend additions/removals from this circle, which might not be readily apparent. The generated update that sets the name (and privacy) of the circle is always private.
social_setcircle(circle, buf, &privacy);
}
+ else if(!strncmp(buf, "bootstrap ", 10))
+ {
+ peer_bootstrap(sock, &buf[10]);
+ }
+ else if(!strcmp(buf, "help"))
+ {
+ printf("Available commands:\n"
+ "lsfriends (connected users)\n"
+ "lsupdates [<ID>]\n"
+ "loadmore [<ID>]\n"
+ "addfriend <ID>\n"
+ "update post\n"
+ "update field <name>\n"
+ "exportpeers <filename>\n"
+ "lscircles\n"
+ "privacy\n"
+ "privacy flag \n"
+ "privacy circle \n"
+ "setcircle <circle ID>\n"
+ "bootstrap <host>:<port>\n");
+ }
else{printf("Unknown command '%s'\n", buf);}
}
if(pfd[1].revents) // UDP