33 Commits

Author SHA1 Message Date
5eca56cd1e feat: implement HTTP gateway with auth, storage, and namespace isolation 2025-08-16 16:04:00 +03:00
271d7bbafb Switch node startup to YAML config files
Update Makefile, README, and .gitignore to use configs/ Add YAML config
loading to node main.go Add gopkg.in/yaml.v3 dependency Remove unused
IsBootstrap field from NodeConfig
2025-08-14 15:49:07 +03:00
b7d8c42464 Remove DHT dependency and simplify peer discovery
Replace DHT-based discovery with bootstrap peerstore and peer exchange.
Update config and code to remove DHT references and dependencies. Add
data directory override support in node config. Cleanup related config
files and dependencies.
2025-08-14 14:02:58 +03:00
135711bb97 Add adv-addr flag for RQLite HTTP and Raft advertisement
Allows setting advertised addresses for RQLite via --adv-addr. Updates
config and startup logic to pass these addresses to RQLite.
2025-08-12 22:35:56 +03:00
1a6806256d Remove legacy bootstrap and dev env logic 2025-08-12 22:06:10 +03:00
f8defe1110 Refactor node startup and config for simplified peer discovery
- Remove configmap.go and bootstrap-specific config logic
- Refactor main.go to use a unified node startup for all roles
- Remove DHT and mDNS from config and node logic; use bootstrap + peer
  exchange
- Update constants to extract bootstrap peer IDs from addresses
- Simplify RQLite advertise logic and remove external IP detection
- Add zeroconf as indirect dependency
- Remove environment variable overrides from config
- Update README with port usage clarification
- Add new CLI and node binaries
2025-08-12 21:39:53 +03:00
2647f75ed6 added anyone proxy support 2025-08-10 16:34:11 +03:00
2015d454eb contribution related changes 2025-08-09 21:44:26 +03:00
fbfea68f02 feat: improve dev-local bootstrap behavior and add client defaults logging 2025-08-09 17:55:21 +03:00
cf36d301d5 feat: add dev-local mode for localhost testing with auto-discovery of bootstrap peers 2025-08-09 17:50:02 +03:00
6301ed9182 refactor: split network client code into focused modules and extract config mapping
The changes reorganize the network client code by splitting it into focused modules for better maintainability, including
2025-08-09 12:00:35 +03:00
e037773ece refactor: split pubsub manager into focused modules and add env config support 2025-08-09 11:44:24 +03:00
27f2460bf2 feat: implement graceful shutdown and improve cluster join reliability 2025-08-09 08:57:11 +03:00
355c1c66b9 feat: add configurable P2P port for node startup in Makefile and CLI flags 2025-08-09 08:38:44 +03:00
a59d0f1fd6 feat: add configurable RQLite host advertising modes (auto/localhost/ip) 2025-08-09 08:19:18 +03:00
05798471dd fix: standardize rqlite join addresses to use host:port format without http scheme 2025-08-08 20:30:46 +03:00
b744f7f513 refactor: standardize ports (LibP2P 4001, RQLite 5001/7001) and remove .env configuration 2025-08-08 20:09:28 +03:00
8d57fc8f98 Remove bootstrap main.go file as part of project restructuring 2025-08-07 08:40:38 +03:00
f62b9c6423 Merge branch 'main' of https://git.debros.io/DeBros/network 2025-08-06 20:25:51 +03:00
8d9996e87a Add new main files for bootstrap and unified-node commands 2025-08-06 19:59:09 +03:00
16a70a03aa Add comprehensive network connectivity diagnostics
- Add automated network diagnostics for RQLite join addresses
- Test port connectivity with netcat, HTTP responses, ping, and DNS
- Provide detailed troubleshooting information in logs
- Help identify exact causes of RQLite cluster join failures
- Test connectivity before attempting RQLite cluster join

This will help diagnose the 'invalid join address' error by showing exactly
why the connection to 57.129.81.31:4001 is failing.
2025-08-06 13:08:27 +03:00
e6a305a8a7 Fix RQLite join address validation and improve error handling
- Replace hardcoded fallback IP with localhost for better compatibility
- Add join address format validation
- Improve logging for better troubleshooting
- Add detailed RQLite startup logging with full args
2025-08-06 13:00:55 +03:00
089916b5dd Fix port conflict between RQLite and LibP2P
CRITICAL FIX: Separate RQLite and LibP2P ports to prevent service startup failures

Changes:
- LibP2P now uses port 4000 (was conflicting with RQLite on 4001)
- RQLite continues to use port 4001 for HTTP API
- RQLite Raft uses port 4002
- Updated bootstrap peer configurations to use port 4000
- Updated install script port configurations
- Fixed firewall configuration to allow correct ports

This resolves the 'bind: address already in use' error that was preventing
the debros-node service from starting properly.
2025-08-06 08:44:23 +03:00
79d4a3980f Add peer-id command to CLI for easy peer ID retrieval 2025-08-06 08:39:14 +03:00
dfa4de33b4 Fix multi-bootstrap RQLite cluster setup
- Primary bootstrap (57.129.81.31): starts new cluster (no join address)
- Secondary bootstrap (38.242.250.186): joins primary bootstrap cluster
- Regular nodes: join primary bootstrap cluster

This allows both VPS servers to be bootstrap nodes while forming a
proper RQLite cluster where the secondary bootstrap joins the primary
instead of trying to start its own independent cluster.

Should resolve the leadership establishment timeout on the second VPS.
2025-08-06 08:21:21 +03:00
37bf582932 Fix bootstrap node detection to prevent self-join in RQLite
The VPS at 57.129.81.31 was incorrectly trying to join itself as a
regular node instead of being detected as a bootstrap node.

Added isLocalIP() function to check if bootstrap peer IPs match
local machine IPs using 'ip addr show' and 'hostname -I' commands.

This should resolve the 'invalid join address' error where the
bootstrap node was trying to join http://57.129.81.31:4001 (itself).
2025-08-06 08:14:29 +03:00
480354267a Fix RQLite join address for regular nodes
- Regular nodes now join actual bootstrap nodes instead of localhost:4001
- Extract IP from bootstrap peer multiaddrs for RQLite join address
- Add fallback to first known bootstrap node (57.129.81.31:4001)
- This fixes the 'fatal: http://localhost:4001 is an invalid join address' error

Regular nodes will now properly join the RQLite cluster of bootstrap nodes
instead of trying to join themselves, which was causing startup failures.
2025-08-06 08:02:43 +03:00
cd74a2df68 Refactor node and bootstrap configurations for improved clarity and consistency; unify RQLite and Raft ports across nodes, update environment setup, and enhance logging for node operations. 2025-08-05 22:28:12 +03:00
cad45efb71 Refactor go.mod to remove indirect dependency on godotenv and update RQLite node configuration 2025-08-04 18:51:11 +03:00
bf32cc2a49 Add production environment support for bootstrap peers and RQLite connections 2025-08-04 18:31:49 +03:00
8523cb2fb3 Update import paths to use the full module path for consistency 2025-08-03 17:00:52 +03:00
116885e6d7 Update import paths to use the full module path for consistency 2025-08-03 16:34:02 +03:00
a6aa516d74 Initial commit 2025-08-03 16:24:04 +03:00