Permalink
Browse files

supported_providers refactoring and get account links

  • Loading branch information...
hypatia2 committed Nov 4, 2015
1 parent 82c74df commit 94b9403692e9dd77400543ee7c8255dcfa6aa2fa
@@ -13,8 +13,8 @@ namespace eval ::airvpn {
# input entries - resettable/modifiable variables
variable newprofilename ""
variable username jreynman@yahoo.com
variable password nobel7
variable username ""
variable password ""
}
@@ -47,6 +47,8 @@ proc ::airvpn::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Buy account on <https://fruho.com/redirect?url=https://airvpn.org/plans/><airvpn.org>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -60,6 +62,7 @@ proc ::airvpn::create-import-frame {tab} {
grid $pconf.passwordinput -row 7 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.passwordinfo -row 7 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -131,9 +134,11 @@ proc ::airvpn::ImportClicked {tab} {
}
}
lappend ::model::Supported_providers {150 airvpn}
if 0 {
dict set model::Supported_providers airvpn {
order 150
name $::airvpn::name
dispname $::airvpn::dispname
}
}
@@ -32,10 +32,10 @@ proc ::cyberghost::create-import-frame {tab} {
grid $pconf.select.button -row 0 -column 1 -sticky e -padx 5 -pady 5
grid columnconfigure $pconf.select 0 -weight 1
ttk::label $pconf.selectinfo -foreground grey
ttk::label $pconf.usernamelabel -text "Username" -anchor e
ttk::label $pconf.usernamelabel -text "VPN username" -anchor e
ttk::entry $pconf.usernameinput -textvariable ::${name}::username
ttk::label $pconf.usernameinfo -foreground grey
ttk::label $pconf.passwordlabel -text "$dispname password" -anchor e
ttk::label $pconf.usernameinfo -foreground grey -text "e.g. 4384732_8j3StDv8Uw"
ttk::label $pconf.passwordlabel -text "VPN password" -anchor e
ttk::entry $pconf.passwordinput -textvariable ::${name}::password
ttk::label $pconf.passwordinfo -foreground grey
ttk::frame $pconf.importline
@@ -47,6 +47,9 @@ proc ::cyberghost::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Only premium accounts and no support for auto import. See <https://fruho.com/howto/2><howto.>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -62,6 +65,7 @@ proc ::cyberghost::create-import-frame {tab} {
grid $pconf.passwordinput -row 7 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.passwordinfo -row 7 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -88,8 +92,12 @@ proc ::cyberghost::ImportClicked {tab name} {
}
lappend ::model::Supported_providers {200 cyberghost}
if 0 {
dict set model::Supported_providers cyberghost {
order 200
name $::cyberghost::name
dispname $::cyberghost::dispname
}
}
@@ -43,6 +43,8 @@ proc ::from_file::create-import-frame {tab} {
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "<https://fruho.com/howto/1><How to get config files?>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -52,6 +54,7 @@ proc ::from_file::create-import-frame {tab} {
grid $pconf.select -row 4 -column 0 -sticky news -columnspan 2
grid $pconf.selectinfo -row 4 -column 2 -sticky news
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -302,9 +305,12 @@ proc ::from_file::create-slist {endpoints} {
}
lappend ::model::Supported_providers {900 from_file}
if 0 {
dict set model::Supported_providers from_file {
order 900
name $::from_file::name
dispname $::from_file::dispname
}
}
@@ -18,8 +18,8 @@ namespace eval ::hideipvpn {
# input entries - resettable/modifiable variables
variable newprofilename ""
variable username tgqyqzai
variable password behdfuuu
variable username ""
variable password ""
}
@@ -39,10 +39,10 @@ proc ::hideipvpn::create-import-frame {tab} {
ttk::label $pconf.profileinfo -foreground grey
ttk::label $pconf.usernamelabel -text "VPN username" -anchor e
ttk::entry $pconf.usernameinput -textvariable ::${name}::username
ttk::label $pconf.usernameinfo -foreground grey -text ""
ttk::label $pconf.usernameinfo -foreground grey -text "e.g. uwdnowqd"
ttk::label $pconf.passwordlabel -text "VPN password" -anchor e
ttk::entry $pconf.passwordinput -textvariable ::${name}::password
ttk::label $pconf.passwordinfo -foreground grey
ttk::label $pconf.passwordinfo -foreground grey -text "e.g. eowguqie"
ttk::frame $pconf.importline
ttk::button $pconf.importline.button -text "Import configuration" -command [list go ::${name}::ImportClicked $tab]
# must use non-ttk label for proper animated gif display
@@ -52,6 +52,9 @@ proc ::hideipvpn::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Create account on <https://fruho.com/redirect?url=https://billing.hideipvpn.com/free-trial-vpn/><HideIpVPN website>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -65,6 +68,7 @@ proc ::hideipvpn::create-import-frame {tab} {
grid $pconf.passwordinput -row 7 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.passwordinfo -row 7 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -138,9 +142,12 @@ proc ::hideipvpn::ImportClicked {tab} {
}
}
lappend ::model::Supported_providers {050 hideipvpn}
if 0 {
dict set model::Supported_providers hideipvpn {
order 50
name $::hideipvpn::name
dispname $::hideipvpn::dispname
}
}
@@ -14,7 +14,7 @@ namespace eval ::mullvad {
# input entries - resettable/modifiable variables
variable newprofilename ""
variable username 438696513567
variable username ""
variable password ""
}
@@ -45,6 +45,7 @@ proc ::mullvad::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Create account on <https://fruho.com/redirect?url=https://mullvad.net/en/account/><mullvad.net>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -55,6 +56,7 @@ proc ::mullvad::create-import-frame {tab} {
grid $pconf.usernameinput -row 5 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.usernameinfo -row 5 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -124,8 +126,13 @@ proc ::mullvad::ImportClicked {tab} {
}
lappend ::model::Supported_providers {030 mullvad}
if 0 {
dict set model::Supported_providers mullvad {
order 30
name $::mullvad::name
dispname $::mullvad::dispname
}
}
@@ -13,8 +13,8 @@ namespace eval ::securitykiss {
# input entries - resettable/modifiable variables
variable newprofilename ""
variable username client04284903
variable password 97d7a6cc3
variable username ""
variable password ""
}
@@ -42,6 +42,7 @@ proc ::securitykiss::create-import-frame {tab} {
ttk::button $pconf.importline.button -text "Import configuration" -command [list go ::${name}::ImportClicked $tab]
# must use non-ttk label for proper animated gif display
label $pconf.importline.img
hypertext $pconf.link "Create free or premium account on <https://fruho.com/redirect?url=https://securitykiss.com/pricing/><securitykiss.com>"
img place 24/empty $pconf.importline.img
ttk::label $pconf.importline.msg
grid $pconf.importline.button -row 0 -column 0 -padx 10
@@ -60,6 +61,7 @@ proc ::securitykiss::create-import-frame {tab} {
grid $pconf.passwordinput -row 7 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.passwordinfo -row 7 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -131,9 +133,13 @@ proc ::securitykiss::ImportClicked {tab} {
}
}
lappend ::model::Supported_providers {010 securitykiss}
if 0 {
dict set model::Supported_providers securitykiss {
order 10
name $::securitykiss::name
dispname $::securitykiss::dispname
}
}
@@ -47,8 +47,7 @@ proc ::vpnbook::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Get free account from <https://www.vpnbook.com/freevpn><vpnbook.com>"
#hyperlink $pconf.link -command [list launchBrowser "https://www.vpnbook.com/freevpn"] -text "Get free account from vpnbook.com"
hypertext $pconf.link "Get free account from <https://fruho.com/redirect?url=https://www.vpnbook.com/freevpn><vpnbook.com>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -134,9 +133,12 @@ proc ::vpnbook::ImportClicked {tab} {
}
}
lappend ::model::Supported_providers {020 vpnbook}
if 0 {
dict set model::Supported_providers vpnbook {
order 20
name $::vpnbook::name
dispname $::vpnbook::dispname
}
}
@@ -47,6 +47,9 @@ proc ::vyprvpn::create-import-frame {tab} {
grid $pconf.importline.button -row 0 -column 0 -padx 10
grid $pconf.importline.img -row 0 -column 1 -padx 10 -pady 10
grid $pconf.importline.msg -row 0 -column 2 -padx 10 -pady 10
hypertext $pconf.link "Create account on <https://fruho.com/redirect?url=https://www.goldenfrog.com/vyprvpn/buy-vpn><VyprVPN website>"
grid columnconfigure $pconf 0 -weight 4 -uniform 1
grid columnconfigure $pconf 1 -weight 4 -uniform 1
grid columnconfigure $pconf 2 -weight 4 -uniform 1
@@ -60,6 +63,7 @@ proc ::vyprvpn::create-import-frame {tab} {
grid $pconf.passwordinput -row 7 -column 1 -sticky news -padx 5 -pady 5
grid $pconf.passwordinfo -row 7 -column 2 -sticky news -pady 5
grid $pconf.importline -sticky news -columnspan 3
grid $pconf.link -sticky news -columnspan 3 -padx 10 -pady 10
return $pconf
}
@@ -131,9 +135,14 @@ proc ::vyprvpn::ImportClicked {tab} {
}
}
lappend ::model::Supported_providers {110 vyprvpn}
if 0 {
dict set model::Supported_providers vyprvpn {
order 110
name $::vyprvpn::name
dispname $::vyprvpn::dispname
}
}
@@ -34,7 +34,7 @@ source [file join [file dir [info script]] model.tcl]
foreach f [glob -nocomplain -directory [file dir [info script]] add_*.tcl] {
source $f
}
set ::model::Supported_providers [lsort -decreasing -stride 2 $::model::Supported_providers]
set ::model::Supported_providers [lsort $::model::Supported_providers]
# print to stderr
proc pq {id args} {
@@ -1858,7 +1858,8 @@ proc frame-addvpnprovider {p} {
$plist column #0 -width 50 -anchor nw -stretch 0
$plist column 0 -width 140 -anchor w
foreach provider [dict keys $::model::Supported_providers] {
foreach op $::model::Supported_providers {
lassign $op order provider
$provider add-to-treeview-plist $plist
$provider create-import-frame $tab
}
@@ -154,8 +154,7 @@ if 0 { variable Profiles [dict create fruho {
########################################
# Supported providers
########################################
# e.g.: from_file {name from_file dispname "From File"}
#
# actually pairs: (order, provider)
variable Supported_providers {}
}

0 comments on commit 94b9403

Please sign in to comment.