Commit Graph

66 Commits

Author SHA1 Message Date
DavHau
6f3c85a1ef
feat: add mDNS peer discovery for LAN environments (#102)
Co-authored-by: Max <max@privatevoid.net>
2026-06-22 14:01:34 +00:00
Max
7e03fcc1d5
make bootstrap peers configurable (#111) 2026-06-18 22:13:10 +00:00
Max
38d5be9aaf
Make packet streams bidirectional (#121) 2026-06-18 22:11:32 +00:00
Max
90861d16a8
p2p: actually apply filters in FilterGater (#119) 2026-06-08 22:45:07 +02:00
Roland Urbano
f0c30f0769
Add filterPrivateAddresses option to block RFC1918/link-local dials (#101)
* Add filterPrivateAddresses option to block RFC1918/link-local dials (#22)

* Apply suggestion from @max-privatevoid

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

* Simplified config parsing

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

* NewRecursionGater: return connmgr.ConnectionGater

* implement MultiGater

* implement FilterGater

* use MultiGater for private address filtering

---------

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>
Co-authored-by: Max <max@privatevoid.net>
2026-05-18 22:20:44 +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
5f1093ac88
reserve 2 relay address slots for unlimited relays (#43) 2024-06-28 14:01:38 +00:00
Max
106ef293ad
use any peer as a relay (#29) 2024-05-25 00:31:45 +02:00
Max
491255be1c prevent connection loops 2024-04-28 00:21:23 +02:00
Max
724f94a288 add another bootstrap peer 2024-04-28 00:21:23 +02:00
Max
5d61ae5eb6 implement delegated HTTP routing, set user agent string 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
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
22245dfff2 imagine 2024-04-28 00:19:31 +02:00
Max
3cc3516d83 remove manual routing support 2024-04-28 00:19:31 +02:00
Max
b7343e009b new bootstrap peers 2024-04-28 00:19:31 +02:00
Max
6df39331aa EnableAutoRelay -> EnableAutoRelayWithPeerSource 2024-04-28 00:19:28 +02:00
Max
049a1436f5 io/ioutil -> io 2024-04-28 00:19:26 +02:00
Max
a26ff11b86 bump dependencies and Go version, switch to quic-v1 addresses 2024-04-28 00:18:53 +02:00
Max
29a27318c8 close PeX streams correctly 2024-04-28 00:18:39 +02:00
Max
b83d9d2f2b bump dependencies and Go version
- Go: 1.18 -> 1.19
- go-libp2p: 0.23.4 -> 0.26.3
- go-libp2p-kad-dht: 0.20.0 -> 0.21.1
- go-multiaddr: 0.7.0 -> 0.8.0
- go-multibase: 0.1.1 -> 0.2.0
2024-04-28 00:18:25 +02:00
Max
65498e50f2 PeX: return all known addresses for peer 2024-04-28 00:18:25 +02:00
Max
1a50db78ce cancel parallel routing shortly after finding first address 2024-04-28 00:18:25 +02:00
Max
9e2cb3309b PeXService: immediately connect to discovered peers 2024-04-28 00:18:25 +02:00
Max
a1b6821481 add new bootstrap addresses 2024-04-28 00:18:25 +02:00
Max
f4d617c249 fix PeXRouting 2024-04-28 00:18:25 +02:00
Max
4c3da2c944 use RoutedHost with combined PeX + DHT routing 2024-04-28 00:18:25 +02:00
Max
fb45687c1a allow using unlimited relay to connect to external peers 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
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
2f085c8a26 only grab connectable addresses from IPFS API 2024-04-28 00:17:29 +02:00
Max
c2658c3b8c slightly less spammy discovery 2024-04-28 00:17:29 +02:00
Max
a868352121 basic PeX implementation 2024-04-28 00:17:29 +02:00
Max
cb633965b7 switch to DHT client mode 2024-04-28 00:17:29 +02:00
Max
77264e214a log connects and disconnects properly 2024-04-28 00:17:27 +02:00
Max
f12103dd97 make pnet optional 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
6ea3107b6c implement AutoRelay 2024-04-28 00:16:02 +02:00
Max
865513707e use libp2p built-in DHT bootstrap logic 2024-04-28 00:16:02 +02:00
Max
957d8e641a remove unused import 2024-04-28 00:16:02 +02:00
Max
b90ed0cd2a don't die if initial bootstrap fails 2024-04-28 00:16:02 +02:00
Max
86df233b28 force reconnection 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
0d3d781f36 inform about bootstrap peer count 2024-04-28 00:16:02 +02:00
Max
1cb298d5b4 rework discovery code 2024-04-28 00:16:02 +02:00