ray-1337
2 years ago
No known key found for this signature in database
GPG Key ID: DED41DCC150FCD32
2 changed files with
2 additions and
2 deletions
-
src/methods/Allow.ts
-
src/methods/Deny.ts
|
@ -20,7 +20,7 @@ async function port(port: number, protocol?: PortProtocol) { |
|
|
/** |
|
|
/** |
|
|
* Allow incoming requests through specific (IP) address. (root/sudo access is mandatory) |
|
|
* Allow incoming requests through specific (IP) address. (root/sudo access is mandatory) |
|
|
*/ |
|
|
*/ |
|
|
async function address(address: string, port: number, protocol?: PortProtocol) { |
|
|
async function address(address: string, port?: number, protocol?: PortProtocol) { |
|
|
try { |
|
|
try { |
|
|
// address validation
|
|
|
// address validation
|
|
|
let checkAddress = checkAppropriateIP(address); |
|
|
let checkAddress = checkAppropriateIP(address); |
|
|
|
@ -20,7 +20,7 @@ async function port(port: number, protocol?: PortProtocol) { |
|
|
/** |
|
|
/** |
|
|
* Deny incoming requests through specific (IP) address. (root/sudo access is mandatory) |
|
|
* Deny incoming requests through specific (IP) address. (root/sudo access is mandatory) |
|
|
*/ |
|
|
*/ |
|
|
async function address(address: string, port: number, protocol?: PortProtocol) { |
|
|
async function address(address: string, port?: number, protocol?: PortProtocol) { |
|
|
try { |
|
|
try { |
|
|
// address validation
|
|
|
// address validation
|
|
|
let checkAddress = checkAppropriateIP(address); |
|
|
let checkAddress = checkAppropriateIP(address); |
|
|