Commit Graph

28 Commits

Author SHA1 Message Date
mirsal 870c27261c Send beacons to the all-nodes link-local multicast group 2021-04-01 10:49:45 +00:00
mirsal eeefc130ed Merge pull request 'Peer discovery broadcast' (#5) from mirsal/cosmoline:broadcast into main
Reviewed-on: ryzokuken/cosmoline#5
2021-04-01 04:52:50 +00:00
mirsal 0cfc123011 Quick and dirty peer discovery broadcast mock implementation
* Use `async_std::task` for network loops
 * Send the generated public key over ipv4 udp broadcast frames

(peer discovery is not functional yet, although multiple instances
connected to the same link can now talk to each other, so yay.)
2021-03-31 22:59:23 +00:00
mirsal 8be534c086 Listen on IPv6 for peer discovery broadcasts
The Future
2021-03-31 21:31:04 +00:00
mirsal 5d351ebc00 Merge pull request 'Cleanup and refactor Node handling' (#4) from refactor-node into main
Reviewed-on: ryzokuken/cosmoline#4
2021-03-31 10:43:57 +00:00
Ujjwal Sharma 77387edd0d
src: rename Node and methods 2021-03-31 16:10:04 +05:30
Ujjwal Sharma 53bd1c9e6c
src: move network types to new file 2021-03-31 12:31:29 +05:30
Ujjwal Sharma 4b2a20c581
src: improve Node handling 2021-03-31 12:04:50 +05:30
Ujjwal Sharma d46faad53e
src: implement base64 handling for PublicKey 2021-03-31 12:03:48 +05:30
mirsal 749cf151bf cosmetics: Remove unnecessary newlines between use blocks 2021-03-30 08:50:55 +00:00
mirsal 60cf753b7f main: Fix the main function return type 2021-03-30 08:45:33 +00:00
mirsal 3195de3d5f Switch to non-blocking asynchronous I/O with async_std
* main: add a basic main loop and make the network part async
 * keypair: do not block when writing the generated keyfile
 * keypair: Read the secret file asynchronously
2021-03-29 19:42:32 +00:00
mirsal 458ff680ec Add async_std dependencies
This commit adds the required dependencies for switching to async_std
for non-blocking asynchronous I/O
2021-03-29 19:37:09 +00:00
Ujjwal Sharma 800a80e560
Create LICENSE 2021-03-28 11:06:26 +05:30
Ujjwal Sharma 1f2635d845
src: add simple broadcast listening logic 2021-03-28 11:03:53 +05:30
Ujjwal Sharma 4111aed599
src: include warning in the secret file 2021-03-25 14:41:55 +05:30
Ujjwal Sharma c3fe4c7230
src: simplify file reading 2021-03-25 12:31:49 +05:30
Ujjwal Sharma 60f1978eed
src: write fresh keypair when generating 2021-03-25 12:26:55 +05:30
Ujjwal Sharma f2cfe7a056
src: move SSBKeypair to keypair.rs 2021-03-25 11:33:41 +05:30
Ujjwal Sharma ba1a5226d9
src: strip_suffix and tidy up 2021-03-25 11:25:00 +05:30
Ujjwal Sharma b6ddf5689c
options: improve description of config 2021-03-25 11:14:53 +05:30
Ujjwal Sharma 433139cfb1
src: allow users to specify custom path 2021-03-25 11:14:00 +05:30
Ujjwal Sharma 1937e1f8c5
src: refactor reading config to function 2021-03-25 11:10:21 +05:30
Ujjwal Sharma 4d32e8e55f
src: move reading and generation logic into trait 2021-03-22 11:36:53 +05:30
Ujjwal Sharma 2f44ee021d
src: add SSBKeypair trait 2021-03-22 11:20:42 +05:30
Ujjwal Sharma 5b29f9fc12
src: fix keypair problem 2021-03-22 11:09:12 +05:30
Ujjwal Sharma 2f159241fa
src: add basic options, config and secrets handling
- Handles basic options
- Reads from a config file
- Locates secrets
- Generates keypair if none exists
2021-03-21 00:05:13 +05:30
Ujjwal Sharma f6533c7a9f
meta: initial commit 2021-03-20 00:59:46 +05:30