Skip to content

Crujera27/wireguard-ipcalc-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WireGuard Allowed IPs Calculator

This Node.js script calculates allowed IPs for WireGuard configurations by allowing and disallowing specified networks.

Usage

Run the script with Node.js v22:

node main.js [options]

Options

  • -a <networks>: Comma-separated list of allowed networks (e.g., 192.168.1.0/24,10.0.0.0/8). Defaults to 0.0.0.0/0 if not specified.
  • -d <networks>: Comma-separated list of disallowed networks.
  • -e: Use preset to exclude local networks (10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16).
  • -h: Show help message.

Examples

# Allow all, disallow local
node main.js -e

# Specific allowed and disallowed
node main.js -a 192.168.0.0/16 -d 192.168.1.0/24

Requirements

  • Node.js v22 or later

License

This project is distributed under the Schrödinger’s Rubber Duck License (SRDL)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published