Commit c47878b4 authored by Danial Behzadi's avatar Danial Behzadi
Browse files

Add exit node selection

parent aa503bcb
......@@ -141,6 +141,63 @@ class HeaderBar(Gtk.HeaderBar):
button = NewidButton()
class ExitNode(Gtk.Box):
nodes = ["ww", "Auto (Best)",
"au", "Austria",
"bg", "Bulgaria",
"ca", "Canada",
"cz", "Czech",
"fi", "Finland",
"fr", "France",
"de", "Germany",
"ie", "Ireland",
"md", "Moldova",
"nl", "Netherlands",
"no", "Norway",
"pl", "Poland",
"ro", "Romania",
"su", "Russia",
"sc", "Seychelles",
"sg", "Singapore",
"es", "Spain",
"se", "Sweden",
"ch", "Switzerland",
"ua", "Ukraine",
"uk", "United Kingdom",
"us", "United States"]
def __init__(self):
vbox = VBox()
label = Label()
label.set_markup("<b>Exit node</b>")
vbox.pack_start(label, False, False, 0)
label = Label()
label.set_markup("<small>The country you want to connect from</small>")
vbox.pack_start(label, False, False, 0)
self.pack_start(vbox, True, True, 0)
vbox = VBox()
combo = Gtk.ComboBoxText()
for node in range(int(len(self.nodes)/2)):
code, name = self.make_nodes(node)
combo.append(code, name)
node = dconf.get_string("exit-node")
dconf.bind("exit-node", combo, "active-id", Gio.SettingsBindFlags.DEFAULT)
vbox.pack_start(combo, False, False, 0)
self.pack_start(vbox, False, True, 0)
def make_nodes(self, iteration):
number = (iteration)*2
return self.nodes[number], self.nodes[number+1]
class SocksPort(Gtk.Box):
def __init__(self):
......@@ -344,6 +401,8 @@ def main():
main_container = MainContainer()
main_box = Gtk.VBox()
exit_node_box = ExitNode()
main_box.pack_start(exit_node_box, False, False, 0)
socks_port_box = SocksPort()
main_box.pack_start(socks_port_box, False, False, 0)
dns_port_box = DNSPort()
carburetor (2.1-1) bionic; urgency=medium
* Add exit node selection
-- Danial Behzadi <> Sat, 28 Jul 2018 03:15:00 +0430
carburetor (2.0-1) bionic; urgency=medium
* Rebrand traktor as tractor
......@@ -7,7 +7,7 @@ Build-Depends: debhelper (>=9)
Package: carburetor
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, tractor (>=2.0-0~), python3, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, python3-notify2
Depends: ${shlibs:Depends}, ${misc:Depends}, tractor (>=2.1-0~), python3, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, python3-notify2
Description: Settings app for Tractor
This package is a graphical settings for tractor
which is an app using Python stem to provide
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment