Add "Allow connections to Updates Proxy" firewall setting (#582)
This commit is contained in:
parent
c1e85d3094
commit
da09aa79fc
@ -230,6 +230,7 @@ class QubesFirewallRulesModel(QAbstractItemModel):
|
|||||||
self.allow = conf["allow"]
|
self.allow = conf["allow"]
|
||||||
self.allowDns = conf["allowDns"]
|
self.allowDns = conf["allowDns"]
|
||||||
self.allowIcmp = conf["allowIcmp"]
|
self.allowIcmp = conf["allowIcmp"]
|
||||||
|
self.allowYumProxy = conf["allowYumProxy"]
|
||||||
|
|
||||||
for rule in conf["rules"]:
|
for rule in conf["rules"]:
|
||||||
self.appendChild(QubesFirewallRuleItem(
|
self.appendChild(QubesFirewallRuleItem(
|
||||||
@ -239,15 +240,16 @@ class QubesFirewallRulesModel(QAbstractItemModel):
|
|||||||
def get_vm_name(self):
|
def get_vm_name(self):
|
||||||
return self.__vm.name
|
return self.__vm.name
|
||||||
|
|
||||||
def apply_rules(self, allow, dns, icmp):
|
def apply_rules(self, allow, dns, icmp, yumproxy):
|
||||||
assert self.__vm is not None
|
assert self.__vm is not None
|
||||||
|
|
||||||
if(self.allow != allow or self.allowDns != dns or self.allowIcmp != icmp):
|
if(self.allow != allow or self.allowDns != dns or self.allowIcmp != icmp or self.allowYumProxy != yumproxy):
|
||||||
self.fw_changed = True
|
self.fw_changed = True
|
||||||
|
|
||||||
conf = { "allow": allow,
|
conf = { "allow": allow,
|
||||||
"allowDns": dns,
|
"allowDns": dns,
|
||||||
"allowIcmp": icmp,
|
"allowIcmp": icmp,
|
||||||
|
"allowYumProxy": yumproxy,
|
||||||
"rules": list()
|
"rules": list()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
self.qvm_collection.unlock_db()
|
self.qvm_collection.unlock_db()
|
||||||
|
|
||||||
if self.tabWidget.isTabEnabled(self.tabs_indices["firewall"]):
|
if self.tabWidget.isTabEnabled(self.tabs_indices["firewall"]):
|
||||||
self.fw_model.apply_rules(self.policyAllowRadioButton.isChecked(), self.dnsCheckBox.isChecked(), self.icmpCheckBox.isChecked())
|
self.fw_model.apply_rules(self.policyAllowRadioButton.isChecked(), self.dnsCheckBox.isChecked(), self.icmpCheckBox.isChecked(), self.yumproxyCheckBox.isChecked())
|
||||||
|
|
||||||
if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]):
|
if self.tabWidget.isTabEnabled(self.tabs_indices["applications"]):
|
||||||
self.AppListManager.save_appmenu_select_changes()
|
self.AppListManager.save_appmenu_select_changes()
|
||||||
@ -642,6 +642,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
self.set_allow(model.allow)
|
self.set_allow(model.allow)
|
||||||
self.dnsCheckBox.setChecked(model.allowDns)
|
self.dnsCheckBox.setChecked(model.allowDns)
|
||||||
self.icmpCheckBox.setChecked(model.allowIcmp)
|
self.icmpCheckBox.setChecked(model.allowIcmp)
|
||||||
|
self.yumproxyCheckBox.setChecked(model.allowYumProxy)
|
||||||
|
|
||||||
def set_allow(self, allow):
|
def set_allow(self, allow):
|
||||||
self.policyAllowRadioButton.setChecked(allow)
|
self.policyAllowRadioButton.setChecked(allow)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<locale language="English" country="UnitedStates"/>
|
<locale language="English" country="UnitedStates"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="basic_tab">
|
<widget class="QWidget" name="basic_tab">
|
||||||
<property name="locale">
|
<property name="locale">
|
||||||
@ -648,7 +648,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SetMaximumSize</enum>
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
@ -758,6 +758,13 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="yumproxyCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Allow connections to Updates Proxy</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="devices_tab">
|
<widget class="QWidget" name="devices_tab">
|
||||||
|
Loading…
Reference in New Issue
Block a user