You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
桜庭清夏 47414c584d fix duplicate ip in allowedips 1 year ago
.gitignore Initial commit 1 year ago
LICENSE Initial commit 1 year ago
README.md Update README.md 1 year ago
wg.py fix duplicate ip in allowedips 1 year ago
wgpy.py fix duplicate ip in allowedips 1 year ago

README.md

Wireguard-AllowedIPs-Calculator


Simple Wireguard AllowedIPs Calculator

Usage:

wg.py (Cli output)

python3 wg.py -a 0.0.0.0,2001:db8::/32 -d 2001:db8:4001:103::/64

[-a] AllowedIPs. comma to split the multiple ips. [-d] DisallowedIPs. comma to split the multiple ips.

wgpy.py

The same version but accept parameter in python script. you can modify it to your code.

allow_ip_raw = ["0.0.0.0/0","::0/0"]
# Replace the allowed(routed) IP ranges with your IP.
disallow_ip_raw = ["10.0.0.0/8","fc00::/7"]
# Replace the disallowed(not routed) IP ranges with your IP.

Warning:THIS PROGRAM IS NO GUARANTEE! PLEASE USE IT AT YOUR OWN RISK. ILLEGAL USE IS STRICTLY PROHIBITED.


简单好用的Wireguard路由IP计算器

使用方法:

wg.py (Cli输出)

python3 wg.py -a 0.0.0.0,2001:db8::/32 -d 2001:db8:4001:103::/64

[-a] 允许的IP段使用逗号分割。 [-d] 不允许的IP段使用逗号分割。

wgpy.py

相同版本但不通过Cli指定参数可以修改后应用于其他代码。

allow_ip_raw = ["0.0.0.0/0","::0/0"]
# 用允许的IP(路由的)IP段来替换上面的内容。
disallow_ip_raw = ["10.0.0.0/8","fc00::/7"]
# 用不允许的IP(直接路由不通过wg的IP段)IP段来替换上面的内容。

警告:本程序无任何保证, 请自行承担使用风险。严禁利用本程序进行非法活动。本程序作者不负任何责任。

簡単なWireguard AllowedIPs計算機

使用方法:

wg.py (Cli出力)

python3 wg.py -a 0.0.0.0,2001:db8::/32 -d 2001:db8:4001:103::/64

[-a] アクセス許可のIP範囲指定コンマで多IPを分割する。 [-d] アクセス禁止のIP範囲指定コンマで多IPを分割する。

wgpy.py

上記と同じだが、Cliでパラメータを取得しない。プログラム内で指定する。編集した後で他のコードでも利用可能。

allow_ip_raw = ["0.0.0.0/0","::0/0"]
# アクセス許可のIP(ルートしたいIP)で替える。
disallow_ip_raw = ["10.0.0.0/8","fc00::/7"]
# アクセス禁止のIP(ルートしたくないIP)で替える。

ご注意ください:本プロジェクトは保証なし。自己責任。本プロジェクトを利用して違法犯罪行為をすることは固く禁じます。