Skip to content

Add options to directly contact hosts by name or ip + disable broadcast - #26

Open
VolodiaPG wants to merge 1 commit into
cid-chan:masterfrom
VolodiaPG:master
Open

Add options to directly contact hosts by name or ip + disable broadcast#26
VolodiaPG wants to merge 1 commit into
cid-chan:masterfrom
VolodiaPG:master

Conversation

@VolodiaPG

Copy link
Copy Markdown

Following options are added

  • extraHosts enables the specification of hostnames/ips to specifically contact
  • disableBroadcast would avoid to use the broadcast addresses from the interfaces by default

Those options are added using two env variables:

  • comma-separated PEERIX_EXTRA_HOSTS
  • boolean PEERIX_DISABLE_BROADCAST (true or false in string)

Also puts a small example in the README.MD.

Use case:

  1. Use a VPN such as tailscale, aka a mesh vpn to connect multiple computers together, independantly of the network
  2. Broadcast interfaces are not a feature of any VPN
  3. Peerix can still be used accross networks thanks to a module defined such as:
     _: {
       services.peerix = {
         enable = true;
         openFirewall = true; # UDP/12304
    
         privateKeyFile = ../secrets/peerix-private;
         publicKeyFile = ../secrets/peerix-public;
    
         user = "peerix";
         group = "peerix";
    
         disableBroadcast = true;
         extraHosts = [ "my-nixos-computer-hostname" "42.42.42.1" ];
       };
       users.users.peerix = {
         isSystemUser = true;
         group = "peerix";
       };
       users.groups.peerix = { };
     }

- extraHosts enables the specification of hostnames/ips to specifically contact
- disableBroadcast would avoid to use the broadcast addresses from the interfaces by default

Those options are added using two env variables:
- comma-separated PEERIX_EXTRA_HOSTS
- boolean PEERIX_DISABLE_BROADCAST (true or false in string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants