|
@ -16,7 +16,15 @@ $ yarn add node-ufw |
|
|
## Usage |
|
|
## Usage |
|
|
```js |
|
|
```js |
|
|
const nodeUfw = require("node-ufw"); |
|
|
const nodeUfw = require("node-ufw"); |
|
|
await nodeUfw.allow.port("192.168.0.1"); // true |
|
|
|
|
|
|
|
|
await nodeUfw.allow.port(6379); |
|
|
|
|
|
await nodeUfw.deny.port(25565, "udp"); |
|
|
|
|
|
|
|
|
|
|
|
await nodeUfw.allow.address("192.168.0.1"); |
|
|
|
|
|
await nodeUfw.deny.address("192.168.0.1", 80); |
|
|
|
|
|
await nodeUfw.allow.address("192.168.0.1", 6379, "udp"); |
|
|
|
|
|
|
|
|
|
|
|
await nodeUfw.enable(); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
## LICENSE |
|
|
## LICENSE |
|
|