Skip to content

Commit

Permalink
Minor Restructure
Browse files Browse the repository at this point in the history
Configuration of tool now stored in project root ./config.

Updated 'src/config/*.json with property to describe this.

Updated .gitignore to now hide these files (So they are not commited)
  • Loading branch information
Dustyn Blackmore committed May 7, 2018
1 parent 46b155b commit 660ab4c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ typings/
# dotenv environment variables file
.env

# Configuration (Interfaces, and Rules)
config/*.json
2 changes: 1 addition & 1 deletion src/config/interfaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"zone": "trusted"
},
"wlp3s0b1": {
"zone": "untrusted"
"zone": "trusted"
}
}
}
17 changes: 17 additions & 0 deletions src/config/rules.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"detail": "This file should be copied into './config/' and setup as necessary.",
"rules": {
"incoming": {
"_1": "ICMP",
Expand Down Expand Up @@ -161,6 +162,22 @@
"acceptAction": null,
"rejectAction": null
},
"2083": {
"acceptAction": null,
"rejectAction": null
},
"2087": {
"acceptAction": null,
"rejectAction": null
},
"2096": {
"acceptAction": null,
"rejectAction": null
},
"3142": {
"acceptAction": null,
"rejectAction": null
},
"9092": {
"acceptAction": null,
"rejectAction": null
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const buffer = 131070;

process.stdout.write('\x1Bc');

let rules = require('./config/rules.json').rules;
let systemInterfaces = require('./config/interfaces.json').interfaces;
let rules = require('./../config/rules.json').rules;
let systemInterfaces = require('./../config/interfaces.json').interfaces;

let configWatch = fs.watch('./src/config', checkConfig);
let configWatch = fs.watch('./config', checkConfig);

function checkConfig (err, filename) {
setTimeout(() => {
Expand Down

0 comments on commit 660ab4c

Please sign in to comment.