mirror of https://github.com/wg-easy/wg-easy
Browse Source
* cidr support * add cidr * fix some errors fix server config missing cidr block in server configpull/1618/head
committed by
Bernd Storath
5 changed files with 46 additions and 33 deletions
@ -38,6 +38,9 @@ importers: |
|||||
debug: |
debug: |
||||
specifier: ^4.3.7 |
specifier: ^4.3.7 |
||||
version: 4.3.7 |
version: 4.3.7 |
||||
|
ip: |
||||
|
specifier: ^2.0.1 |
||||
|
version: 2.0.1 |
||||
js-sha256: |
js-sha256: |
||||
specifier: ^0.11.0 |
specifier: ^0.11.0 |
||||
version: 0.11.0 |
version: 0.11.0 |
||||
@ -78,6 +81,9 @@ importers: |
|||||
'@types/debug': |
'@types/debug': |
||||
specifier: ^4.1.12 |
specifier: ^4.1.12 |
||||
version: 4.1.12 |
version: 4.1.12 |
||||
|
'@types/ip': |
||||
|
specifier: ^1.1.3 |
||||
|
version: 1.1.3 |
||||
'@types/qrcode': |
'@types/qrcode': |
||||
specifier: ^1.5.5 |
specifier: ^1.5.5 |
||||
version: 1.5.5 |
version: 1.5.5 |
||||
@ -1217,6 +1223,9 @@ packages: |
|||||
'@types/[email protected]': |
'@types/[email protected]': |
||||
resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==} |
resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==} |
||||
|
|
||||
|
'@types/[email protected]': |
||||
|
resolution: {integrity: sha512-64waoJgkXFTYnCYDUWgSATJ/dXEBanVkaP5d4Sbk7P6U7cTTMhxVyROTckc6JKdwCrgnAjZMn0k3177aQxtDEA==} |
||||
|
|
||||
'@types/[email protected]': |
'@types/[email protected]': |
||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} |
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} |
||||
|
|
||||
@ -2546,6 +2555,9 @@ packages: |
|||||
resolution: {integrity: sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==} |
resolution: {integrity: sha512-2YZsvl7jopIa1gaePkeMtd9rAcSjOOjPtpcLlOeusyO+XH2SK5ZcT+UCrElPP+WVIInh2TzeI4XW9ENaSLVVHA==} |
||||
engines: {node: '>=12.22.0'} |
engines: {node: '>=12.22.0'} |
||||
|
|
||||
|
[email protected]: |
||||
|
resolution: {integrity: sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==} |
||||
|
|
||||
[email protected]: |
[email protected]: |
||||
resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} |
resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} |
||||
|
|
||||
@ -5619,6 +5631,10 @@ snapshots: |
|||||
dependencies: |
dependencies: |
||||
'@types/node': 22.5.2 |
'@types/node': 22.5.2 |
||||
|
|
||||
|
'@types/[email protected]': |
||||
|
dependencies: |
||||
|
'@types/node': 22.5.2 |
||||
|
|
||||
'@types/[email protected]': {} |
'@types/[email protected]': {} |
||||
|
|
||||
'@types/[email protected]': {} |
'@types/[email protected]': {} |
||||
@ -7171,6 +7187,8 @@ snapshots: |
|||||
transitivePeerDependencies: |
transitivePeerDependencies: |
||||
- supports-color |
- supports-color |
||||
|
|
||||
|
[email protected]: {} |
||||
|
|
||||
[email protected]: {} |
[email protected]: {} |
||||
|
|
||||
[email protected]: {} |
[email protected]: {} |
||||
|
@ -1,12 +0,0 @@ |
|||||
export function isValidIPv4(str: string) { |
|
||||
const blocks = str.split('.'); |
|
||||
if (blocks.length !== 4) return false; |
|
||||
|
|
||||
for (const value of blocks) { |
|
||||
const num = parseInt(value, 10); |
|
||||
if (Number.isNaN(value)) return false; |
|
||||
if (num < 0 || num > 255) return false; |
|
||||
} |
|
||||
|
|
||||
return true; |
|
||||
} |
|
Loading…
Reference in new issue