summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/backend/api.go7
-rw-r--r--pkg/backend/init.go8
-rw-r--r--pkg/config/config.go59
3 files changed, 32 insertions, 42 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go
index 7c049fc..7aa5527 100644
--- a/pkg/backend/api.go
+++ b/pkg/backend/api.go
@@ -85,6 +85,11 @@ func RefreshContext() *C.char {
return C.CString(string(c))
}
+func ResetError(errname string) {
+ log.Println("DEBUG: resetting error", errname)
+ resetErrors(errname)
+}
+
func InstallHelpers() {
pickle.InstallHelpers()
}
@@ -105,7 +110,7 @@ func EnableWebAPI(port string) {
/* these two are a bit redundant since we already add them to ctx. however, we
want to have them available before everything else, to be able to parse cli
arguments. In the long run, we probably want to move all vendoring to qt, so
- this probably should not live in the backend. */
+ this probably should not live in the backend, see #326*/
func GetVersion() *C.char {
return C.CString(version.VERSION)
diff --git a/pkg/backend/init.go b/pkg/backend/init.go
index bae9b9b..af43bab 100644
--- a/pkg/backend/init.go
+++ b/pkg/backend/init.go
@@ -34,11 +34,19 @@ func initializeContext(opts *InitOpts) {
func checkErrors(errCh chan string) {
for {
err := <-errCh
+ // TODO consider a queue instead
ctx.Errors = err
go trigger(OnStatusChanged)
}
}
+func resetErrors(errname string) {
+ if ctx.Errors == errname {
+ ctx.Errors = ""
+ log.Println("DEBUG: reset error", errname)
+ }
+}
+
func initializeBitmask(errCh chan string, opts *InitOpts) {
if ctx == nil {
log.Println("bug: cannot initialize bitmask, ctx is nil!")
diff --git a/pkg/config/config.go b/pkg/config/config.go
index e799176..908409a 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -1,22 +1,22 @@
// Code generated by go generate; DO NOT EDIT.
// This file was generated by vendorize.py
-// At 2020-08-19 17:38:43
+// At 2020-08-20 13:39:50
package config
/* All these constants are defined in the vendor.conf file
*/
const (
- Provider = "riseup.net"
- ApplicationName = "RiseupVPN"
- BinaryName = "riseup-vpn"
- Auth = "anon"
- DonateURL = "https://riseup.net/vpn/donate"
- AskForDonations = "true"
- HelpURL = "https://riseup.net/support"
- TosURL = "https://riseup.net/tos"
- APIURL = "https://api.black.riseup.net/"
- GeolocationAPI = "https://api.black.riseup.net:9001/json"
+ Provider = "vpnlib.bitmask.net"
+ ApplicationName = "DemoLib"
+ BinaryName = "demo-lib"
+ Auth = "sip"
+ DonateURL = ""
+ AskForDonations = "false"
+ HelpURL = "https://libraryvpn.org/"
+ TosURL = "https://libraryvpn.org/"
+ APIURL = "https://api.vpnlib.bitmask.net:4430/"
+ GeolocationAPI = "https://getmyip.vpnlib.bitmask.net/json"
)
var Version string
@@ -29,34 +29,11 @@ CaCert : a string containing a representation of the provider CA, used to
*/
var CaCert = []byte(`-----BEGIN CERTIFICATE-----
-MIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl
-dXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE
-AwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw
-NDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaXNldXAgTmV0d29ya3MxGzAZBgNVBAsM
-Emh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UEAwwXUmlzZXVwIE5ldHdvcmtzIFJv
-b3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC76J4ciMJ8Sg0m
-TP7DF2DT9zNe0Csk4myoMFC57rfJeqsAlJCv1XMzBmXrw8wq/9z7XHv6n/0sWU7a
-7cF2hLR33ktjwODlx7vorU39/lXLndo492ZBhXQtG1INMShyv+nlmzO6GT7ESfNE
-LliFitEzwIegpMqxCIHXFuobGSCWF4N0qLHkq/SYUMoOJ96O3hmPSl1kFDRMtWXY
-iw1SEKjUvpyDJpVs3NGxeLCaA7b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