lib/connections, lib/model, gui: Specify allowed networks per device (fixes #219)
This adds a new config AllowedNetworks per device, which when set should contain a list of network prefixes (192.168.0.0/126 etc) that are allowed for the given device. The connection service will not attempt connections to addresses outside of the given networks and incoming connections will be rejected as well. I've added the config to the normal device editor and shown it (when set) in the device summary on the main screen. There's a unit test for the IsAllowedNetwork method, I've done some manual sanity testing on top of that. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4073
This commit is contained in:
committed by
Audrius Butkevicius
parent
4253f22680
commit
c5e0c47989
@@ -18,6 +18,7 @@
|
||||
"Advanced settings": "Advanced settings",
|
||||
"All Data": "All Data",
|
||||
"Allow Anonymous Usage Reporting?": "Allow Anonymous Usage Reporting?",
|
||||
"Allowed Networks": "Allowed Networks",
|
||||
"Alphabetic": "Alphabetic",
|
||||
"An external command handles the versioning. It has to remove the file from the shared folder.": "An external command handles the versioning. It has to remove the file from the shared folder.",
|
||||
"An external command handles the versioning. It has to remove the file from the synced folder.": "An external command handles the versioning. It has to remove the file from the synced folder.",
|
||||
|
||||
@@ -593,6 +593,12 @@
|
||||
<th><span class="fa fa-fw fa-warning text-danger"></span> <span translate>Connection Type</span></th>
|
||||
<td class="text-right">{{connections[deviceCfg.deviceID].type}}</td>
|
||||
</tr>
|
||||
<tr ng-if="deviceCfg.allowedNetworks">
|
||||
<th><span class="fa fa-fw fa-filter"></span> <span translate>Allowed Networks</span></th>
|
||||
<td class="text-right">
|
||||
<span>{{deviceCfg.allowedNetworks.join(", ")}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-if="deviceCfg.compression != 'metadata'">
|
||||
<th><span class="fa fa-fw fa-compress"></span> <span translate>Compression</span></th>
|
||||
<td class="text-right">
|
||||
|
||||
Reference in New Issue
Block a user