Commit Graph

25 Commits

Author SHA1 Message Date
wanderer
f1538eef4d
feat: make DNS TLD configurable (#124)
Add a 'domain' option to the NixOS module and JSON config that
controls the domain suffix used for internal DNS names. Defaults to
'hyprspace' for backward compatibility. Supports multi-label domains
(e.g. 'vpn.internal').

Co-authored-by: Max <max@privatevoid.net>
2026-06-22 17:48:14 +00:00
Max
7e03fcc1d5
make bootstrap peers configurable (#111) 2026-06-18 22:13:10 +00:00
Roland Urbano
993f7661d6
Tests Phase 1 - Pure Function & In-Memory Mocked Tests (#110)
Signed-off-by: Roland Urbano <roland.urbano@nts.eu>
Co-authored-by: Max <max@privatevoid.net>
2026-06-19 00:03:09 +02:00
Roland Urbano
f2e4cc0b9c
bug: added empty check for FindPeerByCLIRef (#126) 2026-06-18 21:49:51 +00:00
Roland Urbano
3f573ef293
fix(config): error on ambiguous peer ID prefix (#113)
FindPeerByIDPrefix previously returned the first peer whose ID started
with the given prefix, silently ignoring further matches. With Ed25519
peer IDs all sharing the leading "12D3KooW" (8 chars), short prefixes
can match multiple peers; the chosen peer then depends on slice order,
which is effectively undefined from the user's perspective.

Change FindPeerByIDPrefix and its wrapper FindPeerByCLIRef to return
(*Peer, error):

  - 0 matches -> (nil, nil)
  - 1 match   -> (&peer, nil)
  - 2+ match  -> (nil, error) describing the ambiguity

Call sites in config.Read and rpc/server.go updated accordingly:
ambiguity surfaces as a config-load / CLI error instead of a silent
wrong-peer resolution.

Not a wire-protocol or config-format change. Only behavior visible at
CLI invocation and config load. Users relying on short prefixes that
happened to match multiple peers will now see a clear error and must
lengthen the prefix.
2026-05-23 22:26:05 +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
ed30c60c95
Implementation for basic service access control (#95)
* Added ServicesACL config

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

* Adding filter to service receiver

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

* Implemented ACL handling in ServiceNetwork

Signed-off-by: Roland Urbano <roland.urbano@nts.eu>

* Updated Schema and added parsing for acl config

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

* Updated service package and fixed ACL handling

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

* go-jsonschema: 0.16.0 -> 0.22.0

* nixos: set acls on services directly

* config: move ServicesACL to Services

* svc: simplify acl logic

* remove whitespace

* apply nixfmt

---------

Signed-off-by: Roland Urbano <urbano.roland@gmail.com>
Signed-off-by: Roland Urbano <roland.urbano@nts.eu>
Co-authored-by: Max <max@privatevoid.net>
2026-03-25 19:16:52 +01:00
Max
323081fe72
fix: also transfer peer name to config struct (#35) 2024-06-02 20:17:47 +00: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
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
0fe98f90ab select peers by name or ID prefix 2024-04-28 00:21:23 +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
c1127bb94e support packet relaying 2024-04-28 00:18:25 +02:00
Max
1b9bc3be8d update config file format 2024-04-28 00:17:29 +02:00
Max
72b5308353 apply https://github.com/hyprspace/hyprspace/pull/95 2024-04-28 00:16:02 +02:00
Alec Scott
43d0df3731
Fix Malformed IP Parsing & Add More Documentation (#70)
* Added support for daemon logs and improved code docs

* Update the README to include wireguard disclaimer

* Update description

* Add initialization message
2022-02-03 09:08:47 -07:00
Alec Scott
275eb18ca8 Add support for daemon locks for better process removal 2022-01-31 16:44:06 -07:00
Alec
414f80bd6b Improve background bandwidth usage by removing discover keys 2021-10-23 14:55:05 -07:00
Alec Scott
53768270bd Improve Error Handling & Allow Multiple Interfaces 2021-06-16 22:26:15 -07:00
Alec Scott
021b1f861c Fix some more spelling across the board. 2021-06-09 18:34:23 -07:00
Alec Scott
a70736ad47 Initial Commit of Hyprspace! 2021-06-07 21:31:43 -07:00