node-red-contrib-vban
Version:
Nodes to interact with vban protocol
61 lines (52 loc) • 2.2 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('vban-ip-filter', {
category: 'VBAN Advanced',
defaults: {
name: {
value: 'Filter',
required: false
},
allowedIps: {
value: '::1 ; 127.0.0.1 ; 192.168.0.0/16 ; 10.0.0.0/8 ; 172.16.0.0/12',
required: true
}
},
icon: 'font-awesome/fa-shield',
inputs: 1,
outputs: 2,
outputLabels: ['msg', 'errors'],
label: function () {
return this.name || 'Filter';
},
labelStyle: function () {
return this.name ? 'node_label_italic' : '';
}
});
</script>
<script data-template-name="vban-ip-filter" type="text/html">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-allowedIps"><i class="fa fa-globe"></i> Allowed IPs</label>
<input type="text" id="node-input-allowedIps" placeholder="Allowed IPs" /> <br/>
<small>read documentation if needed</small>
</div>
</script>
<script data-help-name="vban-ip-filter" type="text/markdown">
This node is only here to protect you against requests from unknown ips .
You need to set the allowed ip .
### Inputs
: payload (object) : the payload .
: payload.sender (object) : an object representing the sender . (default object coming from node dgram)
: payload.sender.ip (string) : the sender ip
### Options
- allowedIps : Need to be the ip that are allowed to pass this security .
### References
This node is not directly linked with VBAN, but I think security is really important, so it's better to include this node, insteed of relying on the customer others nodes .
This node can totally can replacer by a node checking the ip of the sender.
- [IPs notation](https://github.com/thib3113/node-red-contrib-vban/wiki/IPs-notation)
- [Security Or Allowed IPs](https://github.com/thib3113/node-red-contrib-vban/wiki/Security---Allowed-IPs)
- [GitHub wiki](TODO)
</script>