Commit Graph

70 Commits

Author SHA1 Message Date
Max
9b2d97f96b
cli: add keygen command (#118)
* cli: factor out key generation

* cli: add keygen command
2026-06-12 23:25:17 +02:00
Asif Khan
708121bde0
Add init name flag (#107) 2026-04-21 19:55:14 +02:00
Roland Urbano
2e36bcdce6
Enhanced Logging with ipfs/go-log (#90)
* Added ipfs/go-log and updated up.go

Use ipfs/go-log over fmt.Println

Fixed more log usages with go-log

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

log: refactor log usage to provide module global logger with configurable log level

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

Refactored logger initialization for modules

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

Removed object member loggers

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

* Implemented logging with ipfs/go-log

logging: fix logger level config

Co-authored-by: Max <max@privatevoid.net>

Update svc/network.go

Co-authored-by: Max <max@privatevoid.net>

removed static info log level constant

Co-authored-by: Max <max@privatevoid.net>

Update dns/server.go

Co-authored-by: Max <max@privatevoid.net>

Update dns/server.go

Co-authored-by: Max <max@privatevoid.net>

Update rpc/server.go

Co-authored-by: Max <max@privatevoid.net>

Applied MR suggestions

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

Enhanced logging

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>

* update vendorHash

* go fmt

---------

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>
Co-authored-by: Max <max@privatevoid.net>
2025-12-07 19:31:49 +00:00
Max
e994260bdb
Node refactor (#88)
* node: extract most of the logic from cli/up.go

* node: close interface after bringing it down

* synchronize shutdowns with a WaitGroup

* p2p: use Connect instead of DialPeer

* rpc: defer Close
2025-11-30 14:28:51 +01:00
Jörg Thalheim
fc42d2eec0
Fix various linting issues. (#68)
* remove unused vars/functions

* all constants need explicit types

See https://staticcheck.dev/docs/checks/#SA9004

* cli/up: add missing error checks

* server: fix potential race condition of chown when binding listening socket

a process waiting for the socket appear may bind before we can apply
filesystem permissions.
2024-11-17 17:20:01 +00:00
Max
4d8e966abc
cli: color p2p-circuit addresses gray in status output (#64) 2024-11-12 09:28:50 +01:00
Max
f8393c418e
Generate config struct from NixOS options (#33)
* add clan.lol jsonschema library

* move devshell definition, add go-jsonschema package

* use generated schema for config file parsing

* include schema generation in build process
2024-06-02 17:03:02 +00:00
Max
6da857d6df
use individual service network routes (#24) 2024-05-19 01:10:44 +02:00
Max
b32d496d21
Service Network (#15)
* implement foundation for service network

* update vendorHash

* extract MkNetID

* look up peers by NetID

* implement proxy for remote services

* support remote services (client side)

* create Proxy abstraction

* implement TCPServiceProxy

* add a wrapper to make streams implement net.Conn

* support remote services (server side)

* implement services in config

* create proxies from multiaddrs

* register services defined in config

* add description field to proxy

* resolve service hostnames
2024-05-14 17:14:42 +02:00
Max
88705394c0
IPv6 (dual stack) (#14)
* assign and route ipv6 addresses

* dns: support A and AAAA records

* rpc: include v6 routes in route show
2024-05-11 23:04:52 +02:00
Max
3f95731fb7 allocate multiple packets 2024-04-28 00:21:23 +02:00
Max
0e857a45a0 print node names in route show 2024-04-28 00:21:23 +02:00
Max
f80acc8ef0 lock reuseable streams 2024-04-28 00:21:23 +02:00
Max
421422896a sendPacket in parallel 2024-04-28 00:21:23 +02:00
Max
491255be1c prevent connection loops 2024-04-28 00:21:23 +02:00
Max
8241313877 init: print simple config snippet for peer entry 2024-04-28 00:21:08 +02:00
Max
89de5fc5ba don't segfault when reading config fails 2024-04-28 00:21:08 +02:00
Max
77f2b4aa9f config and CLI overhaul
- remove unnecessary CLI args
- remove down command
2024-04-28 00:20:35 +02:00
Max
4a3de64fd3 implement route add, route del 2024-04-28 00:20:30 +02:00
Max
7c780d9d6b a bunch of stuff at once
- dynamic addressing
- DNS
- switch to cidranger for routing
- auto add routes to tun device
- pex: shut up
2024-04-28 00:19:31 +02:00
Max
1db87a19b6 ban yaml from existence 2024-04-28 00:19:31 +02:00
Max
3cc3516d83 remove manual routing support 2024-04-28 00:19:31 +02:00
Max
74b15a7e7b elaborate on why opening a packet stream failed 2024-04-28 00:19:31 +02:00
Max
930fb55675 enable optional prometheus metrics endpoint 2024-04-28 00:19:31 +02:00
Max
371475c30d add --interface, implement for commands: peers, status 2024-04-28 00:18:44 +02:00
Max
4c3da2c944 use RoutedHost with combined PeX + DHT routing 2024-04-28 00:18:25 +02:00
Max
b72a9874f9 use native libp2p relay 2024-04-28 00:18:25 +02:00
Max
91445e8578 support manually configuring relays 2024-04-28 00:18:25 +02:00
Max
c1127bb94e support packet relaying 2024-04-28 00:18:25 +02:00
Max
6301760c1b implement route metrics service 2024-04-28 00:18:25 +02:00
Max
1b9bc3be8d update config file format 2024-04-28 00:17:29 +02:00
Max
a868352121 basic PeX implementation 2024-04-28 00:17:29 +02:00
Max
9c08fdf29b implement RPC client and new CLI commands 2024-04-28 00:17:29 +02:00
Max
ae84f2d076 implement RPC server 2024-04-28 00:17:29 +02:00
Max
066e656481 never daemonize 2024-04-28 00:17:29 +02:00
Max
77264e214a log connects and disconnects properly 2024-04-28 00:17:27 +02:00
Max
54efd63976 use some ConnManager features 2024-04-28 00:17:27 +02:00
Max
862cfff6c5 remove some deprecated packages, bump go-libp2p 0.23.2 -> 0.23.4 2024-04-28 00:17:24 +02:00
Max
865513707e use libp2p built-in DHT bootstrap logic 2024-04-28 00:16:02 +02:00
Max
3d13a9bd9e remove update command
We have Nix for installing software ;)
2024-04-28 00:16:02 +02:00
Max
72b5308353 apply https://github.com/hyprspace/hyprspace/pull/95 2024-04-28 00:16:02 +02:00
Max
2c475fd35c add rebootstrap support 2024-04-28 00:16:02 +02:00
Max
eb884b46de improve logging 2024-04-28 00:16:02 +02:00
Max
a5a00c6343 reword ready message 2024-04-28 00:16:02 +02:00
Max
1cb298d5b4 rework discovery code 2024-04-28 00:16:02 +02:00
Max
05cf6cac5c trigger discovery again on failed connection 2024-04-28 00:16:01 +02:00
Max
0ac52cc0a7 self-destructing streams 2024-04-28 00:16:01 +02:00
Max
fee6a02c6c use multibase-encoded private keys 2024-04-28 00:16:01 +02:00
Max
1199bc211f dial peers faster 2024-04-28 00:16:01 +02:00
Alec Scott
0f7a7c336f Add documentation to TUN library 2022-02-03 10:23:52 -07:00