blob: cf25a4827e77905940dd28e95c455fd2b46d6663 (
plain)
1
2
3
4
5
6
7
8
9
10
|
(use '(org.gnu.clojure.gnunet bloomfilter core crypto exception filesharing hostlist inet iostream message parser peer tcp topology topology_events transport util))
(def random (java.security.SecureRandom.))
(def keypair (generate-rsa-keypair! random))
(def my-peer (new-peer {:public-key (.getPublic keypair) :private-key (.getPrivate keypair) :random random}))
(.start (:selector-thread my-peer))
(activate-topology! my-peer)
(activate-tcp! my-peer 5678)
(configure-inet-addresses! my-peer "tcp" (get-local-addresses) 5678)
(activate-filesharing! my-peer)
(download-hostlist! (partial admit-hello! my-peer) "http://localhost:58080")
|