From 4bd49c99385a7ee28f7353de5fa68d1a68a2243a Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 2 Oct 2020 17:06:04 +0200 Subject: [PATCH 001/174] adapt makefile for the crosscompiles on windows --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96f60e33..7baf9851 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TAGS ?= gtk_3_18 -XBUILD ?= no +XBUILD ?= win SKIP_CACHECK ?= no PROVIDER ?= $(shell grep ^'provider =' branding/config/vendor.conf | cut -d '=' -f 2 | tr -d "[:space:]") PROVIDER_CONFIG ?= branding/config/vendor.conf @@ -54,9 +54,13 @@ dependsDarwin: @brew install python3 golang make pkg-config upx curl @brew install --default-names gnu-sed -dependsCygwin: - @choco install -y golang python nssm nsis wget 7zip +#dependsCygwin: +# @choco install -y golang python nssm nsis wget 7zip + +dependsCYGWIN_NT-10.0: + @choco install -y golang python nssm nsis wget 7zip + build: ifeq (${XBUILD}, yes) $(MAKE) build_cross_win @@ -90,7 +94,7 @@ build_bitmaskd: build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' -CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=386 GOOS=windows CC="/usr/bin/i686-w64-mingw32-gcc" CGO_LDFLAGS="-lssp" CXX="i686-w64-mingw32-c++" +CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=amd64 GOOS=windows CC="C:\cygwin64\bin\x86_64-w64-mingw32-gcc" CGO_LDFLAGS="-lssp" CXX="C:\cygwin64\bin\x86_64-w64-mingw32-c++" PLATFORM_WIN = PLATFORM=windows EXTRA_LDFLAGS_WIN = EXTRA_LDFLAGS="-H windowsgui" build_cross_win: From acc5523c126b1415ea16ca72802e6b0eec9d4f9f Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 3 Oct 2020 12:19:08 +0200 Subject: [PATCH 002/174] add package- and pathinfo for Cygwin on win10 --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5cb91fe3..09801fd3 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,19 @@ In file included from /usr/include/gtk-3.0/gtk/gtk.h:106:0, ``` They are expected and don't produce any problem on the systray. +Windows +--------- +Download cygwinn // https://cygwin.com/setup-x86_64.exe +````` +Install with the necessary packages (my case 64bit): +mingw64-x86_64-gcc-core +mingw64-x86_64-gcc-g++ +make + + +```` +Add to Windows Path "C:\cygwin64\bin" + Run it ------------- From aafeda75b5846f0bfe9a5181ffe1cf6155cee1fb Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 3 Oct 2020 12:28:16 +0200 Subject: [PATCH 003/174] Modify readme --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 09801fd3..eb171f43 100644 --- a/README.md +++ b/README.md @@ -49,16 +49,14 @@ They are expected and don't produce any problem on the systray. Windows --------- Download cygwinn // https://cygwin.com/setup-x86_64.exe -````` +``` Install with the necessary packages (my case 64bit): mingw64-x86_64-gcc-core mingw64-x86_64-gcc-g++ make - -```` -Add to Windows Path "C:\cygwin64\bin" - +Add to windowspath "C:\cygwin64\bin" +``` Run it ------------- From 45580d9f0fad16dac9a42f54091998fd557b97c9 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 16 Oct 2020 13:58:52 +0200 Subject: [PATCH 004/174] Add ARCH Variable to select correct compiler in windows-build --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7baf9851..7660f33b 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TAGS ?= gtk_3_18 -XBUILD ?= win +XBUILD ?= no SKIP_CACHECK ?= no PROVIDER ?= $(shell grep ^'provider =' branding/config/vendor.conf | cut -d '=' -f 2 | tr -d "[:space:]") PROVIDER_CONFIG ?= branding/config/vendor.conf @@ -94,7 +94,18 @@ build_bitmaskd: build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' -CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=amd64 GOOS=windows CC="C:\cygwin64\bin\x86_64-w64-mingw32-gcc" CGO_LDFLAGS="-lssp" CXX="C:\cygwin64\bin\x86_64-w64-mingw32-c++" + +ARCH ?= amd64 + +ifeq ($(ARCH), 386) + CCPath ?= i686-w64-mingw32-gcc + CXXPath ?= i686-w64-mingw32-c++ +else + CCPath ?= x86_64-w64-mingw32-gcc + CXXPath ?= x86_64-w64-mingw32-c++ +endif + +CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=$(ARCH) GOOS=windows CC=$(CCPath) CGO_LDFLAGS="-lssp" CXX=$(CXXPath) PLATFORM_WIN = PLATFORM=windows EXTRA_LDFLAGS_WIN = EXTRA_LDFLAGS="-H windowsgui" build_cross_win: From 9901a4e0ff00e499edc1f83c4390e1d3d858d1e4 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 16 Oct 2020 15:01:54 +0200 Subject: [PATCH 005/174] Readme update --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eb171f43..3d2a4f90 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,33 @@ They are expected and don't produce any problem on the systray. Windows --------- -Download cygwinn // https://cygwin.com/setup-x86_64.exe +Download cygwin // https://cygwin.com/setup-x86_64.exe ``` -Install with the necessary packages (my case 64bit): +Install with the necessary packages: + mingw64-x86_64-gcc-core mingw64-x86_64-gcc-g++ +and +x86_64-w64-mingw32-c++ +x86_64-w64-mingw32-gcc make Add to windowspath "C:\cygwin64\bin" +``` +Build it +``` +make build + +Build flags +ARCH : 386 or amd64 (default: amd64) +CCPAath and CXXPath are either paths of compiler or filenames in %PATH% (defaults: x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-c++) + +Examples: +make build ARCH=386 +make build ARCH=386 CCPath=i686-w64-mingw32-gcc CXXPath=i686-w64-mingw32-c++ + +All options can be omitted! + ``` Run it @@ -64,10 +83,10 @@ The default build is a standalone systray. It still requires a helper and openvp [bitmask-root](https://0xacab.org/leap/bitmask-dev/blob/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root) for windows and OSX there is [a helper written in go](https://0xacab.org/leap/bitmask-vpn/tree/master/pkg/helper/). -To build and run it: +Run it: ``` - $ make build $ build/bin/bitmask-vpn + ``` From 7aad9e7dc4c25dce4abd550aef9573f824198fa5 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 21 Oct 2020 18:23:24 +0200 Subject: [PATCH 006/174] Detect cygwin for dependencies --- Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7660f33b..201653b0 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ TEMPLATES = branding/templates SCRIPTS = branding/scripts all: icon locales build - + ######################################################################### # go build @@ -41,9 +41,10 @@ install_go: @sudo apt-get install golang-go depends: - -@make depends$(UNAME) + -@make depends$(patsubst CYGWIN%,Cygwin, $(UNAME)) @go get -u golang.org/x/text/cmd/gotext github.com/cratonica/2goarray - + + dependsLinux: @sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config dh-golang golang-golang-x-text-dev cmake devscripts fakeroot debhelper curl @make -C docker deps @@ -54,12 +55,9 @@ dependsDarwin: @brew install python3 golang make pkg-config upx curl @brew install --default-names gnu-sed -#dependsCygwin: -# @choco install -y golang python nssm nsis wget 7zip - - -dependsCYGWIN_NT-10.0: +dependsCygwin: @choco install -y golang python nssm nsis wget 7zip + build: ifeq (${XBUILD}, yes) From 11ba6c4451b1f9bd34d742f832ea3b8e53f26a28 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 21 Oct 2020 18:28:15 +0200 Subject: [PATCH 007/174] Readme Changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d2a4f90..20113745 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Install with the necessary packages: mingw64-x86_64-gcc-core mingw64-x86_64-gcc-g++ -and + x86_64-w64-mingw32-c++ x86_64-w64-mingw32-gcc make From 8ad269506c237d8553bacb0239d8aa43d85783f7 Mon Sep 17 00:00:00 2001 From: okan <54247090+ok-sh@users.noreply.github.com> Date: Wed, 21 Oct 2020 18:31:52 +0200 Subject: [PATCH 008/174] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 20113745..7a46796a 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ make Add to windowspath "C:\cygwin64\bin" ``` Build it +---------- ``` make build From 3dea323bcdd9f6087f89fee070d0f3488d7208fa Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 21 Oct 2020 18:36:24 +0200 Subject: [PATCH 009/174] Readme Changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a46796a..bc83e361 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ make build Build flags ARCH : 386 or amd64 (default: amd64) -CCPAath and CXXPath are either paths of compiler or filenames in %PATH% (defaults: x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-c++) +CCPath and CXXPath are either paths of compiler or filenames in %PATH% (defaults: x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-c++) Examples: make build ARCH=386 From d7ef0dbd127eb5383890b1ff89c1b0e1ff89c955 Mon Sep 17 00:00:00 2001 From: okan <54247090+ok-sh@users.noreply.github.com> Date: Thu, 22 Oct 2020 13:25:02 +0200 Subject: [PATCH 010/174] Change Readme --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc83e361..29f89ced 100644 --- a/README.md +++ b/README.md @@ -61,22 +61,22 @@ make Add to windowspath "C:\cygwin64\bin" ``` -Build it ----------- +#### Windows Build + ``` make build - +``` Build flags +``` ARCH : 386 or amd64 (default: amd64) CCPath and CXXPath are either paths of compiler or filenames in %PATH% (defaults: x86_64-w64-mingw32-gcc and x86_64-w64-mingw32-c++) - +``` Examples: +``` make build ARCH=386 make build ARCH=386 CCPath=i686-w64-mingw32-gcc CXXPath=i686-w64-mingw32-c++ - -All options can be omitted! - ``` +All options can be omitted! Run it ------------- @@ -86,6 +86,7 @@ for windows and OSX there is [a helper written in go](https://0xacab.org/leap/bi Run it: ``` + $ make build $ build/bin/bitmask-vpn ``` From 2adb4a0df830d0140e33385eea16b247864bb2c9 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 22 Oct 2020 14:12:51 +0200 Subject: [PATCH 011/174] clean up --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 201653b0..ff93dd30 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,6 @@ depends: -@make depends$(patsubst CYGWIN%,Cygwin, $(UNAME)) @go get -u golang.org/x/text/cmd/gotext github.com/cratonica/2goarray - dependsLinux: @sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config dh-golang golang-golang-x-text-dev cmake devscripts fakeroot debhelper curl @make -C docker deps @@ -57,7 +56,6 @@ dependsDarwin: dependsCygwin: @choco install -y golang python nssm nsis wget 7zip - build: ifeq (${XBUILD}, yes) @@ -92,7 +90,6 @@ build_bitmaskd: build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' - ARCH ?= amd64 ifeq ($(ARCH), 386) From 107a930815d92709bd9c91e2cce350dcdf47c4b0 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 22 Oct 2020 15:02:52 +0200 Subject: [PATCH 012/174] Add windows run hint in Readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 29f89ced..1895e6bd 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,14 @@ make build ARCH=386 CCPath=i686-w64-mingw32-gcc CXXPath=i686-w64-mingw32-c++ ``` All options can be omitted! +#### Windows Run + +Rename bitmask-vpn to bitmask-vpn.exe to start with terminal output + +or + +run it with ```run bitmask-vpn``` without output + Run it ------------- The default build is a standalone systray. It still requires a helper and openvpn installed to work. For linux the helper is From 7d48ea5d763f0145e8e38d3c0ab5a87e4cdfa838 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 29 May 2020 22:09:15 +0200 Subject: [PATCH 013/174] [refactor] copy over systray to new package - delete gtk systray module --- pkg/systray/notificator.go | 166 --------------- pkg/systray/signal_unix.go | 34 --- pkg/systray/signal_windows.go | 24 --- pkg/systray/systray.go | 285 -------------------------- pkg/{systray => systray2}/config.go | 0 pkg/{systray => systray2}/pid.go | 0 pkg/{systray => systray2}/pid_test.go | 0 pkg/{systray => systray2}/run.go | 31 +-- 8 files changed, 6 insertions(+), 534 deletions(-) delete mode 100644 pkg/systray/notificator.go delete mode 100644 pkg/systray/signal_unix.go delete mode 100644 pkg/systray/signal_windows.go delete mode 100644 pkg/systray/systray.go rename pkg/{systray => systray2}/config.go (100%) rename pkg/{systray => systray2}/pid.go (100%) rename pkg/{systray => systray2}/pid_test.go (100%) rename pkg/{systray => systray2}/run.go (75%) diff --git a/pkg/systray/notificator.go b/pkg/systray/notificator.go deleted file mode 100644 index a26c7d83..00000000 --- a/pkg/systray/notificator.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package systray - -import ( - "io/ioutil" - "os" - "path" - "runtime" - "time" - - "0xacab.org/leap/bitmask-vpn/pkg/config" - "0xacab.org/leap/go-dialog" - "github.com/skratchdot/open-golang/open" -) - -const ( - donationText = `The %s service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. - -Do you want to donate now?` - aboutText = `%[1]s is an easy, fast, and secure VPN service from %[2]s. %[1]s does not require a user account, keep logs, or track you in any way. - -This service is paid for entirely by donations from users like you. Please donate at %[3]s. - -By using this application, you agree to the Terms of Service available at %[4]s. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place. - - -%[1]v version: %[5]s` - missingAuthAgent = `Could not find a polkit authentication agent. Please run one and try again.` - errorStartingVPN = `Can't connect to %s: %v` - svgFileName = "icon.svg" -) - -type notificator struct { - conf *Config -} - -func newNotificator(conf *Config) *notificator { - n := notificator{conf} - go n.donations() - return &n -} - -func (n *notificator) donations() { - for { - time.Sleep(time.Hour) - if n.conf.needsNotification() { - letsDonate := dialog.Message(n.conf.Printer.Sprintf(donationText, config.ApplicationName)). - Title(n.conf.Printer.Sprintf("Donate")). - Icon(getIconPath()). - YesNo() - n.conf.setNotification() - if letsDonate { - open.Run(config.DonateURL) - n.conf.setDonated() - } - } - } -} - -func (n *notificator) about(version string) { - if version == "" && os.Getenv("SNAP") != "" { - _version, err := ioutil.ReadFile(os.Getenv("SNAP") + "/snap/version.txt") - if err == nil { - version = string(_version) - } - } - dialog.Message(n.conf.Printer.Sprintf(aboutText, config.ApplicationName, config.Provider, config.DonateURL, config.TosURL, version)). - Title(n.conf.Printer.Sprintf("About")). - Icon(getIconPath()). - Info() -} - -func (n *notificator) initFailure(err error) { - dialog.Message(err.Error()). - Title(n.conf.Printer.Sprintf("Initialization error")). - Icon(getIconPath()). - Error() -} - -func (n *notificator) authAgent() { - dialog.Message(n.conf.Printer.Sprintf(missingAuthAgent)). - Title(n.conf.Printer.Sprintf("Missing authentication agent")). - Icon(getIconPath()). - Error() -} - -func (n *notificator) errorStartingVPN(err error) { - dialog.Message(n.conf.Printer.Sprintf(errorStartingVPN, config.ApplicationName, err)). - Title(n.conf.Printer.Sprintf("Error starting VPN")). - Icon(getIconPath()). - Error() -} - -func getIconPath() string { - gopath := os.Getenv("GOPATH") - if gopath == "" { - gopath = path.Join(os.Getenv("HOME"), "go") - } - - if runtime.GOOS == "windows" { - icoPath := `C:\Program Files\` + config.ApplicationName + `\icon.ico` - if fileExist(icoPath) { - return icoPath - } - icoPath = path.Join(gopath, "src", "0xacab.org", "leap", "bitmask-vpn", "branding", "assets", "default", "icon.ico") - if fileExist(icoPath) { - return icoPath - } - return "" - } - - if runtime.GOOS == "darwin" { - icnsPath := "/Applications/" + config.ApplicationName + ".app/Contents/Resources/app.icns" - if fileExist(icnsPath) { - return icnsPath - } - - icnsPath = path.Join(gopath, "src", "0xacab.org", "leap", "bitmask-vpn", "branding", "assets", "default", "icon.icns") - if fileExist(icnsPath) { - return icnsPath - } - return "" - } - - snapPath := os.Getenv("SNAP") - if snapPath != "" { - return snapPath + "/snap/meta/gui/icon.svg" - } - - wd, _ := os.Getwd() - svgPath := path.Join(wd, svgFileName) - if fileExist(svgPath) { - return svgPath - } - - svgPath = "/usr/share/" + config.BinaryName + "/icon.svg" - if fileExist(svgPath) { - return svgPath - } - - svgPath = path.Join(gopath, "src", "0xacab.org", "leap", "bitmask-vpn", "branding", "assets", "default", svgFileName) - if fileExist(svgPath) { - return svgPath - } - - return "" -} - -func fileExist(filePath string) bool { - _, err := os.Stat(filePath) - return err == nil -} diff --git a/pkg/systray/signal_unix.go b/pkg/systray/signal_unix.go deleted file mode 100644 index d9e784d5..00000000 --- a/pkg/systray/signal_unix.go +++ /dev/null @@ -1,34 +0,0 @@ -// +build !windows -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package systray - -import ( - "os" - "os/signal" - "syscall" - - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" -) - -func listenSignals(bm bitmask.Bitmask) { - sigusrCh := make(chan os.Signal, 1) - signal.Notify(sigusrCh, syscall.SIGUSR1) - - for range sigusrCh { - bm.ReloadFirewall() - } -} diff --git a/pkg/systray/signal_windows.go b/pkg/systray/signal_windows.go deleted file mode 100644 index ac0528c4..00000000 --- a/pkg/systray/signal_windows.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build windows -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package systray - -import ( - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" -) - -func listenSignals(bm bitmask.Bitmask) { -} diff --git a/pkg/systray/systray.go b/pkg/systray/systray.go deleted file mode 100644 index 6bd58b86..00000000 --- a/pkg/systray/systray.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package systray - -import ( - "fmt" - "log" - "os" - "os/signal" - "strconv" - "time" - - "0xacab.org/leap/bitmask-vpn/icon" - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" - "0xacab.org/leap/bitmask-vpn/pkg/config" - "github.com/getlantern/systray" - "github.com/skratchdot/open-golang/open" -) - -type bmTray struct { - bm bitmask.Bitmask - conf *Config - notify *notificator - waitCh chan bool - mStatus *systray.MenuItem - mTurnOn *systray.MenuItem - mTurnOff *systray.MenuItem - mHelp *systray.MenuItem - mDonate *systray.MenuItem - mAbout *systray.MenuItem - mQuit *systray.MenuItem - activeGateway *gatewayTray - autostart bitmask.Autostart -} - -type gatewayTray struct { - menuItem *systray.MenuItem - name string -} - -func (bt *bmTray) start() { - // XXX this removes the snap error message, but produces an invisible icon. - // https://0xacab.org/leap/riseup_vpn/issues/44 - // os.Setenv("TMPDIR", "/var/tmp") - systray.Run(bt.onReady, bt.onExit) -} - -func (bt *bmTray) quit() { - systray.Quit() -} - -func (bt *bmTray) onExit() { - log.Println("Closing systray") -} - -func (bt *bmTray) onReady() { - printer := bt.conf.Printer - systray.SetIcon(icon.Off) - - bt.mStatus = systray.AddMenuItem(printer.Sprintf("Checking status..."), "") - bt.mStatus.Disable() - bt.waitCh <- true -} - -func (bt *bmTray) setUpSystray() { - printer := bt.conf.Printer - bt.mTurnOn = systray.AddMenuItem(printer.Sprintf("Turn on"), "") - bt.mTurnOn.Hide() - bt.mTurnOff = systray.AddMenuItem(printer.Sprintf("Turn off"), "") - bt.mTurnOff.Hide() - systray.AddSeparator() - - if bt.conf.SelectGateway { - bt.addGateways() - } - - bt.mHelp = systray.AddMenuItem(printer.Sprintf("Help..."), "") - bt.mDonate = systray.AddMenuItem(printer.Sprintf("Donate..."), "") - - bt.mAbout = systray.AddMenuItem(printer.Sprintf("About..."), "") - systray.AddSeparator() - - bt.mQuit = systray.AddMenuItem(printer.Sprintf("Quit"), "") - - showDonate, err := strconv.ParseBool(config.AskForDonations) - if err != nil { - log.Printf("Error parsing AskForDonations: %v", err) - showDonate = true - } - if !showDonate { - bt.mDonate.Hide() - } - -} - -func (bt *bmTray) loop(bm bitmask.Bitmask, notify *notificator, as bitmask.Autostart) { - <-bt.waitCh - bt.waitCh = nil - - bt.bm = bm - bt.notify = notify - bt.autostart = as - bt.setUpSystray() - - signalCh := make(chan os.Signal, 1) - signal.Notify(signalCh, os.Interrupt) - - ch := bt.bm.GetStatusCh() - if status, err := bt.bm.GetStatus(); err != nil { - log.Printf("Error getting status: %v", err) - } else { - bt.changeStatus(status) - } - - for { - select { - case status := <-ch: - log.Println("status: " + status) - bt.changeStatus(status) - - case <-bt.mTurnOn.ClickedCh: - log.Println("on") - bt.changeStatus("starting") - bt.bm.StartVPN(config.Provider) - bt.conf.setUserStoppedVPN(false) - case <-bt.mTurnOff.ClickedCh: - log.Println("off") - bt.changeStatus("stopping") - bt.bm.StopVPN() - bt.conf.setUserStoppedVPN(true) - - case <-bt.mHelp.ClickedCh: - open.Run(config.HelpURL) - case <-bt.mDonate.ClickedCh: - bt.conf.setDonated() - open.Run(config.DonateURL) - case <-bt.mAbout.ClickedCh: - bitmaskVersion, err := bt.bm.Version() - versionStr := bt.conf.Version - if err != nil { - log.Printf("Error getting version: %v", err) - } else if bitmaskVersion != "" { - versionStr = fmt.Sprintf("%s (bitmaskd %s)", bt.conf.Version, bitmaskVersion) - } - go bt.notify.about(versionStr) - - case <-bt.mQuit.ClickedCh: - err := bt.autostart.Disable() - if err != nil { - log.Printf("Error disabling autostart: %v", err) - } - /* we return and leave bt.quit() to the caller */ - return - case <-signalCh: - /* we return and leave bt.quit() to the caller */ - return - - case <-time.After(5 * time.Second): - if status, err := bt.bm.GetStatus(); err != nil { - log.Printf("Error getting status: %v", err) - } else { - bt.changeStatus(status) - } - } - } -} - -func (bt *bmTray) addGateways() { - gatewayList, err := bt.bm.ListGateways(config.Provider) - if err != nil { - log.Printf("Gateway initialization error: %v", err) - return - } - - mGateway := systray.AddMenuItem(bt.conf.Printer.Sprintf("Route traffic through:"), "") - mGateway.Disable() - for i, city := range gatewayList { - menuItem := systray.AddMenuItem(city, bt.conf.Printer.Sprintf("Use %s %v gateway", config.ApplicationName, city)) - gateway := gatewayTray{menuItem, city} - - if i == 0 { - menuItem.Check() - menuItem.SetTitle("*" + city) - bt.activeGateway = &gateway - } else { - menuItem.Uncheck() - } - - go func(gateway gatewayTray) { - for { - <-menuItem.ClickedCh - gateway.menuItem.SetTitle("*" + gateway.name) - gateway.menuItem.Check() - - bt.activeGateway.menuItem.Uncheck() - bt.activeGateway.menuItem.SetTitle(bt.activeGateway.name) - bt.activeGateway = &gateway - - bt.bm.UseGateway(gateway.name) - log.Printf("Manual connection to %s gateway\n", gateway.name) - bt.bm.StartVPN(config.Provider) - } - }(gateway) - } - - systray.AddSeparator() -} - -func (bt *bmTray) changeStatus(status string) { - printer := bt.conf.Printer - if bt.waitCh != nil { - bt.waitCh <- true - bt.waitCh = nil - } - - var statusStr string - switch status { - case "on": - systray.SetIcon(icon.On) - bt.mTurnOff.SetTitle(printer.Sprintf("Turn off")) - statusStr = printer.Sprintf("%s on", config.ApplicationName) - bt.mTurnOn.Hide() - bt.mTurnOff.Show() - - case "off": - systray.SetIcon(icon.Off) - bt.mTurnOn.SetTitle(printer.Sprintf("Turn on")) - statusStr = printer.Sprintf("%s off", config.ApplicationName) - bt.mTurnOn.Show() - bt.mTurnOff.Hide() - - case "starting": - bt.waitCh = make(chan bool) - go bt.waitIcon() - bt.mTurnOff.SetTitle(printer.Sprintf("Cancel")) - statusStr = printer.Sprintf("Connecting to %s", config.ApplicationName) - bt.mTurnOn.Hide() - bt.mTurnOff.Show() - - case "stopping": - bt.waitCh = make(chan bool) - go bt.waitIcon() - statusStr = printer.Sprintf("Stopping %s", config.ApplicationName) - bt.mTurnOn.Hide() - bt.mTurnOff.Hide() - - case "failed": - systray.SetIcon(icon.Blocked) - bt.mTurnOn.SetTitle(printer.Sprintf("Reconnect")) - bt.mTurnOff.SetTitle(printer.Sprintf("Turn off")) - statusStr = printer.Sprintf("%s blocking internet", config.ApplicationName) - bt.mTurnOn.Show() - bt.mTurnOff.Show() - } - - systray.SetTooltip(statusStr) - bt.mStatus.SetTitle(statusStr) -} - -func (bt *bmTray) waitIcon() { - icons := [][]byte{icon.Wait0, icon.Wait1, icon.Wait2, icon.Wait3} - for i := 0; true; i = (i + 1) % 4 { - systray.SetIcon(icons[i]) - - select { - case <-bt.waitCh: - return - case <-time.After(time.Millisecond * 500): - continue - } - } -} diff --git a/pkg/systray/config.go b/pkg/systray2/config.go similarity index 100% rename from pkg/systray/config.go rename to pkg/systray2/config.go diff --git a/pkg/systray/pid.go b/pkg/systray2/pid.go similarity index 100% rename from pkg/systray/pid.go rename to pkg/systray2/pid.go diff --git a/pkg/systray/pid_test.go b/pkg/systray2/pid_test.go similarity index 100% rename from pkg/systray/pid_test.go rename to pkg/systray2/pid_test.go diff --git a/pkg/systray/run.go b/pkg/systray2/run.go similarity index 75% rename from pkg/systray/run.go rename to pkg/systray2/run.go index 5764b367..937fb58b 100644 --- a/pkg/systray/run.go +++ b/pkg/systray2/run.go @@ -23,19 +23,6 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/config" ) -func Run(conf *Config) { - bt := bmTray{conf: conf, waitCh: make(chan bool)} - finishedCh := make(chan bool) - go initialize(conf, &bt, finishedCh) - go func() { - <-finishedCh - /* in osx, systray.Quit() halts the program */ - bt.quit() - os.Exit(0) - }() - bt.start() -} - func initialize(conf *Config, bt *bmTray, finishedCh chan bool) { defer func() { finishedCh <- true }() if _, err := os.Stat(config.Path); os.IsNotExist(err) { @@ -48,38 +35,35 @@ func initialize(conf *Config, bt *bmTray, finishedCh chan bool) { } defer releasePID() - notify := newNotificator(conf) - b, err := bitmask.Init(conf.Printer) if err != nil { - notify.initFailure(err) + // TODO notify failure return } defer b.Close() - go checkAndStartBitmask(b, notify, conf) + go checkAndStartBitmask(b, conf) go listenSignals(b) var as bitmask.Autostart if conf.DisableAustostart { as = &bitmask.DummyAutostart{} } else { - as = bitmask.NewAutostart(config.ApplicationName, getIconPath()) + as = bitmask.NewAutostart(config.ApplicationName, "") } err = as.Enable() if err != nil { log.Printf("Error enabling autostart: %v", err) } - bt.loop(b, notify, as) } -func checkAndStartBitmask(b bitmask.Bitmask, notify *notificator, conf *Config) { +func checkAndStartBitmask(b bitmask.Bitmask, conf *Config) { if conf.Obfs4 { err := b.UseTransport("obfs4") if err != nil { log.Printf("Error setting transport: %v", err) } } - err := checkAndInstallHelpers(b, notify) + err := checkAndInstallHelpers(b) if err != nil { log.Printf("Is bitmask running? %v", err) os.Exit(1) @@ -87,19 +71,16 @@ func checkAndStartBitmask(b bitmask.Bitmask, notify *notificator, conf *Config) err = maybeStartVPN(b, conf) if err != nil { log.Println("Error starting VPN: ", err) - notify.errorStartingVPN(err) } } -func checkAndInstallHelpers(b bitmask.Bitmask, notify *notificator) error { +func checkAndInstallHelpers(b bitmask.Bitmask) error { helpers, priviledge, err := b.VPNCheck() if (err != nil && err.Error() == "nopolkit") || (err == nil && !priviledge) { log.Printf("No polkit found") - notify.authAgent() os.Exit(1) } else if err != nil { log.Printf("Error checking vpn: %v", err) - notify.errorStartingVPN(err) return err } From 87b3fa9093a7e06aee12b9cb016033f6a34f982d Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:39:41 +0200 Subject: [PATCH 014/174] [feat] add qt gui Signed-off-by: kali kaneko (leap communications) --- .../assets/icon}/ico/black/vpn_blocked.ico | Bin .../assets/icon}/ico/black/vpn_off.ico | Bin .../assets/icon}/ico/black/vpn_on.ico | Bin .../assets/icon}/ico/black/vpn_wait_0.ico | Bin .../assets/icon}/ico/black/vpn_wait_1.ico | Bin .../assets/icon}/ico/black/vpn_wait_2.ico | Bin .../assets/icon}/ico/black/vpn_wait_3.ico | Bin .../assets/icon}/ico/white/vpn_blocked.ico | Bin .../assets/icon}/ico/white/vpn_off.ico | Bin .../assets/icon}/ico/white/vpn_on.ico | Bin .../assets/icon}/ico/white/vpn_wait_0.ico | Bin .../assets/icon}/ico/white/vpn_wait_1.ico | Bin .../assets/icon}/ico/white/vpn_wait_2.ico | Bin .../assets/icon}/ico/white/vpn_wait_3.ico | Bin .../assets/icon}/png/black/vpn_blocked.png | Bin .../assets/icon}/png/black/vpn_off.png | Bin .../assets/icon}/png/black/vpn_on.png | Bin .../assets/icon}/png/black/vpn_wait_0.png | Bin .../assets/icon}/png/black/vpn_wait_1.png | Bin .../assets/icon}/png/black/vpn_wait_2.png | Bin .../assets/icon}/png/black/vpn_wait_3.png | Bin .../assets/icon}/png/white/vpn_blocked.png | Bin .../assets/icon}/png/white/vpn_off.png | Bin .../assets/icon}/png/white/vpn_on.png | Bin .../assets/icon}/png/white/vpn_wait_0.png | Bin .../assets/icon}/png/white/vpn_wait_1.png | Bin .../assets/icon}/png/white/vpn_wait_2.png | Bin .../assets/icon}/png/white/vpn_wait_3.png | Bin gui/gui.qrc | 21 + gui/handlers.cpp | 30 ++ gui/handlers.h | 39 ++ gui/main.cpp | 111 +++++ gui/qjsonmodel.cpp | 419 ++++++++++++++++ gui/qjsonmodel.h | 111 +++++ gui/qml/main.qml | 208 ++++++++ icon/Makefile | 25 - icon/blocked_darwin.go | 77 --- icon/blocked_unix.go | 79 --- icon/blocked_win.go | 471 ------------------ icon/make_icon.bat | 41 -- icon/off_darwin.go | 89 ---- icon/off_unix.go | 89 ---- icon/off_win.go | 471 ------------------ icon/on_darwin.go | 90 ---- icon/on_unix.go | 90 ---- icon/on_win.go | 471 ------------------ icon/wait_0_darwin.go | 116 ----- icon/wait_0_unix.go | 116 ----- icon/wait_0_win.go | 471 ------------------ icon/wait_1_darwin.go | 115 ----- icon/wait_1_unix.go | 114 ----- icon/wait_1_win.go | 471 ------------------ icon/wait_2_darwin.go | 113 ----- icon/wait_2_unix.go | 113 ----- icon/wait_2_win.go | 471 ------------------ icon/wait_3_darwin.go | 116 ----- icon/wait_3_unix.go | 115 ----- icon/wait_3_win.go | 471 ------------------ 58 files changed, 939 insertions(+), 4795 deletions(-) rename {icon => gui/assets/icon}/ico/black/vpn_blocked.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_off.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_on.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_wait_0.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_wait_1.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_wait_2.ico (100%) rename {icon => gui/assets/icon}/ico/black/vpn_wait_3.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_blocked.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_off.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_on.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_wait_0.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_wait_1.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_wait_2.ico (100%) rename {icon => gui/assets/icon}/ico/white/vpn_wait_3.ico (100%) rename {icon => gui/assets/icon}/png/black/vpn_blocked.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_off.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_on.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_wait_0.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_wait_1.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_wait_2.png (100%) rename {icon => gui/assets/icon}/png/black/vpn_wait_3.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_blocked.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_off.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_on.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_wait_0.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_wait_1.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_wait_2.png (100%) rename {icon => gui/assets/icon}/png/white/vpn_wait_3.png (100%) create mode 100644 gui/gui.qrc create mode 100644 gui/handlers.cpp create mode 100644 gui/handlers.h create mode 100644 gui/main.cpp create mode 100644 gui/qjsonmodel.cpp create mode 100644 gui/qjsonmodel.h create mode 100644 gui/qml/main.qml delete mode 100644 icon/Makefile delete mode 100644 icon/blocked_darwin.go delete mode 100644 icon/blocked_unix.go delete mode 100644 icon/blocked_win.go delete mode 100644 icon/make_icon.bat delete mode 100644 icon/off_darwin.go delete mode 100644 icon/off_unix.go delete mode 100644 icon/off_win.go delete mode 100644 icon/on_darwin.go delete mode 100644 icon/on_unix.go delete mode 100644 icon/on_win.go delete mode 100644 icon/wait_0_darwin.go delete mode 100644 icon/wait_0_unix.go delete mode 100644 icon/wait_0_win.go delete mode 100644 icon/wait_1_darwin.go delete mode 100644 icon/wait_1_unix.go delete mode 100644 icon/wait_1_win.go delete mode 100644 icon/wait_2_darwin.go delete mode 100644 icon/wait_2_unix.go delete mode 100644 icon/wait_2_win.go delete mode 100644 icon/wait_3_darwin.go delete mode 100644 icon/wait_3_unix.go delete mode 100644 icon/wait_3_win.go diff --git a/icon/ico/black/vpn_blocked.ico b/gui/assets/icon/ico/black/vpn_blocked.ico similarity index 100% rename from icon/ico/black/vpn_blocked.ico rename to gui/assets/icon/ico/black/vpn_blocked.ico diff --git a/icon/ico/black/vpn_off.ico b/gui/assets/icon/ico/black/vpn_off.ico similarity index 100% rename from icon/ico/black/vpn_off.ico rename to gui/assets/icon/ico/black/vpn_off.ico diff --git a/icon/ico/black/vpn_on.ico b/gui/assets/icon/ico/black/vpn_on.ico similarity index 100% rename from icon/ico/black/vpn_on.ico rename to gui/assets/icon/ico/black/vpn_on.ico diff --git a/icon/ico/black/vpn_wait_0.ico b/gui/assets/icon/ico/black/vpn_wait_0.ico similarity index 100% rename from icon/ico/black/vpn_wait_0.ico rename to gui/assets/icon/ico/black/vpn_wait_0.ico diff --git a/icon/ico/black/vpn_wait_1.ico b/gui/assets/icon/ico/black/vpn_wait_1.ico similarity index 100% rename from icon/ico/black/vpn_wait_1.ico rename to gui/assets/icon/ico/black/vpn_wait_1.ico diff --git a/icon/ico/black/vpn_wait_2.ico b/gui/assets/icon/ico/black/vpn_wait_2.ico similarity index 100% rename from icon/ico/black/vpn_wait_2.ico rename to gui/assets/icon/ico/black/vpn_wait_2.ico diff --git a/icon/ico/black/vpn_wait_3.ico b/gui/assets/icon/ico/black/vpn_wait_3.ico similarity index 100% rename from icon/ico/black/vpn_wait_3.ico rename to gui/assets/icon/ico/black/vpn_wait_3.ico diff --git a/icon/ico/white/vpn_blocked.ico b/gui/assets/icon/ico/white/vpn_blocked.ico similarity index 100% rename from icon/ico/white/vpn_blocked.ico rename to gui/assets/icon/ico/white/vpn_blocked.ico diff --git a/icon/ico/white/vpn_off.ico b/gui/assets/icon/ico/white/vpn_off.ico similarity index 100% rename from icon/ico/white/vpn_off.ico rename to gui/assets/icon/ico/white/vpn_off.ico diff --git a/icon/ico/white/vpn_on.ico b/gui/assets/icon/ico/white/vpn_on.ico similarity index 100% rename from icon/ico/white/vpn_on.ico rename to gui/assets/icon/ico/white/vpn_on.ico diff --git a/icon/ico/white/vpn_wait_0.ico b/gui/assets/icon/ico/white/vpn_wait_0.ico similarity index 100% rename from icon/ico/white/vpn_wait_0.ico rename to gui/assets/icon/ico/white/vpn_wait_0.ico diff --git a/icon/ico/white/vpn_wait_1.ico b/gui/assets/icon/ico/white/vpn_wait_1.ico similarity index 100% rename from icon/ico/white/vpn_wait_1.ico rename to gui/assets/icon/ico/white/vpn_wait_1.ico diff --git a/icon/ico/white/vpn_wait_2.ico b/gui/assets/icon/ico/white/vpn_wait_2.ico similarity index 100% rename from icon/ico/white/vpn_wait_2.ico rename to gui/assets/icon/ico/white/vpn_wait_2.ico diff --git a/icon/ico/white/vpn_wait_3.ico b/gui/assets/icon/ico/white/vpn_wait_3.ico similarity index 100% rename from icon/ico/white/vpn_wait_3.ico rename to gui/assets/icon/ico/white/vpn_wait_3.ico diff --git a/icon/png/black/vpn_blocked.png b/gui/assets/icon/png/black/vpn_blocked.png similarity index 100% rename from icon/png/black/vpn_blocked.png rename to gui/assets/icon/png/black/vpn_blocked.png diff --git a/icon/png/black/vpn_off.png b/gui/assets/icon/png/black/vpn_off.png similarity index 100% rename from icon/png/black/vpn_off.png rename to gui/assets/icon/png/black/vpn_off.png diff --git a/icon/png/black/vpn_on.png b/gui/assets/icon/png/black/vpn_on.png similarity index 100% rename from icon/png/black/vpn_on.png rename to gui/assets/icon/png/black/vpn_on.png diff --git a/icon/png/black/vpn_wait_0.png b/gui/assets/icon/png/black/vpn_wait_0.png similarity index 100% rename from icon/png/black/vpn_wait_0.png rename to gui/assets/icon/png/black/vpn_wait_0.png diff --git a/icon/png/black/vpn_wait_1.png b/gui/assets/icon/png/black/vpn_wait_1.png similarity index 100% rename from icon/png/black/vpn_wait_1.png rename to gui/assets/icon/png/black/vpn_wait_1.png diff --git a/icon/png/black/vpn_wait_2.png b/gui/assets/icon/png/black/vpn_wait_2.png similarity index 100% rename from icon/png/black/vpn_wait_2.png rename to gui/assets/icon/png/black/vpn_wait_2.png diff --git a/icon/png/black/vpn_wait_3.png b/gui/assets/icon/png/black/vpn_wait_3.png similarity index 100% rename from icon/png/black/vpn_wait_3.png rename to gui/assets/icon/png/black/vpn_wait_3.png diff --git a/icon/png/white/vpn_blocked.png b/gui/assets/icon/png/white/vpn_blocked.png similarity index 100% rename from icon/png/white/vpn_blocked.png rename to gui/assets/icon/png/white/vpn_blocked.png diff --git a/icon/png/white/vpn_off.png b/gui/assets/icon/png/white/vpn_off.png similarity index 100% rename from icon/png/white/vpn_off.png rename to gui/assets/icon/png/white/vpn_off.png diff --git a/icon/png/white/vpn_on.png b/gui/assets/icon/png/white/vpn_on.png similarity index 100% rename from icon/png/white/vpn_on.png rename to gui/assets/icon/png/white/vpn_on.png diff --git a/icon/png/white/vpn_wait_0.png b/gui/assets/icon/png/white/vpn_wait_0.png similarity index 100% rename from icon/png/white/vpn_wait_0.png rename to gui/assets/icon/png/white/vpn_wait_0.png diff --git a/icon/png/white/vpn_wait_1.png b/gui/assets/icon/png/white/vpn_wait_1.png similarity index 100% rename from icon/png/white/vpn_wait_1.png rename to gui/assets/icon/png/white/vpn_wait_1.png diff --git a/icon/png/white/vpn_wait_2.png b/gui/assets/icon/png/white/vpn_wait_2.png similarity index 100% rename from icon/png/white/vpn_wait_2.png rename to gui/assets/icon/png/white/vpn_wait_2.png diff --git a/icon/png/white/vpn_wait_3.png b/gui/assets/icon/png/white/vpn_wait_3.png similarity index 100% rename from icon/png/white/vpn_wait_3.png rename to gui/assets/icon/png/white/vpn_wait_3.png diff --git a/gui/gui.qrc b/gui/gui.qrc new file mode 100644 index 00000000..705c2b74 --- /dev/null +++ b/gui/gui.qrc @@ -0,0 +1,21 @@ + + + qml/main.qml + + assets/icon/png/black/vpn_off.png + assets/icon/png/black/vpn_on.png + assets/icon/png/black/vpn_wait_0.png + assets/icon/png/black/vpn_wait_1.png + assets/icon/png/black/vpn_wait_2.png + assets/icon/png/black/vpn_wait_3.png + + assets/icon/png/white/vpn_off.png + assets/icon/png/white/vpn_on.png + assets/icon/png/white/vpn_wait_0.png + assets/icon/png/white/vpn_wait_1.png + assets/icon/png/white/vpn_wait_2.png + assets/icon/png/white/vpn_wait_3.png + + + + diff --git a/gui/handlers.cpp b/gui/handlers.cpp new file mode 100644 index 00000000..79fbb582 --- /dev/null +++ b/gui/handlers.cpp @@ -0,0 +1,30 @@ +#include +#include + +#include "handlers.h" +#include "lib/libgoshim.h" + +Backend::Backend(QObject *parent) : QObject(parent) +{ +} + +void Backend::switchOn() +{ + SwitchOn(); +} + +void Backend::switchOff() +{ + SwitchOff(); +} + +void Backend::unblock() +{ + Unblock(); +} + +void Backend::quit() +{ + Quit(); + emit this->quitDone(); +} diff --git a/gui/handlers.h b/gui/handlers.h new file mode 100644 index 00000000..0a8782d7 --- /dev/null +++ b/gui/handlers.h @@ -0,0 +1,39 @@ +#ifndef HANDLERS_H +#define HANDLERS_H + +#include +#include +#include "qjsonmodel.h" + +class QJsonWatch : public QObject { + + Q_OBJECT + + QJsonModel *model; + +public: + +signals: + + void jsonChanged(QString json); + +}; + +class Backend : public QObject { + + Q_OBJECT + +public: + explicit Backend(QObject *parent = 0); + +signals: + void quitDone(); + +public slots: + void switchOn(); + void switchOff(); + void unblock(); + void quit(); +}; + +#endif // HANDLERS_H diff --git a/gui/main.cpp b/gui/main.cpp new file mode 100644 index 00000000..f2545d39 --- /dev/null +++ b/gui/main.cpp @@ -0,0 +1,111 @@ +#include +#include +#include +#include +#include +#include + +#include "handlers.h" +#include "qjsonmodel.h" +#include "lib/libgoshim.h" + +/* Hi! I'm Troy McClure and I'll be your guide today. You probably remember me + from blockbusters like "here be dragons" and "darling, I wrote a little + contraption". */ + +/* Our glorious global object state. In here we store a serialized snapshot of + the context from the application "backend", living in the linked Go-land + lib. */ + +static char *json; + +/* We are interested in observing changes to this global json variable. + The jsonWatchdog bridges the gap from pure c callbacks to the rest of the c++ + logic. QJsonWatch comes from QObject so it can emit signals. */ + +QJsonWatch *qw; + +struct jsonWatchdog { + jsonWatchdog() { qw = new QJsonWatch; } + void changed() { emit qw->jsonChanged(QString(json)); } +}; + +/* we need C wrappers around every C++ object, so that we can invoke their methods + from the function pointers passed as callbacks to CGO. */ +extern "C" { +static void *newWatchdog(void) { return (void *)(new jsonWatchdog); } +static void jsonChanged(void *ptr) { + if (ptr != NULL) { + jsonWatchdog *klsPtr = static_cast(ptr); + klsPtr->changed(); + } +} +} + +void *wd = newWatchdog(); + +/* onStatusChanged is the C function that we register as a callback with CGO, + to be called from the Go side. It pulls a string serialization of the + context object, than we then pass along to Qt objects and to Qml. */ +void onStatusChanged() { + char *ctx = RefreshContext(); + json = ctx; + /* the method wrapped emits a qt signal */ + jsonChanged(wd); + free(ctx); +} + +std::string getEnv(std::string const& key) +{ + char const* val = getenv(key.c_str()); + return val == NULL ? std::string() : std::string(val); +} + +int main(int argc, char **argv) { + + bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; + + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication app(argc, argv); + app.setQuitOnLastWindowClosed(false); + QQmlApplicationEngine engine; + QQmlContext *ctx = engine.rootContext(); + + QJsonModel *model = new QJsonModel; + std::string json = R"({"appName": "unknown", "provider": "unknown"})"; + model->loadJson(QByteArray::fromStdString(json)); + + /* the backend handler has slots for calling back to Go when triggered by + signals in Qml. */ + Backend backend; + ctx->setContextProperty("backend", &backend); + + /* set the json model, load the qml */ + ctx->setContextProperty("jsonModel", model); + ctx->setContextProperty("debugQml", debugQml); + + engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); + + /* connect the jsonChanged signal explicitely. + In the lambda, we reload the json in the model every time we receive an + update from Go */ + QObject::connect(qw, &QJsonWatch::jsonChanged, [ctx, model](QString js) { + model->loadJson(js.toUtf8()); + }); + + /* connect quitDone signal, exit app */ + QObject::connect(&backend, &Backend::quitDone, []() { + QGuiApplication::quit(); + }); + + /* register statusChanged callback with CGO */ + const char *stCh = "OnStatusChanged"; + GoString statusChangedEvt = {stCh, (long int)strlen(stCh)}; + SubscribeToEvent(statusChangedEvt, (void *)onStatusChanged); + + /* let the Go side initialize its internal state */ + InitializeBitmaskContext(); + + /* kick off your shoes, put your feet up */ + return app.exec(); +} diff --git a/gui/qjsonmodel.cpp b/gui/qjsonmodel.cpp new file mode 100644 index 00000000..4e36eb83 --- /dev/null +++ b/gui/qjsonmodel.cpp @@ -0,0 +1,419 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2011 SCHUTZ Sacha + * Copyright (c) 2020 Kali Kaneko + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include + +#include "qjsonmodel.h" + + +QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent) +{ + mParent = parent; +} + +QJsonTreeItem::~QJsonTreeItem() +{ + qDeleteAll(mChilds); +} + +void QJsonTreeItem::appendChild(QJsonTreeItem *item) +{ + mChilds.append(item); +} + +QJsonTreeItem *QJsonTreeItem::child(int row) +{ + return mChilds.value(row); +} + +QJsonTreeItem *QJsonTreeItem::parent() +{ + return mParent; +} + +int QJsonTreeItem::childCount() const +{ + return mChilds.count(); +} + +int QJsonTreeItem::row() const +{ + if (mParent) + return mParent->mChilds.indexOf(const_cast(this)); + + return 0; +} + +void QJsonTreeItem::setKey(const QString &key) +{ + mKey = key; +} + +void QJsonTreeItem::setValue(const QString &value) +{ + mValue = value; +} + +void QJsonTreeItem::setType(const QJsonValue::Type &type) +{ + mType = type; +} + +QString QJsonTreeItem::key() const +{ + return mKey; +} + +QString QJsonTreeItem::value() const +{ + return mValue; +} + +QJsonValue::Type QJsonTreeItem::type() const +{ + return mType; +} + +QJsonTreeItem* QJsonTreeItem::load(const QJsonValue& value, QJsonTreeItem* parent) +{ + QJsonTreeItem * rootItem = new QJsonTreeItem(parent); + rootItem->setKey("root"); + + if ( value.isObject()) + { + + //Get all QJsonValue childs + for (QString key : value.toObject().keys()){ + QJsonValue v = value.toObject().value(key); + QJsonTreeItem * child = load(v,rootItem); + child->setKey(key); + child->setType(v.type()); + rootItem->appendChild(child); + + } + + } + + else if ( value.isArray()) + { + //Get all QJsonValue childs + int index = 0; + for (QJsonValue v : value.toArray()){ + + QJsonTreeItem * child = load(v,rootItem); + child->setKey(QString::number(index)); + child->setType(v.type()); + rootItem->appendChild(child); + ++index; + } + } + else + { + rootItem->setValue(value.toVariant().toString()); + rootItem->setType(value.type()); + } + + return rootItem; +} + +//========================================================================= + +QJsonModel::QJsonModel(QObject *parent) + : QAbstractItemModel(parent) + , mRootItem{new QJsonTreeItem} +{ + mHeaders.append("key"); + mHeaders.append("value"); +} + +QJsonModel::QJsonModel(const QString& fileName, QObject *parent) + : QAbstractItemModel(parent) + , mRootItem{new QJsonTreeItem} +{ + mHeaders.append("key"); + mHeaders.append("value"); + load(fileName); +} + +QJsonModel::QJsonModel(QIODevice * device, QObject *parent) + : QAbstractItemModel(parent) + , mRootItem{new QJsonTreeItem} +{ + mHeaders.append("key"); + mHeaders.append("value"); + load(device); +} + +QJsonModel::QJsonModel(const QByteArray& json, QObject *parent) + : QAbstractItemModel(parent) + , mRootItem{new QJsonTreeItem} +{ + mHeaders.append("key"); + mHeaders.append("value"); + loadJson(json); +} + +QJsonModel::~QJsonModel() +{ + delete mRootItem; +} + +bool QJsonModel::load(const QString &fileName) +{ + QFile file(fileName); + bool success = false; + if (file.open(QIODevice::ReadOnly)) { + success = load(&file); + file.close(); + } + else success = false; + + return success; +} + +bool QJsonModel::load(QIODevice *device) +{ + return loadJson(device->readAll()); +} + +bool QJsonModel::loadJson(const QByteArray &json) +{ + auto const& jdoc = QJsonDocument::fromJson(json); + + if (!jdoc.isNull()) + { + beginResetModel(); + + delete mRootItem; + + if (jdoc.isArray()) { + mRootItem = QJsonTreeItem::load(QJsonValue(jdoc.array())); + mRootItem->setType(QJsonValue::Array); + } else { + mRootItem = QJsonTreeItem::load(QJsonValue(jdoc.object())); + mRootItem->setType(QJsonValue::Object); + } + endResetModel(); + + // ??? + emit dataChanged(QModelIndex(), QModelIndex(), {}); + return true; + } + + qDebug()<(index.internalPointer()); + + + switch (role) { + case Roles::KeyRole: + return item->key(); + case Roles::ValueRole: + return item->value(); + case Qt::DisplayRole: + { + if (index.column() == 0) + return QString("%1").arg(item->key()); + else if (index.column() == 1) + return QString("%1").arg(item->value()); + else + return QString(""); + + } + case Qt::EditRole: + { + if (index.column() == 1) + return QString("%1").arg(item->value()); + else + return QString(""); + } + default: + return QVariant(); + } + return QVariant(); + +} + +bool QJsonModel::setData(const QModelIndex &index, const QVariant &value, int role) +{ + int col = index.column(); + if (Qt::EditRole == role) { + if (col == 1) { + QJsonTreeItem *item = static_cast(index.internalPointer()); + item->setValue(value.toString()); + emit dataChanged(index, index, {Qt::EditRole}); + return true; + } + } + + return false; +} + +QVariant QJsonModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if (role != Qt::DisplayRole) + return QVariant(); + + if (orientation == Qt::Horizontal) { + + return mHeaders.value(section); + } + else + return QVariant(); +} + +QModelIndex QJsonModel::index(int row, int column, const QModelIndex &parent) const +{ + if (!hasIndex(row, column, parent)) + return QModelIndex(); + + QJsonTreeItem *parentItem; + + if (!parent.isValid()) + parentItem = mRootItem; + else + parentItem = static_cast(parent.internalPointer()); + + QJsonTreeItem *childItem = parentItem->child(row); + if (childItem) + return createIndex(row, column, childItem); + else + return QModelIndex(); +} + +QModelIndex QJsonModel::parent(const QModelIndex &index) const +{ + if (!index.isValid()) + return QModelIndex(); + + QJsonTreeItem *childItem = static_cast(index.internalPointer()); + QJsonTreeItem *parentItem = childItem->parent(); + + if (parentItem == mRootItem) + return QModelIndex(); + + return createIndex(parentItem->row(), 0, parentItem); +} + +int QJsonModel::rowCount(const QModelIndex &parent) const +{ + QJsonTreeItem *parentItem; + if (parent.column() > 0) + return 0; + + if (!parent.isValid()) + parentItem = mRootItem; + else + parentItem = static_cast(parent.internalPointer()); + + return parentItem->childCount(); +} + +int QJsonModel::columnCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent) + return 2; +} + +Qt::ItemFlags QJsonModel::flags(const QModelIndex &index) const +{ + int col = index.column(); + auto item = static_cast(index.internalPointer()); + + auto isArray = QJsonValue::Array == item->type(); + auto isObject = QJsonValue::Object == item->type(); + + if ((col == 1) && !(isArray || isObject)) { + return Qt::ItemIsEditable | QAbstractItemModel::flags(index); + } else { + return QAbstractItemModel::flags(index); + } +} + +QJsonDocument QJsonModel::json() const +{ + + auto v = genJson(mRootItem); + QJsonDocument doc; + + if (v.isObject()) { + doc = QJsonDocument(v.toObject()); + } else { + doc = QJsonDocument(v.toArray()); + } + + return doc; +} + +QJsonValue QJsonModel::genJson(QJsonTreeItem * item) const +{ + auto type = item->type(); + int nchild = item->childCount(); + + if (QJsonValue::Object == type) { + QJsonObject jo; + for (int i = 0; i < nchild; ++i) { + auto ch = item->child(i); + auto key = ch->key(); + jo.insert(key, genJson(ch)); + } + return jo; + } else if (QJsonValue::Array == type) { + QJsonArray arr; + for (int i = 0; i < nchild; ++i) { + auto ch = item->child(i); + arr.append(genJson(ch)); + } + return arr; + } else { + QJsonValue va(item->value()); + return va; + } +} + +QHash QJsonModel::roleNames() const +{ + QHash roles; + roles[Roles::KeyRole] = "key"; + roles[Roles::ValueRole] = "value"; + return roles; +} + +QByteArray QJsonModel::getJson() +{ + return ((QJsonDocument)(this->json())).toJson(); +} diff --git a/gui/qjsonmodel.h b/gui/qjsonmodel.h new file mode 100644 index 00000000..c7d25bbe --- /dev/null +++ b/gui/qjsonmodel.h @@ -0,0 +1,111 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2011 SCHUTZ Sacha + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef QJSONMODEL_H +#define QJSONMODEL_H + +#include +#include +#include +#include +#include +#include +#include + +class QJsonModel; +class QJsonItem; + +class QJsonTreeItem +{ +public: + QJsonTreeItem(QJsonTreeItem * parent = nullptr); + ~QJsonTreeItem(); + void appendChild(QJsonTreeItem * item); + QJsonTreeItem *child(int row); + QJsonTreeItem *parent(); + int childCount() const; + int row() const; + void setKey(const QString& key); + void setValue(const QString& value); + void setType(const QJsonValue::Type& type); + QString key() const; + QString value() const; + QJsonValue::Type type() const; + + static QJsonTreeItem* load(const QJsonValue& value, QJsonTreeItem * parent = 0); + +protected: + + +private: + QString mKey; + QString mValue; + QJsonValue::Type mType; + QList mChilds; + QJsonTreeItem * mParent; + + +}; + +//--------------------------------------------------- + +class QJsonModel : public QAbstractItemModel +{ + Q_OBJECT + enum Roles { + KeyRole = Qt::UserRole + 1, + ValueRole + }; + +public: + explicit QJsonModel(QObject *parent = nullptr); + QJsonModel(const QString& fileName, QObject *parent = nullptr); + QJsonModel(QIODevice * device, QObject *parent = nullptr); + QJsonModel(const QByteArray& json, QObject *parent = nullptr); + ~QJsonModel(); + bool load(const QString& fileName); + bool load(QIODevice * device); + bool loadJson(const QByteArray& json); + QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE; + QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE; + QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; + QJsonDocument json() const; + QHash roleNames() const Q_DECL_OVERRIDE; + Q_INVOKABLE QByteArray getJson(); + +private: + QJsonValue genJson(QJsonTreeItem *) const; + + QJsonTreeItem * mRootItem; + QStringList mHeaders; + + +}; + +#endif // QJSONMODEL_H diff --git a/gui/qml/main.qml b/gui/qml/main.qml new file mode 100644 index 00000000..38f5331a --- /dev/null +++ b/gui/qml/main.qml @@ -0,0 +1,208 @@ +import QtQuick 2.9 +import QtQuick.Controls 2.2 +import QtQuick.Dialogs 1.2 +import QtQuick.Extras 1.2 +import Qt.labs.platform 1.1 + +ApplicationWindow { + + id: app + visible: false + + property var ctx + + Connections { + target: jsonModel + onDataChanged: { + ctx = JSON.parse(jsonModel.getJson()); + } + } + + Component.onCompleted: { + /* stupid as it sounds, windows doesn't like to have the systray icon + not being attached to an actual application window. + We can still use this quirk, and can use the AppWindow with deferred + Loaders as a placeholder for all the many dialogs, or to load + a nice splash screen etc... */ + app.visible = true; + hide(); + } + + function toHuman(st) { + switch(st) { + case "off": + // TODO improve string interpolation, give context to translators etc + return qsTr(ctx.appName + " off"); + case "on": + return qsTr(ctx.appName + " on"); + case "connecting": + return qsTr("Connecting to " + ctx.appName); + case "stopping": + return qsTr("Stopping " + ctx.appName); + case "failed": + return qsTr(ctx.appName + " blocking internet"); // TODO failed is not handed yet + } + } + + property var icons: { + "off": "qrc:/assets/icon/png/black/vpn_off.png", + "on": "qrc:/assets/icon/png/black/vpn_on.png", + "wait": "qrc:/assets/icon/png/black/vpn_wait_0.png", + "blocked": "qrc:/assets/icon/png/black/vpn_blocked.png", + } + + + SystemTrayIcon { + + id: systray + visible: true + onActivated: { + console.debug("app is", ctx.appName) + menu.open() + } + + Component.onCompleted: { + icon.source = icons["off"] + tooltip = qsTr("Checking status...") + console.debug("systray init completed") + show(); + } + + + menu: Menu { + StateGroup { + id: vpn + state: ctx ? ctx.status : "" + states: [ + State { name: "initializing" }, + State { + name: "off" + PropertyChanges { target: systray; tooltip: toHuman("off"); icon.source: icons["off"] } + PropertyChanges { target: statusItem; text: toHuman("off") } + }, + State { + name: "on" + PropertyChanges { target: systray; tooltip: toHuman("on"); icon.source: icons["on"] } + PropertyChanges { target: statusItem; text: toHuman("on") } + }, + State { + name: "starting" + PropertyChanges { target: systray; tooltip: toHuman("connecting"); icon.source: icons["wait"] } + PropertyChanges { target: statusItem; text: toHuman("connecting") } + }, + State { + name: "stopping" + PropertyChanges { target: systray; tooltip: toHuman["stopping"]; icon.source: icons["wait"] } + PropertyChanges { target: statusItem; text: toHuman["stopping"] } + }, + State { + name: "failed" + PropertyChanges { target: systray; tooltip: toHuman["failed"]; icon.source: icons["wait"] } + PropertyChanges { target: statusItem; text: toHuman["failed"] } + } + ] + } + + /* + LoginDialog { + id: login + } + DonateDialog { + id: donate + } + MessageDialog { + id: about + buttons: MessageDialog.Ok + title: "About" + text: "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

+

This service is paid for entirely by donations from users like you. Please donate.

+

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

".arg(ctxSystray.applicationName).arg(ctxSystray.provider).arg(ctxSystray.donateURL).arg(ctxSystray.tosURL) + informativeText: "%1 version: %2".arg(ctxSystray.applicationName).arg(ctxSystray.version) + } + MessageDialog { + id: errorStartingVPN + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Error starting VPN" + text: "Can't connect to %1".arg(ctxSystray.applicationName) + detailedText: ctxSystray.errorStartingMsg + visible: ctxSystray.errorStartingMsg != "" + } + MessageDialog { + id: authAgent + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Missing authentication agent" + text: "Could not find a polkit authentication agent. Please run one and try again." + visible: ctxSystray.authAgent == true + } + MessageDialog { + id: initFailure + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Initialization Error" + text: ctxSystray.errorInitMsg + visible: ctxSystray.errorInitMsg != "" + } + */ + + MenuItem { + id: statusItem + text: qsTr("Checking status...") + enabled: false + } + + MenuItem { + text: { + if (vpn.state == "failed") + qsTr("Reconnect") + else + qsTr("Turn on") + } + onTriggered: { + backend.switchOn() + } + visible: ctx ? (ctx.status == "off" || ctx.status == "failed") : false + } + + MenuItem { + text: { + if (ctx && ctx.status == "starting") + qsTr("Cancel") + else + qsTr("Turn off") + } + onTriggered: { + backend.switchOff() + } + visible: ctx ? (ctx.status == "on" || ctx.status == "starting" || ctx.status == "failed") : false + } + + MenuSeparator {} + + MenuItem { + text: qsTr("Help...") + //onTriggered: ctxSystray.help() + } + + MenuItem { + text: qsTr("Donate...") + //onTriggered: ctxSystray.donate() + visible: true + //visible: ctx.showDonate + } + + MenuItem { + text: qsTr("About...") + //onTriggered: about.open() + } + + MenuSeparator {} + + MenuItem { + text: qsTr("Quit") + onTriggered: backend.quit() + } + } + } +} diff --git a/icon/Makefile b/icon/Makefile deleted file mode 100644 index 887e78b9..00000000 --- a/icon/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -.PHONY: all clean - -unix := on_unix.go off_unix.go blocked_unix.go wait_0_unix.go wait_1_unix.go wait_2_unix.go wait_3_unix.go - -darwin := on_darwin.go off_darwin.go blocked_darwin.go wait_0_darwin.go wait_1_darwin.go wait_2_darwin.go wait_3_darwin.go - -all: $(unix) $(darwin) - -go_array_name = "$(shell echo $(<) | sed -e 's/.*vpn_\(.*\)\.png/\u\1/' -e 's/_//')" - -%_unix.go: png/white/vpn_%.png - echo "//+build linux" > $@ - echo "// white icon" - echo "" >> $@ - cat $< | 2goarray $(go_array_name) icon >> $@ - -%_darwin.go: png/black/vpn_%.png - echo "//+build darwin" > $@ - echo "// black icon" - echo "" >> $@ - cat $< | 2goarray $(go_array_name) icon >> $@ - -clean: - rm -f *_unix.go - rm -f *_darwin.go diff --git a/icon/blocked_darwin.go b/icon/blocked_darwin.go deleted file mode 100644 index dd30a0c7..00000000 --- a/icon/blocked_darwin.go +++ /dev/null @@ -1,77 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Blocked []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x20, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x02, 0x02, 0x05, 0x03, 0x02, 0x06, 0x03, 0x03, 0x07, 0x04, 0x03, - 0x08, 0x04, 0x04, 0x0a, 0x05, 0x05, 0x0b, 0x06, 0x05, 0x0c, 0x06, 0x06, - 0x10, 0x08, 0x07, 0x11, 0x09, 0x08, 0x13, 0x0a, 0x09, 0x15, 0x0b, 0x0a, - 0x18, 0x0d, 0x0c, 0x19, 0x0d, 0x0c, 0x1c, 0x0f, 0x0e, 0x2e, 0x18, 0x16, - 0x2f, 0x18, 0x16, 0x30, 0x19, 0x17, 0x34, 0x1b, 0x19, 0x38, 0x1d, 0x1b, - 0x39, 0x1e, 0x1c, 0x3e, 0x20, 0x1e, 0x3f, 0x20, 0x1e, 0x40, 0x21, 0x1e, - 0x40, 0x21, 0x1f, 0x47, 0x25, 0x22, 0x48, 0x25, 0x23, 0x49, 0x26, 0x23, - 0x4c, 0x27, 0x24, 0x4e, 0x28, 0x25, 0x4f, 0x29, 0x26, 0x56, 0x2c, 0x29, - 0x57, 0x2d, 0x2a, 0x65, 0x34, 0x31, 0x6a, 0x37, 0x33, 0x6b, 0x37, 0x33, - 0x77, 0x3e, 0x39, 0x7c, 0x40, 0x3b, 0x7c, 0x40, 0x3c, 0x7e, 0x41, 0x3d, - 0x7f, 0x42, 0x3d, 0x80, 0x42, 0x3e, 0x84, 0x44, 0x3f, 0x85, 0x45, 0x40, - 0x8a, 0x47, 0x42, 0x9d, 0x51, 0x4b, 0xa5, 0x55, 0x4f, 0xa7, 0x56, 0x50, - 0xb7, 0x5e, 0x58, 0xb8, 0x5f, 0x58, 0xba, 0x60, 0x59, 0xbf, 0x63, 0x5c, - 0xc4, 0x65, 0x5e, 0xca, 0x68, 0x61, 0xcd, 0x6a, 0x62, 0xce, 0x6a, 0x63, - 0xd1, 0x6c, 0x64, 0xd3, 0x6d, 0x65, 0xd5, 0x6e, 0x66, 0xd6, 0x6e, 0x66, - 0xd7, 0x6f, 0x67, 0xd9, 0x70, 0x68, 0xde, 0x72, 0x6a, 0xdf, 0x73, 0x6b, - 0xe0, 0x73, 0x6b, 0xe5, 0x76, 0x6e, 0xe6, 0x76, 0x6e, 0xe7, 0x77, 0x6f, - 0xe8, 0x78, 0x70, 0xef, 0x7b, 0x73, 0xf0, 0x7c, 0x73, 0xf1, 0x7c, 0x74, - 0xf2, 0x7d, 0x74, 0xf3, 0x7d, 0x75, 0xf5, 0x7e, 0x76, 0xf6, 0x7f, 0x76, - 0xf7, 0x7f, 0x77, 0xf8, 0x80, 0x77, 0xbf, 0x7a, 0x5d, 0xa5, 0x00, 0x00, - 0x00, 0x10, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x2f, 0x30, 0x32, 0x34, 0x35, - 0xdc, 0xdd, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xfc, 0xfd, 0xfe, 0x0e, 0xb1, - 0xe2, 0x03, 0x00, 0x00, 0x01, 0x61, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, - 0xb5, 0xd4, 0xd7, 0x56, 0xc2, 0x40, 0x10, 0x06, 0x60, 0x02, 0x18, 0x8a, - 0x02, 0xbf, 0x05, 0x11, 0xc5, 0x86, 0x22, 0x56, 0x44, 0x2c, 0x80, 0xa2, - 0xa8, 0x58, 0x10, 0xec, 0x08, 0x22, 0x6d, 0xde, 0xff, 0x2d, 0x24, 0x9b, - 0xc2, 0x6e, 0xb2, 0x5c, 0x32, 0x77, 0xbb, 0xe7, 0x3b, 0x93, 0x73, 0x36, - 0xff, 0x8c, 0xcb, 0x35, 0x81, 0x52, 0x54, 0x70, 0xe5, 0xf3, 0xc8, 0x8c, - 0x3b, 0x00, 0xa1, 0x82, 0x12, 0xe5, 0xf6, 0xe3, 0xf0, 0x8f, 0xac, 0xea, - 0x9d, 0x60, 0x66, 0x4a, 0xd2, 0x87, 0x37, 0x44, 0xdd, 0xac, 0x43, 0x59, - 0xe6, 0x79, 0xb3, 0x4c, 0xd4, 0x37, 0x95, 0x57, 0x62, 0x7e, 0x9b, 0x54, - 0xc4, 0x3e, 0x5d, 0x45, 0x2b, 0x12, 0x35, 0x34, 0x47, 0x5a, 0x9f, 0x64, - 0xfc, 0x33, 0x8f, 0x34, 0xa5, 0x51, 0xd0, 0xbf, 0x78, 0xcc, 0x29, 0xd3, - 0x10, 0xf0, 0xa0, 0xa3, 0x3c, 0x15, 0x4a, 0xa2, 0xb2, 0x0c, 0x87, 0x3e, - 0x80, 0x1f, 0x41, 0xa9, 0xc8, 0x76, 0xc9, 0x86, 0xea, 0xc0, 0x97, 0x76, - 0xd3, 0xc9, 0x40, 0x65, 0x28, 0x84, 0x36, 0x8d, 0x43, 0xd4, 0x01, 0x18, - 0x0a, 0xa3, 0x3f, 0x1e, 0x0d, 0x10, 0x71, 0xa0, 0xca, 0x05, 0xb6, 0x28, - 0x25, 0x41, 0x11, 0x0c, 0x2c, 0x74, 0xb6, 0x87, 0x44, 0x23, 0x86, 0xdc, - 0xa3, 0x1c, 0xb5, 0x18, 0x32, 0x6a, 0x7d, 0xd7, 0x44, 0x7d, 0x84, 0x47, - 0xe8, 0x52, 0x7b, 0x86, 0x28, 0x9f, 0x82, 0x57, 0x27, 0xca, 0x01, 0xa7, - 0x14, 0xe7, 0xd1, 0x9b, 0x13, 0xd5, 0x16, 0x81, 0xbb, 0x18, 0x8f, 0xde, - 0x05, 0x04, 0x68, 0xa7, 0x12, 0xb0, 0x32, 0xc7, 0xa3, 0xba, 0x04, 0xf5, - 0xb6, 0xc5, 0x60, 0xa2, 0xa6, 0x87, 0x0f, 0x21, 0x0e, 0x51, 0x75, 0x41, - 0x44, 0x2f, 0x36, 0xd4, 0x61, 0xe7, 0xa2, 0x88, 0x1a, 0xec, 0xb2, 0x6d, - 0x20, 0x15, 0x19, 0xa6, 0xba, 0x49, 0xde, 0xac, 0x0e, 0x8c, 0xe0, 0xe9, - 0x3f, 0x58, 0xf1, 0xe3, 0x80, 0x45, 0xa5, 0xba, 0xc4, 0xa1, 0x73, 0x5b, - 0xd0, 0x2d, 0x75, 0x3b, 0x3f, 0x6a, 0xf4, 0x6d, 0x1f, 0x06, 0xc5, 0x1c, - 0xa7, 0xfb, 0x84, 0x61, 0x36, 0x9e, 0x8c, 0xc8, 0x71, 0x03, 0x63, 0xa9, - 0xe6, 0xf5, 0xce, 0xf2, 0xec, 0x5a, 0xea, 0xa6, 0x65, 0x8f, 0x38, 0x53, - 0xf6, 0xb1, 0x1b, 0xc6, 0xcd, 0x6e, 0xf8, 0xa0, 0x8f, 0x37, 0x0e, 0x35, - 0x34, 0xd3, 0x5e, 0xe7, 0x32, 0xf0, 0x04, 0xc5, 0xc7, 0x0c, 0xb8, 0x65, - 0x6b, 0xc5, 0xe3, 0xe3, 0x8d, 0xaa, 0x4c, 0x62, 0xbd, 0xfd, 0x03, 0x0e, - 0x43, 0xae, 0xa6, 0xb8, 0x9a, 0x55, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/blocked_unix.go b/icon/blocked_unix.go deleted file mode 100644 index 74c0ecde..00000000 --- a/icon/blocked_unix.go +++ /dev/null @@ -1,79 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Blocked []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x35, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x43, 0x36, 0xf4, 0x44, 0x37, - 0xf4, 0x44, 0x38, 0xf4, 0x45, 0x38, 0xf4, 0x47, 0x3a, 0xf4, 0x47, 0x3b, - 0xf4, 0x48, 0x3c, 0xf4, 0x49, 0x3c, 0xf5, 0x4e, 0x42, 0xf5, 0x4f, 0x43, - 0xf5, 0x50, 0x43, 0xf5, 0x53, 0x47, 0xf5, 0x54, 0x48, 0xf5, 0x55, 0x49, - 0xf5, 0x56, 0x4a, 0xf5, 0x58, 0x4c, 0xf5, 0x59, 0x4e, 0xf5, 0x5a, 0x4e, - 0xf5, 0x5c, 0x50, 0xf5, 0x5c, 0x51, 0xf6, 0x5e, 0x52, 0xf6, 0x5f, 0x54, - 0xf6, 0x60, 0x56, 0xf6, 0x61, 0x56, 0xf6, 0x62, 0x57, 0xf6, 0x64, 0x59, - 0xf6, 0x65, 0x5a, 0xf6, 0x68, 0x5d, 0xf6, 0x73, 0x69, 0xf7, 0x6f, 0x65, - 0xf7, 0x72, 0x68, 0xf7, 0x77, 0x6d, 0xf7, 0x7e, 0x75, 0xf8, 0x81, 0x78, - 0xf8, 0x84, 0x7b, 0xf8, 0x8d, 0x85, 0xf8, 0x90, 0x88, 0xf9, 0x90, 0x89, - 0xf9, 0x98, 0x91, 0xf9, 0xa1, 0x9a, 0xfa, 0xa1, 0x9b, 0xfa, 0xa4, 0x9d, - 0xfa, 0xa8, 0xa2, 0xfa, 0xac, 0xa7, 0xfa, 0xb1, 0xab, 0xfb, 0xb7, 0xb2, - 0xfb, 0xb7, 0xb3, 0xfb, 0xbd, 0xb8, 0xfb, 0xbd, 0xb9, 0xfb, 0xbe, 0xba, - 0xfb, 0xc2, 0xbe, 0xfb, 0xc3, 0xbf, 0xfc, 0xc3, 0xbf, 0xfc, 0xc4, 0xc0, - 0xfc, 0xc5, 0xc2, 0xfc, 0xc8, 0xc4, 0xfc, 0xc8, 0xc5, 0xfc, 0xc9, 0xc5, - 0xfc, 0xcb, 0xc7, 0xfc, 0xcf, 0xcc, 0xfc, 0xd0, 0xcd, 0xfd, 0xd6, 0xd3, - 0xfd, 0xd6, 0xd4, 0xfd, 0xd8, 0xd5, 0xfd, 0xd9, 0xd7, 0xfd, 0xdb, 0xd8, - 0xfd, 0xdc, 0xda, 0xfd, 0xde, 0xdc, 0xfd, 0xe3, 0xe1, 0xfd, 0xe5, 0xe3, - 0xfe, 0xe6, 0xe4, 0xfe, 0xe7, 0xe5, 0xfe, 0xe9, 0xe7, 0xfe, 0xf0, 0xef, - 0xfe, 0xf2, 0xf1, 0xfe, 0xf2, 0xf2, 0xfe, 0xf4, 0xf3, 0xfe, 0xf5, 0xf5, - 0xfe, 0xf6, 0xf6, 0xfe, 0xf9, 0xf9, 0xff, 0xf8, 0xf7, 0xff, 0xf8, 0xf8, - 0xff, 0xf9, 0xf9, 0xff, 0xfc, 0xfc, 0xff, 0xfd, 0xfd, 0xff, 0xfe, 0xfe, - 0xff, 0xff, 0xff, 0x6d, 0x0c, 0x79, 0x90, 0x00, 0x00, 0x00, 0x10, 0x74, - 0x52, 0x4e, 0x53, 0x00, 0x2f, 0x30, 0x32, 0x34, 0x35, 0xdc, 0xdd, 0xeb, - 0xec, 0xed, 0xee, 0xef, 0xfc, 0xfd, 0xfe, 0x0e, 0xb1, 0xe2, 0x03, 0x00, - 0x00, 0x01, 0x62, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0xd7, - 0x56, 0xc2, 0x40, 0x10, 0x06, 0x60, 0x02, 0x18, 0x8a, 0x22, 0x93, 0x98, - 0x88, 0xbd, 0x21, 0x76, 0xb1, 0x0b, 0x8a, 0x0d, 0x45, 0x2c, 0x60, 0xc5, - 0x8a, 0xbd, 0xfd, 0xef, 0xff, 0x08, 0x92, 0xca, 0x6e, 0xb2, 0x5c, 0x32, - 0x77, 0xbb, 0xe7, 0x3b, 0xbb, 0x39, 0x9b, 0x7f, 0x26, 0x10, 0x68, 0x43, - 0x49, 0x32, 0x98, 0x8a, 0x84, 0x44, 0x26, 0x18, 0x03, 0x57, 0x71, 0x81, - 0x0a, 0x46, 0x71, 0xda, 0x4b, 0x6e, 0xf5, 0x14, 0xd1, 0xd5, 0x21, 0x38, - 0x87, 0x35, 0x44, 0x5a, 0xc9, 0xa7, 0x5c, 0xb3, 0xf8, 0xb2, 0x49, 0xea, - 0xb0, 0xa3, 0xc2, 0x02, 0x33, 0x34, 0x45, 0x39, 0x54, 0xa8, 0xf0, 0xb7, - 0x2c, 0x50, 0x0d, 0x73, 0x62, 0x9c, 0xf3, 0xf8, 0x93, 0xce, 0xa3, 0x4a, - 0x55, 0xe4, 0xac, 0x1b, 0x8f, 0x19, 0xe5, 0x18, 0x02, 0xb2, 0x16, 0xca, - 0xab, 0x7b, 0x3b, 0xbc, 0x72, 0x0d, 0x83, 0xd2, 0xc0, 0x20, 0xa7, 0x64, - 0x94, 0x34, 0xf2, 0xa0, 0x0c, 0x30, 0x62, 0xec, 0xe8, 0x65, 0xc8, 0x26, - 0x4a, 0x20, 0x45, 0xad, 0x10, 0xe9, 0x80, 0x89, 0xba, 0xa1, 0xb6, 0x46, - 0x0a, 0x92, 0x3e, 0xb4, 0xb4, 0x8d, 0x1a, 0x5d, 0x09, 0x50, 0x12, 0x8a, - 0x8b, 0xf6, 0x2f, 0x50, 0x9f, 0xff, 0xc6, 0xd1, 0x82, 0x10, 0xa9, 0xb3, - 0x9a, 0x81, 0xec, 0xaa, 0xdf, 0x3a, 0x48, 0x45, 0x77, 0x13, 0x15, 0x70, - 0xdd, 0x47, 0x1f, 0x6c, 0x0a, 0x32, 0x7e, 0xb4, 0x0b, 0x1c, 0xd2, 0x3b, - 0x8b, 0x26, 0xfc, 0x68, 0xf4, 0x15, 0x58, 0xff, 0x64, 0x51, 0x9a, 0x43, - 0x80, 0xb1, 0x5a, 0x03, 0xbe, 0x7e, 0x5b, 0x5f, 0x67, 0x21, 0xe5, 0x9c, - 0x0f, 0x26, 0xa6, 0xad, 0xf0, 0x21, 0xc1, 0x20, 0x1a, 0x7f, 0xe3, 0xd1, - 0x8c, 0x07, 0xe9, 0xe6, 0x7a, 0x83, 0x47, 0x03, 0xe6, 0x66, 0xca, 0x46, - 0x32, 0xca, 0xa6, 0x52, 0x2a, 0xac, 0x79, 0x72, 0x42, 0x6c, 0xfd, 0x60, - 0x29, 0x8a, 0x33, 0x33, 0x2a, 0x63, 0xcf, 0x0c, 0xda, 0xf2, 0x04, 0xdd, - 0x55, 0xd9, 0xe6, 0x67, 0xdd, 0xf7, 0x7b, 0x9b, 0x41, 0x72, 0xda, 0x69, - 0xee, 0xce, 0x36, 0x37, 0x93, 0x76, 0xe4, 0x98, 0x86, 0x71, 0x95, 0xb6, - 0x7a, 0x50, 0x7b, 0xb8, 0x2c, 0xae, 0xe8, 0xde, 0x88, 0x9b, 0xca, 0xdb, - 0x76, 0x8d, 0xb8, 0x79, 0x0d, 0x1b, 0xf4, 0xd6, 0xc6, 0xa7, 0x1a, 0xa6, - 0x33, 0xec, 0x1f, 0x06, 0xa1, 0x38, 0xff, 0x98, 0xb1, 0xa0, 0x68, 0xac, - 0x84, 0x22, 0xac, 0x91, 0xa5, 0x76, 0x8c, 0xb7, 0x7f, 0x50, 0x2f, 0xb5, - 0xc6, 0x53, 0x68, 0x70, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, - 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/blocked_win.go b/icon/blocked_win.go deleted file mode 100644 index 9ccc3bbe..00000000 --- a/icon/blocked_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Blocked []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x32, 0xff, 0xff, - 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xff, 0xff, 0xff, 0x2f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x32, 0xff, 0xff, 0xff, 0xed, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, - 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xc8, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3b, 0x47, - 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, - 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xc8, 0xfc, 0xff, 0x3c, 0x48, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, - 0xff, 0xff, 0xc5, 0xc8, 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0xc0, 0xc4, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x2f, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc8, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0x7b, 0x84, 0xf8, 0xff, 0xb9, 0xbd, 0xfb, 0xff, 0xdc, 0xde, - 0xfd, 0xff, 0xe4, 0xe6, 0xfe, 0xff, 0xd4, 0xd6, 0xfd, 0xff, 0xba, 0xbe, - 0xfb, 0xff, 0x78, 0x81, 0xf8, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xef, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, - 0xff, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc8, 0xfc, 0xff, 0x3c, 0x48, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x5a, 0x65, 0xf6, 0xff, 0xe1, 0xe3, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0xdb, 0xfd, 0xff, 0x52, 0x5e, - 0xf6, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, - 0xff, 0xff, 0xc5, 0xc9, 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x68, 0x72, 0xf7, 0xff, 0xf5, 0xf5, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xe5, - 0xfd, 0xff, 0x43, 0x4f, 0xf5, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xbf, 0xc3, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x2f, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc9, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x4e, 0x59, - 0xf5, 0xff, 0xef, 0xf0, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9d, 0xa4, 0xfa, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0xbf, 0xc3, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xef, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xc2, 0xc5, 0xfc, 0xff, 0x3b, 0x47, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x37, 0x44, 0xf4, 0xff, 0xcc, 0xcf, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe7, 0xe9, 0xfe, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xbf, 0xc3, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x89, 0x90, 0xf9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x43, 0x50, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3c, 0x49, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x4e, 0x5a, 0xf5, 0xff, 0xf5, 0xf5, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x57, 0x62, 0xf6, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x45, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x37, 0x44, - 0xf4, 0xff, 0xc7, 0xcb, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x56, 0x61, 0xf6, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x45, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x85, 0x8d, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, - 0xff, 0xff, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x4c, 0x58, 0xf5, 0xff, 0xf3, 0xf4, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x90, - 0xf8, 0xff, 0xf7, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x51, 0x5c, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xb2, 0xb7, 0xfb, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbe, 0xc2, 0xfb, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xf6, 0xf6, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x50, 0x5c, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xa7, 0xac, 0xfa, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd7, 0xd9, 0xfd, 0xff, 0x42, 0x4e, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xf9, 0xf9, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0x59, 0x64, - 0xf6, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf1, 0xf2, 0xfe, 0xff, 0xda, 0xdc, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x37, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8, 0xbd, - 0xfb, 0xff, 0xd3, 0xd6, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xf2, - 0xfe, 0xff, 0x5d, 0x68, 0xf6, 0xff, 0xf9, 0xf9, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xbf, 0xc3, 0xfb, 0xff, 0x69, 0x73, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x37, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x38, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x77, - 0xf7, 0xff, 0xa2, 0xa8, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xde, - 0xfd, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xd5, 0xd8, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x37, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x38, 0x44, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x72, - 0xf7, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x37, 0x44, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3c, 0x49, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x72, - 0xf7, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xc3, 0xfc, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x72, - 0xf7, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x54, 0x5f, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x56, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3b, 0x47, 0xf4, 0xff, 0xc2, 0xc5, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xc8, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x72, - 0xf7, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x51, 0x5c, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x47, 0x53, 0xf5, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xef, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, - 0xff, 0xff, 0xc4, 0xc8, 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x72, - 0xf7, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0x38, 0x44, 0xf4, 0xff, 0xb3, 0xb7, - 0xfb, 0xff, 0xab, 0xb1, 0xfa, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xc0, 0xc4, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, - 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xc8, 0xfc, 0xff, 0x3c, 0x48, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0xe5, 0xe7, 0xfe, 0xff, 0xfc, 0xfc, 0xff, 0xff, 0x51, 0x5c, - 0xf5, 0xff, 0x9b, 0xa1, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xd0, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xcd, 0xd0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9a, 0xa1, 0xf9, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xc0, 0xc4, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc8, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x48, 0x54, 0xf5, 0xff, 0x56, 0x60, 0xf6, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x9a, 0xa1, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xcf, - 0xfc, 0xff, 0x36, 0x43, 0xf4, 0xff, 0xa7, 0xac, 0xfa, 0xff, 0xfe, 0xfe, - 0xff, 0xff, 0x75, 0x7e, 0xf7, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, - 0xf4, 0xff, 0xbf, 0xc3, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xef, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, - 0xff, 0xff, 0xc5, 0xc8, 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x65, 0x6f, 0xf7, 0xff, 0xf2, 0xf2, 0xfe, 0xff, 0x91, 0x98, - 0xf9, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x44, 0xf4, 0xff, 0x49, 0x55, - 0xf5, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xbf, 0xc3, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, - 0xff, 0xec, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc8, 0xfc, 0xff, 0x3c, 0x48, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x3a, 0x47, 0xf4, 0xff, 0xbf, 0xc3, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x30, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xc8, - 0xfc, 0xff, 0x3c, 0x48, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, - 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x36, 0x43, 0xf4, 0xff, 0x38, 0x45, - 0xf4, 0xff, 0xba, 0xbe, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xef, 0xff, 0xff, 0xff, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, 0xff, 0xec, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0xff, 0xff, - 0xff, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, - 0xff, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0x32, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x80, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, - 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, - 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x1f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/make_icon.bat b/icon/make_icon.bat deleted file mode 100644 index daa263a0..00000000 --- a/icon/make_icon.bat +++ /dev/null @@ -1,41 +0,0 @@ -@ECHO OFF - -IF "%GOPATH%"=="" GOTO NOGO -IF NOT EXIST %GOPATH%\bin\2goarray.exe GOTO INSTALL -:POSTINSTALL -call :create_go on On -call :create_go off Off -call :create_go blocked Blocked -call :create_go wait_0 Wait0 -call :create_go wait_1 Wait1 -call :create_go wait_2 Wait2 -call :create_go wait_3 Wait3 -GOTO DONE - -:create_go -ECHO Creating %1_win.go -ECHO //+build windows > %1_win.go -ECHO. >> %1_win.go -TYPE ico\white\vpn_%1.ico | %GOPATH%\bin\2goarray %2 icon >> %1_win.go -EXIT /B - -:CREATEFAIL -ECHO Unable to create output file -GOTO DONE - -:INSTALL -ECHO Installing 2goarray... -go get github.com/cratonica/2goarray -IF ERRORLEVEL 1 GOTO GETFAIL -GOTO POSTINSTALL - -:GETFAIL -ECHO Failure running go get github.com/cratonica/2goarray. Ensure that go and git are in PATH -GOTO DONE - -:NOGO -ECHO GOPATH environment variable not set -GOTO DONE - -:DONE - diff --git a/icon/off_darwin.go b/icon/off_darwin.go deleted file mode 100644 index 42736937..00000000 --- a/icon/off_darwin.go +++ /dev/null @@ -1,89 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Off []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x80, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x05, 0x05, 0x05, - 0x06, 0x06, 0x06, 0x09, 0x09, 0x09, 0x11, 0x11, 0x11, 0x14, 0x14, 0x14, - 0x15, 0x15, 0x15, 0x16, 0x16, 0x16, 0x1d, 0x1d, 0x1d, 0x22, 0x22, 0x22, - 0x23, 0x23, 0x23, 0x28, 0x28, 0x28, 0x2b, 0x2b, 0x2b, 0x32, 0x32, 0x32, - 0x34, 0x34, 0x34, 0x38, 0x38, 0x38, 0x3b, 0x3b, 0x3b, 0x3e, 0x3e, 0x3e, - 0x43, 0x43, 0x43, 0x45, 0x45, 0x45, 0x46, 0x46, 0x46, 0x47, 0x47, 0x47, - 0x56, 0x56, 0x56, 0x57, 0x57, 0x57, 0x5b, 0x5b, 0x5b, 0x5c, 0x5c, 0x5c, - 0x5d, 0x5d, 0x5d, 0x5e, 0x5e, 0x5e, 0x5f, 0x5f, 0x5f, 0x64, 0x64, 0x64, - 0x6b, 0x6b, 0x6b, 0x6e, 0x6e, 0x6e, 0x75, 0x75, 0x75, 0x79, 0x79, 0x79, - 0x7c, 0x7c, 0x7c, 0x89, 0x89, 0x89, 0x8b, 0x8b, 0x8b, 0x8f, 0x8f, 0x8f, - 0x90, 0x90, 0x90, 0x93, 0x93, 0x93, 0x94, 0x94, 0x94, 0x9d, 0x9d, 0x9d, - 0x9e, 0x9e, 0x9e, 0xa6, 0xa6, 0xa6, 0xa9, 0xa9, 0xa9, 0xab, 0xab, 0xab, - 0xac, 0xac, 0xac, 0xae, 0xae, 0xae, 0xaf, 0xaf, 0xaf, 0xb0, 0xb0, 0xb0, - 0xb4, 0xb4, 0xb4, 0xb7, 0xb7, 0xb7, 0xb8, 0xb8, 0xb8, 0xb9, 0xb9, 0xb9, - 0xba, 0xba, 0xba, 0xbb, 0xbb, 0xbb, 0x1d, 0xca, 0xce, 0xd4, 0x00, 0x00, - 0x00, 0x46, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x26, 0x28, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x56, 0x5a, 0x6f, 0x72, 0x78, 0x80, - 0x82, 0x83, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa1, 0xa2, 0xab, 0xb7, 0xbb, - 0xbe, 0xc0, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xd9, 0xda, 0xdd, - 0xde, 0xe1, 0xe2, 0xe5, 0xe7, 0xeb, 0xed, 0xee, 0xef, 0xf1, 0xf2, 0xf3, - 0xf5, 0xfb, 0xfc, 0xfe, 0xe2, 0xad, 0xad, 0x3c, 0x00, 0x00, 0x01, 0x5f, - 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0x94, 0x47, 0x57, 0xc2, 0x50, - 0x14, 0x84, 0x41, 0xb1, 0x0b, 0xd8, 0x7b, 0xef, 0x88, 0xbd, 0x8b, 0x02, - 0xa2, 0x32, 0x8a, 0x05, 0x2c, 0xd8, 0x4b, 0x34, 0x31, 0x8a, 0x62, 0x43, - 0x50, 0xa3, 0x22, 0xef, 0xaf, 0xbb, 0xc0, 0x24, 0x2f, 0x0d, 0x37, 0x32, - 0x9b, 0xd9, 0x7c, 0xe7, 0xdc, 0xfb, 0xe6, 0xbc, 0xb9, 0x26, 0xd3, 0xbf, - 0xcb, 0x6c, 0xaf, 0x6f, 0xe9, 0x76, 0x4e, 0xb8, 0x3c, 0x58, 0x76, 0xbb, - 0xc7, 0xfb, 0x7b, 0x5a, 0xeb, 0x6c, 0x66, 0x25, 0x61, 0x6f, 0x74, 0x2c, - 0x40, 0x23, 0x5f, 0x5f, 0x83, 0x4d, 0x66, 0xa6, 0x00, 0x20, 0x74, 0x78, - 0x19, 0xb9, 0x7f, 0x49, 0x08, 0x24, 0x29, 0xbc, 0xc7, 0xa2, 0x91, 0x8b, - 0x83, 0x20, 0x00, 0x4c, 0x4a, 0x10, 0x70, 0x76, 0xf7, 0x46, 0x34, 0x7a, - 0xbd, 0x3d, 0x05, 0x28, 0x88, 0x18, 0x28, 0xbb, 0x10, 0xcb, 0x28, 0x5d, - 0x0f, 0x62, 0x01, 0x86, 0x76, 0x3d, 0x88, 0x05, 0x00, 0x46, 0x76, 0x63, - 0x08, 0xec, 0xaf, 0x19, 0x8d, 0xe3, 0xe5, 0xb4, 0x39, 0xe3, 0xc5, 0x79, - 0x15, 0xa3, 0x1f, 0x01, 0xaf, 0x64, 0xf4, 0xa1, 0xf4, 0x3e, 0xe2, 0xdb, - 0x0c, 0x72, 0x12, 0xc7, 0x65, 0xce, 0x49, 0x45, 0x51, 0x90, 0x9f, 0x8e, - 0x80, 0xe3, 0x29, 0x0a, 0x7e, 0x09, 0xf2, 0x20, 0x26, 0x6d, 0xcd, 0xc9, - 0x4e, 0xc8, 0x03, 0xe6, 0x25, 0xa8, 0x13, 0x47, 0xe2, 0xdb, 0x38, 0xda, - 0x3f, 0xb7, 0xd0, 0x2c, 0x41, 0x25, 0x8b, 0x2b, 0xd1, 0xf4, 0x40, 0x96, - 0xd0, 0x7e, 0x8e, 0x91, 0x3c, 0xf9, 0xff, 0x36, 0x21, 0x24, 0x68, 0xff, - 0xc9, 0xe3, 0xea, 0x52, 0x39, 0x55, 0x84, 0x9c, 0x41, 0xec, 0x25, 0xd5, - 0x4c, 0x7c, 0x03, 0x6d, 0x8a, 0xba, 0x94, 0xba, 0x70, 0xf2, 0xad, 0x64, - 0x84, 0x6d, 0x38, 0x72, 0x95, 0xa5, 0xaa, 0xf0, 0xe1, 0xf8, 0x8b, 0x66, - 0x3e, 0x76, 0x31, 0x5a, 0xa0, 0x2e, 0x67, 0xa5, 0x17, 0xe1, 0x84, 0xcc, - 0x24, 0x76, 0x30, 0x6d, 0xd5, 0x56, 0xb8, 0x6c, 0x06, 0x9b, 0x4f, 0x22, - 0xf3, 0x1c, 0xc4, 0x98, 0x55, 0xaf, 0xe8, 0x45, 0x4e, 0x04, 0xae, 0x53, - 0x84, 0x10, 0x92, 0xba, 0x59, 0xc3, 0x40, 0xa1, 0xfe, 0x39, 0xb0, 0xb4, - 0x03, 0xe1, 0x18, 0x21, 0xf1, 0x7d, 0xa0, 0xc3, 0x62, 0x78, 0x35, 0x6a, - 0x66, 0x11, 0xb8, 0xe2, 0xd7, 0x31, 0x57, 0x9b, 0xe9, 0xb6, 0xe4, 0x77, - 0xf9, 0x01, 0xf4, 0x16, 0xff, 0x71, 0x82, 0xaa, 0x86, 0x87, 0xaa, 0x4d, - 0x59, 0xd3, 0x0f, 0xfd, 0xe1, 0x24, 0xca, 0x70, 0x3c, 0x69, 0x2a, 0x00, - 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/off_unix.go b/icon/off_unix.go deleted file mode 100644 index c06d2b7f..00000000 --- a/icon/off_unix.go +++ /dev/null @@ -1,89 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Off []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x7a, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x66, 0x66, 0x66, 0x67, 0x67, 0x67, 0x68, 0x68, 0x68, 0x69, 0x69, 0x69, - 0x6b, 0x6b, 0x6b, 0x6f, 0x6f, 0x6f, 0x70, 0x70, 0x70, 0x71, 0x71, 0x71, - 0x73, 0x73, 0x73, 0x74, 0x74, 0x74, 0x75, 0x75, 0x75, 0x77, 0x77, 0x77, - 0x7d, 0x7d, 0x7d, 0x7f, 0x7f, 0x7f, 0x86, 0x86, 0x86, 0x87, 0x87, 0x87, - 0x89, 0x89, 0x89, 0x8a, 0x8a, 0x8a, 0x8e, 0x8e, 0x8e, 0x8f, 0x8f, 0x8f, - 0x9a, 0x9a, 0x9a, 0x9c, 0x9c, 0x9c, 0x9f, 0x9f, 0x9f, 0xa0, 0xa0, 0xa0, - 0xa5, 0xa5, 0xa5, 0xa7, 0xa7, 0xa7, 0xad, 0xad, 0xad, 0xb2, 0xb2, 0xb2, - 0xb3, 0xb3, 0xb3, 0xb5, 0xb5, 0xb5, 0xb8, 0xb8, 0xb8, 0xb9, 0xb9, 0xb9, - 0xc5, 0xc5, 0xc5, 0xc6, 0xc6, 0xc6, 0xc7, 0xc7, 0xc7, 0xc8, 0xc8, 0xc8, - 0xcc, 0xcc, 0xcc, 0xcf, 0xcf, 0xcf, 0xd1, 0xd1, 0xd1, 0xd4, 0xd4, 0xd4, - 0xd6, 0xd6, 0xd6, 0xdc, 0xdc, 0xdc, 0xde, 0xde, 0xde, 0xe2, 0xe2, 0xe2, - 0xe3, 0xe3, 0xe3, 0xe8, 0xe8, 0xe8, 0xed, 0xed, 0xed, 0xee, 0xee, 0xee, - 0xef, 0xef, 0xef, 0xf1, 0xf1, 0xf1, 0xf8, 0xf8, 0xf8, 0xfa, 0xfa, 0xfa, - 0xfb, 0xfb, 0xfb, 0xfd, 0xfd, 0xfd, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, - 0x3f, 0xfb, 0x2a, 0x41, 0x00, 0x00, 0x00, 0x46, 0x74, 0x52, 0x4e, 0x53, - 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, - 0x1d, 0x1e, 0x26, 0x28, 0x33, 0x34, 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, - 0x56, 0x5a, 0x6f, 0x72, 0x78, 0x80, 0x82, 0x83, 0x86, 0x91, 0x93, 0x94, - 0x99, 0xa1, 0xa2, 0xab, 0xb7, 0xbb, 0xbe, 0xc0, 0xc3, 0xc7, 0xcc, 0xd1, - 0xd2, 0xd5, 0xd6, 0xd9, 0xda, 0xdd, 0xde, 0xe1, 0xe2, 0xe5, 0xe7, 0xeb, - 0xed, 0xee, 0xef, 0xf1, 0xf2, 0xf3, 0xf5, 0xfb, 0xfc, 0xfe, 0xe2, 0xad, - 0xad, 0x3c, 0x00, 0x00, 0x01, 0x5c, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, - 0xb5, 0x94, 0x47, 0x57, 0xc2, 0x50, 0x14, 0x84, 0x41, 0xb1, 0x0b, 0xd8, - 0x7b, 0xef, 0x88, 0xbd, 0x8b, 0x02, 0xa2, 0xf2, 0x40, 0x8d, 0x20, 0xc6, - 0x86, 0x35, 0x89, 0xb1, 0x17, 0x2c, 0x60, 0x41, 0xe7, 0xbf, 0xbb, 0xc0, - 0x24, 0x2f, 0x0d, 0x37, 0x32, 0x9b, 0xd9, 0x7c, 0xe7, 0xdc, 0xfb, 0xe6, - 0xbc, 0xb9, 0x16, 0xcb, 0xbf, 0xcb, 0xea, 0x6c, 0x6c, 0xeb, 0x75, 0x4f, - 0x79, 0x7c, 0x58, 0xf5, 0x7a, 0x27, 0x07, 0xfb, 0xda, 0x1b, 0x1c, 0x56, - 0x35, 0xe1, 0x6c, 0x76, 0x2d, 0x41, 0xa7, 0xc0, 0x40, 0x93, 0x43, 0x61, - 0x66, 0x00, 0x20, 0x79, 0x27, 0x9c, 0x1c, 0x6c, 0x47, 0x19, 0x12, 0x66, - 0x36, 0xd9, 0xf8, 0xf1, 0xf9, 0x7d, 0x0a, 0x00, 0xa6, 0x65, 0x08, 0xb8, - 0x3c, 0x8c, 0x10, 0x9d, 0x22, 0x47, 0x57, 0x00, 0x05, 0x11, 0x13, 0xe5, - 0x16, 0x12, 0x44, 0xb5, 0x1b, 0x41, 0x02, 0x20, 0xd2, 0x6e, 0x04, 0x09, - 0x00, 0x20, 0x2a, 0x6e, 0x0e, 0x41, 0xf8, 0x35, 0xb3, 0x71, 0x9c, 0x92, - 0x36, 0x6f, 0xbe, 0x38, 0xa7, 0x61, 0x8c, 0x23, 0xe0, 0xd4, 0x8c, 0x31, - 0x94, 0xd9, 0x47, 0x7a, 0x9b, 0x49, 0x4e, 0xd2, 0xb8, 0xec, 0x39, 0x69, - 0x28, 0x0a, 0x0a, 0xd2, 0x11, 0xf0, 0x1c, 0x45, 0x21, 0x28, 0x43, 0x3e, - 0xb0, 0xf2, 0xd6, 0xbc, 0xe2, 0x84, 0xec, 0x63, 0x51, 0x86, 0xba, 0x71, - 0x2b, 0xbd, 0x8d, 0xa7, 0x7d, 0xfd, 0x15, 0xad, 0x32, 0x54, 0xb6, 0xfc, - 0x1d, 0xcf, 0x0c, 0x14, 0x08, 0xed, 0x17, 0x18, 0x2b, 0x50, 0xfe, 0x6f, - 0x0b, 0x92, 0x8c, 0xfe, 0x9f, 0xec, 0x7d, 0xad, 0x54, 0x52, 0x45, 0xc8, - 0x1b, 0xc6, 0x63, 0x58, 0xcb, 0xc4, 0xde, 0xd1, 0xa1, 0xaa, 0x4b, 0xb9, - 0x07, 0xd7, 0x1a, 0x8a, 0x79, 0x81, 0x2b, 0x5f, 0x5d, 0xaa, 0xaa, 0x00, - 0x6e, 0xd6, 0x68, 0x66, 0xe3, 0x09, 0xe3, 0x45, 0xda, 0x72, 0x56, 0xfb, - 0x91, 0xd8, 0x52, 0x98, 0xe8, 0x33, 0x66, 0xed, 0xfa, 0x0a, 0x57, 0xcc, - 0xe1, 0x6d, 0x57, 0x62, 0x76, 0x52, 0x98, 0xb0, 0x1b, 0x15, 0xbd, 0xc4, - 0x8d, 0xf4, 0x59, 0x88, 0x10, 0x42, 0x42, 0xa7, 0x9f, 0x18, 0x2a, 0x36, - 0x3e, 0x07, 0xb6, 0x4e, 0x20, 0xc1, 0x12, 0x12, 0x7b, 0x00, 0xba, 0x6c, - 0xa6, 0x57, 0xa3, 0x6e, 0x1e, 0x69, 0x9e, 0xfb, 0xc0, 0x42, 0x7d, 0xb6, - 0xdb, 0x52, 0xd8, 0x13, 0x04, 0xd0, 0x5f, 0xfa, 0xc7, 0x09, 0xaa, 0x19, - 0x1d, 0xa9, 0xb5, 0xe4, 0x4c, 0x3f, 0x80, 0x4e, 0xfd, 0x9e, 0x8f, 0xdf, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82, -} - diff --git a/icon/off_win.go b/icon/off_win.go deleted file mode 100644 index 2fd94d29..00000000 --- a/icon/off_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Off []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0xb2, 0xb2, - 0xb2, 0xff, 0xad, 0xad, 0xad, 0xff, 0xf8, 0xf8, 0xf8, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xdc, 0xdc, 0xdc, 0xff, 0x7f, 0x7f, 0x7f, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x77, 0x77, 0x77, 0xff, 0xd4, 0xd4, - 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0xa7, 0xa7, - 0xa7, 0xff, 0x67, 0x67, 0x67, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x67, 0x67, - 0x67, 0xff, 0xa5, 0xa5, 0xa5, 0xff, 0xfa, 0xfa, 0xfa, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xef, 0xef, 0xef, 0xff, 0x87, 0x87, 0x87, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x86, 0x86, 0x86, 0xff, 0xee, 0xee, - 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xdc, - 0xdc, 0xff, 0x75, 0x75, 0x75, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x74, 0x74, - 0x74, 0xff, 0xe2, 0xe2, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x69, 0x69, - 0x69, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x6f, 0x6f, 0x6f, 0xff, 0xde, 0xde, 0xde, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xc7, 0xc7, 0xc7, 0xff, 0x68, 0x68, 0x68, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x70, 0x70, 0x70, 0xff, 0xe3, 0xe3, - 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xd6, - 0xd6, 0xff, 0x68, 0x68, 0x68, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x77, 0x77, - 0x77, 0xff, 0xf1, 0xf1, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xed, 0xed, 0xed, 0xff, 0x70, 0x70, - 0x70, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x89, 0x89, 0x89, 0xff, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xfe, 0xfe, 0xff, 0x8f, 0x8f, 0x8f, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb9, 0xb9, 0xb9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xad, 0xad, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xad, 0xad, - 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, - 0xb2, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x6b, 0x6b, 0x6b, 0xff, 0xe8, 0xe8, - 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xad, 0xad, - 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xad, 0xad, 0xad, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x8a, 0x8a, - 0x8a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, - 0xb2, 0xff, 0xad, 0xad, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8, 0xb8, - 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xad, 0xad, - 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xad, 0xad, 0xad, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xad, 0xad, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xb2, - 0xb2, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8, 0xb8, - 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xb8, 0xb8, - 0xb8, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xb3, 0xb3, 0xb3, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc5, 0xc5, 0xc5, 0xff, 0x9a, 0x9a, 0x9a, 0xff, 0x73, 0x73, - 0x73, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, 0x66, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x73, 0x73, 0x73, 0xff, 0x9c, 0x9c, 0x9c, 0xff, 0xc6, 0xc6, - 0xc6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xde, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xed, 0xed, 0xed, 0xff, 0xcf, 0xcf, 0xcf, 0xff, 0xb3, 0xb3, - 0xb3, 0xff, 0xa0, 0xa0, 0xa0, 0xff, 0x8e, 0x8e, 0x8e, 0xff, 0x7d, 0x7d, - 0x7d, 0xff, 0x74, 0x74, 0x74, 0xff, 0x70, 0x70, 0x70, 0xff, 0x66, 0x66, - 0x66, 0xff, 0x68, 0x68, 0x68, 0xff, 0x70, 0x70, 0x70, 0xff, 0x71, 0x71, - 0x71, 0xff, 0x7f, 0x7f, 0x7f, 0xff, 0x8f, 0x8f, 0x8f, 0xff, 0x9f, 0x9f, - 0x9f, 0xff, 0xb5, 0xb5, 0xb5, 0xff, 0xd1, 0xd1, 0xd1, 0xff, 0xee, 0xee, - 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x28, 0xff, 0xff, 0xff, 0x72, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, - 0xff, 0x6f, 0xff, 0xff, 0xff, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x28, 0xff, 0xff, 0xff, 0x5a, 0xff, 0xff, - 0xff, 0x82, 0xff, 0xff, 0xff, 0xa1, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xd9, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, - 0xff, 0x26, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/on_darwin.go b/icon/on_darwin.go deleted file mode 100644 index 60b06ff0..00000000 --- a/icon/on_darwin.go +++ /dev/null @@ -1,90 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var On []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x8f, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, 0x04, 0x06, 0x03, - 0x05, 0x06, 0x04, 0x08, 0x0a, 0x05, 0x0f, 0x14, 0x0b, 0x11, 0x17, 0x0d, - 0x13, 0x19, 0x0e, 0x13, 0x1a, 0x0e, 0x14, 0x1a, 0x0e, 0x19, 0x21, 0x12, - 0x1e, 0x27, 0x16, 0x1f, 0x29, 0x17, 0x24, 0x2f, 0x1a, 0x26, 0x32, 0x1c, - 0x2c, 0x3a, 0x20, 0x2e, 0x3d, 0x21, 0x32, 0x42, 0x24, 0x34, 0x44, 0x26, - 0x37, 0x49, 0x28, 0x3c, 0x4f, 0x2b, 0x3d, 0x50, 0x2c, 0x3e, 0x51, 0x2d, - 0x3f, 0x53, 0x2e, 0x4c, 0x64, 0x37, 0x4d, 0x66, 0x38, 0x51, 0x6a, 0x3a, - 0x52, 0x6c, 0x3b, 0x53, 0x6d, 0x3c, 0x54, 0x6e, 0x3d, 0x59, 0x74, 0x40, - 0x5f, 0x7d, 0x45, 0x62, 0x80, 0x47, 0x68, 0x88, 0x4b, 0x68, 0x89, 0x4b, - 0x6b, 0x8d, 0x4e, 0x6e, 0x90, 0x50, 0x7a, 0xa0, 0x58, 0x7b, 0xa2, 0x59, - 0x7f, 0xa7, 0x5c, 0x80, 0xa8, 0x5c, 0x82, 0xab, 0x5e, 0x83, 0xad, 0x5f, - 0x8b, 0xb7, 0x65, 0x8d, 0xb9, 0x66, 0x93, 0xc1, 0x6a, 0x94, 0xc2, 0x6b, - 0x96, 0xc5, 0x6c, 0x96, 0xc5, 0x6d, 0x98, 0xc7, 0x6e, 0x98, 0xc8, 0x6e, - 0x9a, 0xcb, 0x70, 0x9b, 0xcb, 0x70, 0x9c, 0xcc, 0x70, 0x9c, 0xcd, 0x71, - 0xa0, 0xd2, 0x74, 0xa3, 0xd6, 0x76, 0xa3, 0xd7, 0x76, 0xa4, 0xd7, 0x77, - 0xa5, 0xd8, 0x77, 0xa5, 0xd9, 0x78, 0xa6, 0xda, 0x78, 0x2d, 0xe3, 0x49, - 0x06, 0x00, 0x00, 0x00, 0x46, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x26, - 0x28, 0x33, 0x34, 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x56, 0x5a, 0x6f, - 0x72, 0x78, 0x80, 0x82, 0x83, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa1, 0xa2, - 0xab, 0xb7, 0xbb, 0xbe, 0xc0, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, - 0xd9, 0xda, 0xdd, 0xde, 0xe1, 0xe2, 0xe5, 0xe7, 0xeb, 0xed, 0xee, 0xef, - 0xf1, 0xf2, 0xf3, 0xf5, 0xfb, 0xfc, 0xfe, 0xe2, 0xad, 0xad, 0x3c, 0x00, - 0x00, 0x01, 0x55, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xcd, 0xd4, 0x47, - 0x57, 0xc2, 0x40, 0x14, 0x05, 0xe0, 0xa0, 0xd8, 0x05, 0xec, 0xbd, 0x77, - 0xc4, 0xde, 0x45, 0x41, 0x51, 0xb9, 0x8a, 0x05, 0x2b, 0xf6, 0x82, 0x8e, - 0xb1, 0x62, 0xc3, 0x82, 0x1a, 0x0b, 0xea, 0xfc, 0x70, 0x17, 0x40, 0x32, - 0x61, 0x88, 0x6c, 0xf4, 0x1c, 0xef, 0xfa, 0x5b, 0xbc, 0xf3, 0x66, 0xee, - 0x13, 0x84, 0x5f, 0x8f, 0xce, 0x54, 0x5c, 0x51, 0x6f, 0xe9, 0xb1, 0xda, - 0x31, 0x61, 0xb3, 0x75, 0x37, 0x37, 0x54, 0x16, 0x19, 0x75, 0x6a, 0x61, - 0x2a, 0x35, 0x8f, 0x82, 0x8b, 0xa3, 0xa9, 0xc4, 0xa8, 0x98, 0x3e, 0x00, - 0x58, 0xd8, 0x38, 0x38, 0xb9, 0xb8, 0x0d, 0xbc, 0xd0, 0xa0, 0xf4, 0xec, - 0xf7, 0x9d, 0xee, 0xaf, 0xbb, 0x01, 0xa0, 0x57, 0x46, 0xc0, 0xee, 0xf9, - 0x13, 0xe5, 0xf2, 0x78, 0xb6, 0x03, 0x30, 0x88, 0x6a, 0xe4, 0x3f, 0x21, - 0xe2, 0x8d, 0x8f, 0x08, 0xe0, 0x8d, 0x87, 0x08, 0x10, 0x56, 0xda, 0x88, - 0x00, 0x00, 0x88, 0x06, 0x0a, 0x4d, 0xc2, 0x98, 0x18, 0x28, 0x34, 0x09, - 0x6b, 0x78, 0x44, 0x00, 0x80, 0xa8, 0x0c, 0x8f, 0x44, 0xe5, 0xfd, 0x89, - 0xf6, 0x9e, 0x44, 0xce, 0xb0, 0xc8, 0x19, 0x1e, 0x5c, 0x8c, 0x36, 0x14, - 0x4e, 0x19, 0xd9, 0xe1, 0x67, 0x14, 0x63, 0x2e, 0x31, 0x2c, 0xa3, 0x5a, - 0x6c, 0x52, 0x59, 0x31, 0xe6, 0x6d, 0x11, 0xe5, 0x32, 0xca, 0x18, 0x9b, - 0xf4, 0x45, 0x16, 0xc9, 0x18, 0xba, 0x87, 0x8e, 0x24, 0xe5, 0xff, 0x96, - 0x61, 0x5e, 0xe2, 0xbf, 0xc0, 0xd5, 0xd4, 0x78, 0x36, 0x53, 0x84, 0x84, - 0x56, 0xac, 0x06, 0xa3, 0xcd, 0xfd, 0x2c, 0xaa, 0x54, 0x75, 0xc9, 0xb4, - 0x62, 0xfb, 0x43, 0x6d, 0xa4, 0x25, 0x98, 0x13, 0xd5, 0xa5, 0xca, 0x71, - 0x60, 0xeb, 0x9d, 0x35, 0xaf, 0x2b, 0xe8, 0x4c, 0x89, 0x2e, 0x67, 0xee, - 0x08, 0x3c, 0x0f, 0x8a, 0x09, 0x2c, 0xa3, 0xdf, 0xc0, 0x57, 0x38, 0x6b, - 0x00, 0x73, 0xd7, 0x11, 0x73, 0xe3, 0x46, 0x97, 0x21, 0x56, 0xd1, 0xd3, - 0x2c, 0x70, 0x1d, 0x7d, 0x52, 0x4a, 0xe9, 0xd7, 0xf1, 0x34, 0x5a, 0x52, - 0x63, 0x9f, 0x03, 0x7d, 0x35, 0xe0, 0xf1, 0x53, 0x7a, 0xb7, 0x06, 0xd4, - 0xe8, 0x35, 0xaf, 0x46, 0xc1, 0x20, 0x5c, 0x87, 0xe2, 0x0c, 0x86, 0x0a, - 0x7f, 0xba, 0x2d, 0xc9, 0x75, 0x4e, 0x00, 0x8d, 0xe9, 0x71, 0x4e, 0x50, - 0x5e, 0x7b, 0x5b, 0xbe, 0xf0, 0x67, 0xf9, 0x06, 0x64, 0xa1, 0x35, 0x48, - 0xd1, 0xca, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, - 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/on_unix.go b/icon/on_unix.go deleted file mode 100644 index c22810f4..00000000 --- a/icon/on_unix.go +++ /dev/null @@ -1,90 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var On []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x01, 0x8c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x5c, 0x97, 0x29, 0x5d, 0x97, 0x2a, 0x5d, 0x98, 0x2b, 0x5e, 0x98, 0x2c, - 0x5f, 0x99, 0x2c, 0x5f, 0x99, 0x2d, 0x62, 0x9b, 0x31, 0x66, 0x9d, 0x36, - 0x66, 0x9e, 0x36, 0x67, 0x9e, 0x37, 0x68, 0x9e, 0x38, 0x69, 0xa0, 0x3b, - 0x6a, 0xa0, 0x3b, 0x6b, 0xa1, 0x3d, 0x6c, 0xa1, 0x3e, 0x6e, 0xa2, 0x40, - 0x6f, 0xa3, 0x41, 0x75, 0xa7, 0x4a, 0x76, 0xa8, 0x4b, 0x7e, 0xad, 0x55, - 0x7f, 0xad, 0x57, 0x82, 0xaf, 0x5b, 0x86, 0xb2, 0x60, 0x87, 0xb3, 0x62, - 0x93, 0xba, 0x71, 0x96, 0xbc, 0x75, 0x99, 0xbe, 0x79, 0x99, 0xbe, 0x7a, - 0x9f, 0xc2, 0x81, 0xa2, 0xc3, 0x84, 0xa8, 0xc8, 0x8d, 0xad, 0xca, 0x93, - 0xad, 0xcb, 0x94, 0xae, 0xcb, 0x94, 0xae, 0xcc, 0x95, 0xb0, 0xcc, 0x97, - 0xb3, 0xce, 0x9b, 0xb4, 0xcf, 0x9d, 0xc1, 0xd7, 0xae, 0xc2, 0xd8, 0xaf, - 0xc3, 0xd9, 0xb0, 0xc4, 0xd9, 0xb2, 0xc9, 0xdc, 0xb8, 0xcc, 0xde, 0xbc, - 0xce, 0xe0, 0xbe, 0xd2, 0xe2, 0xc3, 0xd4, 0xe3, 0xc6, 0xd9, 0xe7, 0xcd, - 0xdc, 0xe9, 0xd1, 0xe0, 0xeb, 0xd7, 0xe2, 0xec, 0xd8, 0xe6, 0xef, 0xde, - 0xec, 0xf3, 0xe6, 0xec, 0xf3, 0xe7, 0xee, 0xf4, 0xe8, 0xf0, 0xf5, 0xeb, - 0xf7, 0xfa, 0xf5, 0xfa, 0xfb, 0xf8, 0xfa, 0xfc, 0xf9, 0xfd, 0xfe, 0xfc, - 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x8c, 0xc8, 0x8f, 0x98, 0x00, 0x00, - 0x00, 0x46, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x26, 0x28, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x56, 0x5a, 0x6f, 0x72, 0x78, 0x80, - 0x82, 0x83, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa1, 0xa2, 0xab, 0xb7, 0xbb, - 0xbe, 0xc0, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xd9, 0xda, 0xdd, - 0xde, 0xe1, 0xe2, 0xe5, 0xe7, 0xeb, 0xed, 0xee, 0xef, 0xf1, 0xf2, 0xf3, - 0xf5, 0xfb, 0xfc, 0xfe, 0xe2, 0xad, 0xad, 0x3c, 0x00, 0x00, 0x01, 0x57, - 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xcd, 0xd4, 0x47, 0x53, 0x02, 0x41, - 0x10, 0x05, 0xe0, 0x45, 0x31, 0x0b, 0x98, 0x73, 0xce, 0x88, 0x39, 0x8b, - 0x82, 0xa2, 0x32, 0x2a, 0x06, 0x54, 0x0c, 0x28, 0x62, 0x5c, 0x19, 0xc5, - 0x1c, 0x30, 0x80, 0x01, 0x7d, 0x7f, 0xdc, 0x03, 0xb0, 0x3b, 0x9b, 0xe4, - 0xa2, 0x55, 0xbe, 0xf3, 0x77, 0xe8, 0xea, 0x99, 0xd7, 0x1c, 0xf7, 0xeb, - 0xd1, 0x99, 0xca, 0x6b, 0x9a, 0x2d, 0x03, 0x56, 0x3b, 0x66, 0x6c, 0xb6, - 0xfe, 0xf6, 0x96, 0xda, 0x32, 0xa3, 0x4e, 0x2a, 0x4c, 0x95, 0xe6, 0x49, - 0x28, 0xe2, 0x68, 0xab, 0x30, 0x8a, 0x66, 0x08, 0x00, 0xc2, 0xb7, 0xa7, - 0x87, 0xbb, 0x5b, 0x9e, 0x65, 0xe2, 0x72, 0xaf, 0x78, 0xfd, 0x07, 0x67, - 0x77, 0x11, 0x00, 0x18, 0x14, 0x10, 0x70, 0xb1, 0xb7, 0x4a, 0x14, 0x59, - 0xdb, 0xbf, 0x04, 0x18, 0x44, 0x34, 0xf2, 0x9f, 0x10, 0x0d, 0x26, 0x47, - 0x14, 0x08, 0x26, 0x43, 0x14, 0x88, 0x2b, 0x6d, 0x44, 0x01, 0x00, 0x01, - 0x0d, 0x14, 0x9b, 0x84, 0x31, 0x2a, 0x28, 0x36, 0x09, 0x6b, 0x94, 0x88, - 0x02, 0x00, 0x8d, 0x19, 0xaa, 0xb5, 0x02, 0x5e, 0x7c, 0xff, 0x80, 0xf6, - 0x9e, 0x78, 0x85, 0x61, 0x91, 0x33, 0x3e, 0x38, 0x2f, 0x37, 0x04, 0x4e, - 0x01, 0xd9, 0xe1, 0x65, 0x14, 0x63, 0x7c, 0x18, 0x17, 0x50, 0x23, 0x6e, - 0x88, 0xa0, 0x18, 0xb3, 0xf8, 0x82, 0x6a, 0x01, 0xe5, 0x4c, 0x7d, 0xf9, - 0x13, 0x8b, 0xa4, 0xcc, 0x56, 0xcf, 0xd1, 0x93, 0x26, 0xfe, 0xdf, 0x2a, - 0x84, 0xdd, 0xca, 0x2f, 0xe0, 0xfb, 0x9c, 0xce, 0x67, 0x8a, 0x90, 0xd2, - 0x89, 0x07, 0x97, 0xdc, 0x6c, 0xbc, 0xa1, 0x4e, 0x52, 0x97, 0x5c, 0x2b, - 0xae, 0xe6, 0xa5, 0xc6, 0xfd, 0x0c, 0x73, 0xaa, 0xb4, 0x54, 0x05, 0x0e, - 0x5c, 0x2f, 0xb0, 0x66, 0xe9, 0x11, 0xbd, 0x19, 0xf2, 0x72, 0x16, 0x4e, - 0x20, 0xb4, 0x2e, 0x1a, 0xcf, 0x13, 0x86, 0x0d, 0xca, 0x0a, 0xe7, 0x8d, - 0xe0, 0x75, 0x27, 0x61, 0xb6, 0x23, 0xe8, 0x33, 0xa8, 0x15, 0x3d, 0xcb, - 0x82, 0xe8, 0xf1, 0x1c, 0x21, 0x84, 0xcc, 0x1e, 0x7d, 0xa0, 0x23, 0x53, - 0xfd, 0x1c, 0xe8, 0xeb, 0x81, 0x90, 0x97, 0x90, 0xcd, 0x7b, 0xa0, 0x41, - 0xaf, 0x79, 0x35, 0x4a, 0x46, 0x11, 0x3d, 0xe1, 0xdf, 0x31, 0x56, 0xfa, - 0xd3, 0x6d, 0x49, 0x6f, 0x72, 0x02, 0x68, 0xcd, 0x4e, 0x72, 0x82, 0x8a, - 0xba, 0xbb, 0x8a, 0xb9, 0x3f, 0xcb, 0x37, 0xbd, 0x10, 0xfb, 0xc9, 0x51, - 0xa8, 0x7d, 0x99, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, - 0x42, 0x60, 0x82, -} - diff --git a/icon/on_win.go b/icon/on_win.go deleted file mode 100644 index f5d28c72..00000000 --- a/icon/on_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var On []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xfc, 0xfa, 0xff, 0x93, 0xca, - 0xad, 0xff, 0x8d, 0xc8, 0xa8, 0xff, 0xf5, 0xfa, 0xf7, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xcd, 0xe7, 0xd9, 0xff, 0x4b, 0xa8, 0x76, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x41, 0xa3, 0x6f, 0xff, 0xc3, 0xe2, - 0xd2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xfc, 0xfa, 0xff, 0x84, 0xc3, - 0xa2, 0xff, 0x2b, 0x98, 0x5d, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x2a, 0x97, - 0x5d, 0xff, 0x81, 0xc2, 0x9f, 0xff, 0xf8, 0xfb, 0xfa, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xe8, 0xf4, 0xee, 0xff, 0x57, 0xad, 0x7f, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x55, 0xad, 0x7e, 0xff, 0xe7, 0xf3, - 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xcd, 0xe7, - 0xd9, 0xff, 0x3e, 0xa1, 0x6c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x3d, 0xa1, - 0x6b, 0xff, 0xd7, 0xeb, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xb2, 0xd9, 0xc4, 0xff, 0x2d, 0x99, - 0x5f, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x36, 0x9d, 0x66, 0xff, 0xd1, 0xe9, 0xdc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xb0, 0xd9, 0xc3, 0xff, 0x2c, 0x98, 0x5e, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x37, 0x9e, 0x67, 0xff, 0xd8, 0xec, - 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xe3, - 0xd4, 0xff, 0x2c, 0x99, 0x5f, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x40, 0xa2, - 0x6e, 0xff, 0xeb, 0xf5, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xe6, 0xf3, 0xec, 0xff, 0x37, 0x9e, - 0x67, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x5b, 0xaf, 0x82, 0xff, 0xfc, 0xfe, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xff, 0xfe, 0xff, 0x62, 0xb3, 0x87, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x9d, 0xcf, 0xb4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xb8, 0xdc, 0xc9, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x8d, 0xc8, - 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, - 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x31, 0x9b, 0x62, 0xff, 0xde, 0xef, - 0xe6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x4b, 0xa8, 0x76, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x8d, 0xc8, 0xa8, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x94, 0xcb, 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x5b, 0xaf, - 0x82, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x8d, 0xc8, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, 0xad, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x8d, 0xc8, - 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, - 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x8d, 0xc8, 0xa8, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x94, 0xcb, 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x94, 0xcb, 0xae, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, - 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9b, 0xce, - 0xb3, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, - 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, - 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x9b, 0xce, 0xb3, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x94, 0xcb, 0xad, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0xcb, 0xad, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, - 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9b, 0xce, 0xb3, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x9b, 0xce, 0xb3, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x94, 0xcb, 0xae, 0xff, 0x9b, 0xce, - 0xb3, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xae, 0xd7, 0xc1, 0xff, 0x71, 0xba, 0x93, 0xff, 0x3b, 0xa0, - 0x69, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, 0x5c, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x3b, 0xa0, 0x6a, 0xff, 0x75, 0xbc, 0x96, 0xff, 0xaf, 0xd8, - 0xc2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xde, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe6, 0xf3, 0xec, 0xff, 0xbc, 0xde, 0xcc, 0xff, 0x95, 0xcc, - 0xae, 0xff, 0x7a, 0xbe, 0x99, 0xff, 0x60, 0xb2, 0x86, 0xff, 0x4a, 0xa7, - 0x75, 0xff, 0x3d, 0xa1, 0x6b, 0xff, 0x36, 0x9e, 0x66, 0xff, 0x29, 0x97, - 0x5c, 0xff, 0x2c, 0x99, 0x5f, 0xff, 0x37, 0x9e, 0x67, 0xff, 0x38, 0x9e, - 0x68, 0xff, 0x4b, 0xa8, 0x76, 0xff, 0x62, 0xb3, 0x87, 0xff, 0x79, 0xbe, - 0x99, 0xff, 0x97, 0xcc, 0xb0, 0xff, 0xbe, 0xe0, 0xce, 0xff, 0xe7, 0xf3, - 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x28, 0xff, 0xff, 0xff, 0x72, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xff, - 0xff, 0x6f, 0xff, 0xff, 0xff, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x28, 0xff, 0xff, 0xff, 0x5a, 0xff, 0xff, - 0xff, 0x82, 0xff, 0xff, 0xff, 0xa1, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xd9, 0xff, 0xff, 0xff, 0xbe, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0x56, 0xff, 0xff, - 0xff, 0x26, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/wait_0_darwin.go b/icon/wait_0_darwin.go deleted file mode 100644 index 2ede9126..00000000 --- a/icon/wait_0_darwin.go +++ /dev/null @@ -1,116 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait0 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x4c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, - 0x03, 0x03, 0x01, 0x04, 0x04, 0x01, 0x05, 0x05, 0x02, 0x06, 0x06, 0x02, - 0x07, 0x06, 0x02, 0x07, 0x07, 0x02, 0x08, 0x07, 0x02, 0x09, 0x08, 0x03, - 0x0b, 0x0a, 0x03, 0x0b, 0x0b, 0x04, 0x13, 0x11, 0x06, 0x17, 0x15, 0x07, - 0x17, 0x16, 0x07, 0x18, 0x16, 0x07, 0x19, 0x17, 0x08, 0x1a, 0x18, 0x08, - 0x1b, 0x19, 0x08, 0x1d, 0x1a, 0x09, 0x1e, 0x1b, 0x09, 0x1f, 0x1c, 0x0a, - 0x21, 0x1e, 0x0a, 0x25, 0x22, 0x0b, 0x27, 0x24, 0x0c, 0x28, 0x25, 0x0c, - 0x29, 0x25, 0x0d, 0x2c, 0x29, 0x0e, 0x2d, 0x2a, 0x0e, 0x2e, 0x2b, 0x0f, - 0x2f, 0x2c, 0x0f, 0x32, 0x2f, 0x10, 0x36, 0x32, 0x11, 0x39, 0x35, 0x12, - 0x3a, 0x36, 0x12, 0x3e, 0x3a, 0x14, 0x43, 0x3e, 0x15, 0x44, 0x3f, 0x15, - 0x46, 0x41, 0x16, 0x49, 0x44, 0x17, 0x4d, 0x47, 0x18, 0x50, 0x4a, 0x19, - 0x54, 0x4e, 0x1a, 0x55, 0x4f, 0x1b, 0x57, 0x50, 0x1b, 0x59, 0x52, 0x1c, - 0x5a, 0x53, 0x1c, 0x5b, 0x54, 0x1c, 0x5d, 0x56, 0x1d, 0x5f, 0x58, 0x1e, - 0x61, 0x5a, 0x1e, 0x63, 0x5b, 0x1f, 0x65, 0x5d, 0x20, 0x67, 0x5f, 0x20, - 0x6e, 0x65, 0x22, 0x72, 0x69, 0x24, 0x74, 0x6b, 0x24, 0x7c, 0x72, 0x27, - 0x7e, 0x74, 0x27, 0x7f, 0x76, 0x28, 0x80, 0x77, 0x28, 0x81, 0x78, 0x29, - 0x86, 0x7c, 0x2a, 0x8c, 0x82, 0x2c, 0x8d, 0x83, 0x2c, 0x90, 0x85, 0x2d, - 0x94, 0x89, 0x2e, 0x97, 0x8c, 0x2f, 0x98, 0x8d, 0x30, 0x9c, 0x90, 0x31, - 0x9d, 0x91, 0x31, 0x9e, 0x92, 0x32, 0x9f, 0x93, 0x32, 0xa2, 0x96, 0x33, - 0xa4, 0x98, 0x33, 0xa7, 0x9a, 0x34, 0xab, 0x9e, 0x36, 0xaf, 0xa2, 0x37, - 0xb2, 0xa4, 0x38, 0xb3, 0xa5, 0x38, 0xb4, 0xa6, 0x38, 0xb5, 0xa7, 0x39, - 0xb9, 0xab, 0x3a, 0xba, 0xac, 0x3a, 0xbc, 0xae, 0x3b, 0xc1, 0xb2, 0x3c, - 0xc2, 0xb3, 0x3d, 0xc6, 0xb7, 0x3e, 0xc8, 0xb9, 0x3f, 0xc9, 0xb9, 0x3f, - 0xca, 0xba, 0x3f, 0xcc, 0xbc, 0x40, 0xcf, 0xbf, 0x41, 0xd0, 0xc0, 0x41, - 0xd2, 0xc2, 0x42, 0xd3, 0xc4, 0x42, 0xd4, 0xc4, 0x43, 0xd5, 0xc5, 0x43, - 0xd6, 0xc6, 0x43, 0xd7, 0xc7, 0x44, 0xdc, 0xcc, 0x45, 0xdd, 0xcd, 0x45, - 0xdf, 0xce, 0x46, 0xe0, 0xcf, 0x46, 0xe2, 0xd1, 0x47, 0xe3, 0xd2, 0x47, - 0xe4, 0xd3, 0x48, 0xe5, 0xd4, 0x48, 0xe6, 0xd5, 0x48, 0xe7, 0xd6, 0x48, - 0xe8, 0xd7, 0x49, 0xeb, 0xd9, 0x4a, 0xec, 0xda, 0x4a, 0xed, 0xdb, 0x4a, - 0xf1, 0xdf, 0x4c, 0xf2, 0xe0, 0x4c, 0xf3, 0xe1, 0x4c, 0xf5, 0xe3, 0x4d, - 0xf7, 0xe4, 0x4d, 0xf8, 0xe5, 0x4e, 0xf9, 0xe6, 0x4e, 0xfa, 0xe7, 0x4e, - 0xfb, 0xe8, 0x4f, 0xfc, 0xe9, 0x4f, 0x43, 0xcb, 0x3f, 0x54, 0x00, 0x00, - 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, 0x29, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, 0x73, 0x78, 0x80, - 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, 0xb8, 0xbb, 0xbc, - 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xda, 0xdb, 0xde, - 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, 0x00, 0x00, 0x01, - 0xd4, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0xd7, 0x7b, 0x4c, - 0x51, 0x18, 0xc5, 0xe1, 0x09, 0xd1, 0x25, 0xd1, 0x7b, 0x27, 0x4a, 0xf4, - 0xde, 0x83, 0x60, 0x7e, 0x23, 0x21, 0x44, 0x0d, 0x12, 0xbd, 0x46, 0x8b, - 0xde, 0x25, 0x7a, 0x98, 0x68, 0x41, 0x44, 0x67, 0x88, 0x89, 0x28, 0xa3, - 0x25, 0x63, 0x22, 0xca, 0x9c, 0xf5, 0x8f, 0xb9, 0x38, 0x4c, 0x3d, 0x87, - 0x0b, 0xb2, 0xae, 0xf6, 0xf3, 0xec, 0xf7, 0xe6, 0xdb, 0xcf, 0x5e, 0x9f, - 0xc3, 0xf1, 0xdf, 0x93, 0x90, 0xd2, 0xb5, 0x57, 0xea, 0xd0, 0xb1, 0x53, - 0x67, 0xe2, 0x4c, 0x4f, 0x1f, 0x97, 0x96, 0xda, 0xbb, 0x4b, 0x72, 0x42, - 0xb4, 0x48, 0xe9, 0x3e, 0x24, 0x83, 0xb8, 0xcc, 0x1e, 0xd4, 0x2d, 0x39, - 0x6c, 0x26, 0x00, 0xe4, 0xef, 0x3d, 0x73, 0xed, 0x41, 0xf5, 0xc7, 0x80, - 0x0c, 0xbf, 0xdf, 0x7b, 0xff, 0xfa, 0xe9, 0xc2, 0x3c, 0x80, 0xf1, 0x21, - 0x04, 0xc7, 0x6e, 0xd6, 0x2a, 0x2e, 0x9f, 0xca, 0x8e, 0x42, 0x04, 0x92, - 0x4d, 0x1a, 0x18, 0xd5, 0x95, 0xee, 0xdf, 0xbe, 0xe3, 0x64, 0x85, 0x21, - 0xbd, 0xb3, 0x45, 0x77, 0x56, 0x98, 0xc3, 0x6f, 0xad, 0xba, 0xe8, 0xaa, - 0xb1, 0x41, 0x37, 0x32, 0x61, 0xc3, 0xa1, 0x83, 0x6b, 0x20, 0x07, 0x7c, - 0xd6, 0xa8, 0x2a, 0x87, 0xdc, 0xbb, 0x92, 0x82, 0x57, 0xb3, 0xb1, 0x45, - 0x07, 0x58, 0xfc, 0x42, 0x92, 0x54, 0x82, 0x2d, 0xaa, 0x5b, 0x44, 0xb1, - 0x24, 0xa9, 0x12, 0xc0, 0x55, 0x6b, 0x89, 0x82, 0xcf, 0x3c, 0xf5, 0x92, - 0x24, 0xa3, 0xd2, 0xe3, 0xf1, 0xbc, 0xfa, 0x87, 0x77, 0xfa, 0x72, 0xc5, - 0xed, 0x76, 0x97, 0x99, 0x97, 0xcf, 0xdd, 0xb7, 0xac, 0x51, 0x05, 0xc0, - 0xaa, 0xaf, 0x92, 0x64, 0x6c, 0xa6, 0x30, 0x16, 0x39, 0x91, 0xa4, 0x72, - 0x60, 0xd9, 0x4b, 0x49, 0xd2, 0x79, 0xb8, 0x6d, 0x22, 0x67, 0x08, 0xcd, - 0xc0, 0xfb, 0x0b, 0xcd, 0x3f, 0xf7, 0x59, 0x7a, 0x73, 0x1c, 0x76, 0x19, - 0x92, 0xf4, 0x90, 0xe9, 0x21, 0xd4, 0x9f, 0x7d, 0x92, 0xca, 0xc9, 0x5d, - 0x0a, 0x59, 0xeb, 0xf3, 0xe7, 0xc1, 0xc6, 0x1a, 0x49, 0xaa, 0x5f, 0x47, - 0xcf, 0x10, 0x6a, 0x35, 0xc7, 0x75, 0x4f, 0x7a, 0xba, 0xb6, 0xfa, 0xf5, - 0x1e, 0x00, 0xb2, 0x4e, 0x04, 0x24, 0x49, 0xc5, 0x8c, 0x6a, 0x12, 0xfe, - 0xbf, 0x3d, 0xc8, 0xf3, 0x9b, 0x63, 0x79, 0x4b, 0x4e, 0x15, 0x95, 0xfa, - 0xcc, 0xf3, 0xa3, 0xcc, 0xb9, 0x6d, 0x23, 0x8a, 0xd0, 0x68, 0x38, 0x3b, - 0xbf, 0xc7, 0xbe, 0x91, 0x6f, 0x39, 0x7d, 0xa2, 0xea, 0xd2, 0x7a, 0x0a, - 0x47, 0x7e, 0x44, 0x1b, 0xff, 0x26, 0x06, 0x37, 0x8e, 0x2e, 0x55, 0xbb, - 0x0c, 0x0e, 0x7f, 0x8b, 0x34, 0x81, 0x6d, 0x8c, 0x6e, 0x16, 0x5b, 0xce, - 0xf6, 0xb3, 0x28, 0x78, 0x1f, 0x36, 0x1f, 0xb6, 0x30, 0x31, 0x29, 0xbe, - 0xc2, 0x6d, 0x26, 0xb1, 0xf2, 0xf1, 0x6f, 0xf3, 0x64, 0x35, 0x63, 0x92, - 0xac, 0x8a, 0xde, 0x22, 0x8d, 0x05, 0x97, 0x82, 0x92, 0x64, 0x5c, 0x5e, - 0xc8, 0xb0, 0xe6, 0xd6, 0xeb, 0x20, 0xb1, 0x2f, 0x14, 0x78, 0xa5, 0xb7, - 0xbb, 0xa1, 0x5f, 0xa2, 0xed, 0xd6, 0xe8, 0x34, 0x99, 0xec, 0xb3, 0x17, - 0x96, 0x30, 0xad, 0xf3, 0x9f, 0x76, 0x4b, 0xd3, 0x01, 0x4e, 0x60, 0x60, - 0xcb, 0xbf, 0xac, 0xa0, 0x0e, 0x23, 0x47, 0x74, 0x74, 0x34, 0x58, 0x7e, - 0x02, 0x1f, 0x1a, 0x9e, 0x8e, 0x29, 0xc2, 0xbe, 0x91, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/wait_0_unix.go b/icon/wait_0_unix.go deleted file mode 100644 index 939aca73..00000000 --- a/icon/wait_0_unix.go +++ /dev/null @@ -1,116 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait0 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x4c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf1, 0xb3, 0x09, 0xf1, 0xb3, 0x0a, 0xf1, 0xb4, 0x0b, - 0xf1, 0xb4, 0x0c, 0xf1, 0xb4, 0x0d, 0xf1, 0xb4, 0x0e, 0xf1, 0xb5, 0x10, - 0xf1, 0xb6, 0x12, 0xf2, 0xb6, 0x13, 0xf2, 0xb6, 0x14, 0xf2, 0xb7, 0x17, - 0xf2, 0xb8, 0x18, 0xf2, 0xb8, 0x19, 0xf2, 0xb9, 0x1c, 0xf2, 0xb9, 0x1d, - 0xf2, 0xba, 0x1e, 0xf2, 0xba, 0x1f, 0xf2, 0xba, 0x20, 0xf2, 0xba, 0x21, - 0xf2, 0xbb, 0x22, 0xf3, 0xbb, 0x24, 0xf3, 0xbc, 0x25, 0xf3, 0xbc, 0x27, - 0xf3, 0xbd, 0x28, 0xf3, 0xbe, 0x2d, 0xf3, 0xbe, 0x2e, 0xf3, 0xbf, 0x2f, - 0xf3, 0xbf, 0x30, 0xf3, 0xbf, 0x31, 0xf3, 0xc0, 0x32, 0xf3, 0xc0, 0x34, - 0xf4, 0xc1, 0x35, 0xf4, 0xc2, 0x38, 0xf4, 0xc2, 0x3a, 0xf4, 0xc2, 0x3b, - 0xf4, 0xc3, 0x3c, 0xf4, 0xc3, 0x3e, 0xf4, 0xc5, 0x42, 0xf4, 0xc5, 0x43, - 0xf5, 0xc6, 0x48, 0xf5, 0xc7, 0x4a, 0xf5, 0xc7, 0x4b, 0xf5, 0xc8, 0x4e, - 0xf5, 0xc9, 0x4f, 0xf5, 0xc9, 0x50, 0xf5, 0xc9, 0x51, 0xf5, 0xca, 0x54, - 0xf5, 0xcb, 0x58, 0xf6, 0xcd, 0x5c, 0xf6, 0xce, 0x5f, 0xf6, 0xce, 0x61, - 0xf6, 0xcf, 0x64, 0xf6, 0xcf, 0x65, 0xf6, 0xd0, 0x66, 0xf6, 0xd0, 0x67, - 0xf7, 0xd1, 0x6a, 0xf7, 0xd1, 0x6b, 0xf7, 0xd2, 0x6e, 0xf7, 0xd3, 0x72, - 0xf7, 0xd4, 0x75, 0xf7, 0xd5, 0x76, 0xf8, 0xd6, 0x7c, 0xf8, 0xd8, 0x81, - 0xf8, 0xd8, 0x82, 0xf8, 0xd9, 0x83, 0xf8, 0xd9, 0x84, 0xf8, 0xda, 0x86, - 0xf9, 0xdc, 0x8e, 0xf9, 0xdd, 0x90, 0xf9, 0xde, 0x94, 0xf9, 0xe0, 0x9b, - 0xf9, 0xe1, 0x9d, 0xfa, 0xe1, 0x9f, 0xfa, 0xe2, 0xa0, 0xfa, 0xe2, 0xa2, - 0xfa, 0xe3, 0xa4, 0xfa, 0xe4, 0xa6, 0xfa, 0xe4, 0xa7, 0xfa, 0xe4, 0xa8, - 0xfa, 0xe5, 0xaa, 0xfa, 0xe5, 0xac, 0xfa, 0xe6, 0xad, 0xfb, 0xe7, 0xb1, - 0xfb, 0xe8, 0xb4, 0xfb, 0xe9, 0xb8, 0xfb, 0xea, 0xbb, 0xfb, 0xea, 0xbc, - 0xfb, 0xeb, 0xbd, 0xfc, 0xec, 0xc2, 0xfc, 0xed, 0xc6, 0xfc, 0xee, 0xc7, - 0xfc, 0xef, 0xca, 0xfc, 0xf0, 0xce, 0xfc, 0xf1, 0xd1, 0xfc, 0xf1, 0xd2, - 0xfc, 0xf1, 0xd3, 0xfd, 0xf2, 0xd4, 0xfd, 0xf3, 0xd7, 0xfd, 0xf3, 0xd8, - 0xfd, 0xf3, 0xd9, 0xfd, 0xf4, 0xdb, 0xfd, 0xf5, 0xdf, 0xfd, 0xf6, 0xe1, - 0xfd, 0xf6, 0xe2, 0xfd, 0xf6, 0xe3, 0xfd, 0xf7, 0xe5, 0xfd, 0xf8, 0xe8, - 0xfe, 0xf7, 0xe5, 0xfe, 0xf8, 0xe7, 0xfe, 0xf8, 0xe8, 0xfe, 0xf8, 0xe9, - 0xfe, 0xf9, 0xed, 0xfe, 0xfb, 0xf3, 0xfe, 0xfc, 0xf4, 0xfe, 0xfc, 0xf7, - 0xfe, 0xfd, 0xf8, 0xff, 0xfc, 0xf6, 0xff, 0xfd, 0xf7, 0xff, 0xfd, 0xf8, - 0xff, 0xfe, 0xfa, 0xff, 0xfe, 0xfb, 0xff, 0xfe, 0xfc, 0xff, 0xfe, 0xfd, - 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x0b, 0x4b, 0x82, 0xfc, 0x00, 0x00, - 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, 0x29, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, 0x73, 0x78, 0x80, - 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, 0xb8, 0xbb, 0xbc, - 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xda, 0xdb, 0xde, - 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, 0x00, 0x00, 0x01, - 0xd4, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0xd5, 0x5b, 0x54, - 0x51, 0x18, 0xc5, 0xe1, 0x41, 0xb1, 0x05, 0xec, 0x6e, 0xc5, 0xc0, 0xee, - 0x46, 0x45, 0x9d, 0x75, 0xc6, 0x40, 0xc6, 0x01, 0x6b, 0x0c, 0x64, 0x44, - 0xc7, 0x56, 0x44, 0xc5, 0x62, 0x10, 0x1b, 0xbb, 0x15, 0x0b, 0x3b, 0xc1, - 0xc0, 0x04, 0x15, 0x9c, 0xdf, 0x3f, 0xe6, 0xc5, 0xd1, 0xc9, 0x73, 0xf4, - 0x42, 0x59, 0x57, 0xfb, 0x79, 0xf6, 0x7b, 0xf3, 0xed, 0x67, 0xaf, 0xcf, - 0xe1, 0xf8, 0xef, 0x49, 0x48, 0xe9, 0xda, 0x2b, 0x75, 0xe8, 0xd8, 0xa9, - 0x33, 0x71, 0xa6, 0xa7, 0x8f, 0x4b, 0x4b, 0xed, 0xdd, 0x25, 0x39, 0x21, - 0x5a, 0xa4, 0x74, 0x1f, 0x92, 0x41, 0x5c, 0x66, 0x0f, 0xea, 0x96, 0x1c, - 0x36, 0x13, 0x00, 0x2a, 0x6f, 0x9e, 0x3c, 0xb0, 0x2d, 0x77, 0xa9, 0x5b, - 0x86, 0xc7, 0xe3, 0xdb, 0xbe, 0xff, 0x54, 0x79, 0x15, 0xc0, 0xf8, 0x10, - 0x82, 0x0b, 0x7b, 0xb3, 0x15, 0x97, 0x25, 0x45, 0x17, 0x21, 0x02, 0xc9, - 0x26, 0x0d, 0x8c, 0xb2, 0x8a, 0xaf, 0xdf, 0xbf, 0x77, 0xb6, 0xc0, 0x90, - 0x56, 0xd8, 0xa2, 0x5d, 0xef, 0xcd, 0xe1, 0x1f, 0xe6, 0x1d, 0x09, 0xe6, - 0xd8, 0xa0, 0x7d, 0xf5, 0xf0, 0xec, 0xca, 0xd5, 0x57, 0x50, 0x0b, 0x5e, - 0x6b, 0x94, 0x57, 0x4b, 0xf5, 0x4e, 0x49, 0xae, 0x83, 0xdf, 0xb0, 0x45, - 0xd7, 0xf8, 0xbc, 0x4e, 0x92, 0x54, 0x8a, 0x2d, 0xca, 0xfa, 0x4a, 0x99, - 0x24, 0x29, 0x1f, 0x20, 0x98, 0x6d, 0x89, 0x5c, 0x1b, 0xfc, 0x99, 0x92, - 0x24, 0x23, 0xdf, 0xef, 0xf7, 0xaf, 0xf9, 0x87, 0x77, 0x5a, 0x74, 0x28, - 0x10, 0x08, 0x14, 0x99, 0x97, 0xeb, 0x03, 0x7b, 0xac, 0x51, 0x01, 0xc0, - 0xbb, 0x85, 0x92, 0x64, 0x3c, 0xa6, 0x3c, 0x16, 0x39, 0x91, 0xa4, 0x42, - 0xe0, 0xc3, 0x5a, 0x49, 0xd2, 0x31, 0xd8, 0x6d, 0x22, 0x67, 0x08, 0xcd, - 0xc0, 0xf7, 0x0b, 0x7d, 0x3f, 0xbe, 0x58, 0x5a, 0x75, 0x1e, 0xee, 0x18, - 0x92, 0xb4, 0x95, 0xe9, 0x21, 0xd4, 0x9f, 0x1b, 0x92, 0x0a, 0xa9, 0xfe, - 0x08, 0x75, 0xcf, 0x2b, 0x7f, 0xc0, 0xd3, 0x1c, 0x49, 0xca, 0x7c, 0x41, - 0xcf, 0x10, 0x6a, 0x35, 0x27, 0xb8, 0x43, 0xda, 0xf8, 0x32, 0x77, 0xf5, - 0x2d, 0x00, 0xea, 0xce, 0xb9, 0x25, 0x49, 0x65, 0x8c, 0x6a, 0x12, 0xfe, - 0xbf, 0x3d, 0xa8, 0xf2, 0x98, 0x63, 0xf9, 0x4a, 0xcf, 0x9c, 0x2e, 0xf6, - 0x9a, 0xe7, 0x2d, 0xf5, 0x73, 0xdb, 0x46, 0x14, 0xa1, 0xd1, 0x70, 0xee, - 0xce, 0x8f, 0x7d, 0x23, 0xef, 0x5b, 0xfa, 0x44, 0xd5, 0xa5, 0xf5, 0x14, - 0x2e, 0xcd, 0x8b, 0x36, 0x9e, 0x27, 0x0c, 0x6e, 0x1c, 0x5d, 0xaa, 0x76, - 0x19, 0x5c, 0x5e, 0x10, 0x69, 0xdc, 0x0f, 0x18, 0xdd, 0x2c, 0xb6, 0x9c, - 0xed, 0x67, 0x51, 0xb1, 0x3c, 0x6c, 0x96, 0x3d, 0x62, 0x62, 0x52, 0x7c, - 0x85, 0xdb, 0x4c, 0xe2, 0xcd, 0xe6, 0xdf, 0x66, 0xd3, 0x6b, 0xc6, 0x24, - 0x59, 0x15, 0xbd, 0x45, 0x1a, 0x35, 0x87, 0x5d, 0x92, 0x64, 0x94, 0x7c, - 0x61, 0x58, 0x73, 0xeb, 0x75, 0x90, 0xd8, 0x17, 0x2a, 0x7c, 0xd2, 0xca, - 0xdb, 0xd0, 0x2f, 0xd1, 0x76, 0x6b, 0x74, 0x9a, 0x4c, 0xcd, 0x89, 0xa3, - 0x9f, 0x98, 0xd6, 0xf9, 0x4f, 0xbb, 0xa5, 0xe9, 0x00, 0x27, 0x30, 0xb0, - 0xe5, 0x5f, 0x56, 0x50, 0x87, 0x91, 0x23, 0x3a, 0x3a, 0x1a, 0x2c, 0x3f, - 0x01, 0x90, 0x64, 0x3e, 0x4b, 0xf8, 0xec, 0x00, 0x31, 0x00, 0x00, 0x00, - 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/wait_0_win.go b/icon/wait_0_win.go deleted file mode 100644 index 0ddb7805..00000000 --- a/icon/wait_0_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait0 []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x83, 0xd9, - 0xf8, 0xff, 0x7c, 0xd6, 0xf8, 0xff, 0xf3, 0xfb, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc6, 0xed, 0xfc, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x25, 0xbc, 0xf3, 0xff, 0xbb, 0xea, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x72, 0xd3, - 0xf7, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, - 0xf1, 0xff, 0x6e, 0xd2, 0xf7, 0xff, 0xf7, 0xfc, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xe5, 0xf7, 0xfd, 0xff, 0x3e, 0xc3, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3c, 0xc3, 0xf4, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xed, - 0xfc, 0xff, 0x21, 0xba, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x20, 0xba, - 0xf2, 0xff, 0xd1, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xa6, 0xe4, 0xfa, 0xff, 0x0e, 0xb4, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0xca, 0xef, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0xd3, 0xf1, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xeb, - 0xfb, 0xff, 0x0d, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x24, 0xbb, - 0xf3, 0xff, 0xe8, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x75, 0xd4, 0xf7, 0xff, 0x94, 0xde, - 0xf9, 0xff, 0x90, 0xdd, 0xf9, 0xff, 0x6a, 0xd1, 0xf7, 0xff, 0x24, 0xbb, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x42, 0xc5, 0xf4, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xff, 0xff, 0xff, 0x4b, 0xc7, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3b, 0xc2, 0xf4, 0xff, 0xdb, 0xf4, - 0xfd, 0xff, 0x2e, 0xbe, 0xf3, 0xff, 0x28, 0xbd, 0xf3, 0xff, 0xb8, 0xe9, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, - 0xff, 0xff, 0x9d, 0xe1, 0xf9, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xad, 0xe6, 0xfa, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x51, 0xc9, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe7, 0xf8, 0xfe, 0xff, 0xed, 0xf9, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, 0xff, 0xff, 0xd8, 0xf3, - 0xfd, 0xff, 0xe1, 0xf6, 0xfd, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, 0xf2, 0xfd, 0xff, 0x1d, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0xd9, 0xf3, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x51, 0xc9, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xfe, - 0xff, 0xff, 0x82, 0xd8, 0xf8, 0xff, 0x18, 0xb8, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x27, 0xbc, 0xf3, 0xff, 0x9f, 0xe1, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0xea, - 0xfb, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x43, 0xc5, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x51, 0xc9, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe9, 0xf8, - 0xfe, 0xff, 0x2f, 0xbf, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x81, 0xd8, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x54, 0xca, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x4f, 0xc9, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe5, 0xf7, 0xfe, 0xff, 0x10, 0xb5, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0xd2, 0xf1, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x13, 0xb6, 0xf2, 0xff, 0x67, 0xd0, - 0xf6, 0xff, 0x6b, 0xd1, 0xf7, 0xff, 0x6b, 0xd1, 0xf7, 0xff, 0x6b, 0xd1, - 0xf7, 0xff, 0x5f, 0xce, 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x35, 0xc1, 0xf4, 0xff, 0x6b, 0xd1, - 0xf7, 0xff, 0x58, 0xcb, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x38, 0xc2, - 0xf4, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x34, 0xc0, - 0xf3, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0x3a, 0xc2, - 0xf4, 0xff, 0x2d, 0xbe, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x14, 0xb6, 0xf2, 0xff, 0xf7, 0xfd, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x34, 0xc0, 0xf3, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1c, 0xb9, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xaa, 0xe5, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xfc, 0xfe, 0xff, 0x32, 0xc0, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x75, 0xd4, - 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0xbb, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x30, 0xbf, - 0xf3, 0xff, 0xf6, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf8, - 0xfe, 0xff, 0x4e, 0xc8, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x66, 0xd0, - 0xf6, 0xff, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0xbb, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x61, 0xce, 0xf6, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd7, 0xf3, 0xfd, 0xff, 0xa7, 0xe4, - 0xfa, 0xff, 0xa8, 0xe4, 0xfa, 0xff, 0xdf, 0xf5, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xfc, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0xbb, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x50, 0xc9, 0xf5, 0xff, 0xe8, 0xf8, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xce, 0xf0, 0xfc, 0xff, 0x30, 0xbf, 0xf3, 0xff, 0x76, 0xd5, - 0xf7, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1d, 0xb9, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x14, 0xb6, - 0xf2, 0xff, 0x6a, 0xd1, 0xf7, 0xff, 0xac, 0xe5, 0xfa, 0xff, 0xc7, 0xee, - 0xfc, 0xff, 0xc2, 0xec, 0xfc, 0xff, 0x9b, 0xe0, 0xf9, 0xff, 0x4f, 0xc9, - 0xf5, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x22, 0xbb, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xa0, 0xe2, 0xfa, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1e, 0xba, 0xf2, 0xff, 0x5f, 0xce, 0xf6, 0xff, 0xa2, 0xe2, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe1, 0xf6, 0xfd, 0xff, 0xb1, 0xe7, 0xfb, 0xff, 0x84, 0xd9, - 0xf8, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0x48, 0xc6, 0xf5, 0xff, 0x2e, 0xbe, - 0xf3, 0xff, 0x1f, 0xba, 0xf2, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x4a, 0xc7, 0xf5, 0xff, 0x64, 0xcf, - 0xf6, 0xff, 0x86, 0xda, 0xf8, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0xe2, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x29, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xbc, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xb8, 0xff, 0xff, - 0xff, 0x70, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x29, 0xff, 0xff, 0xff, 0x5b, 0xff, 0xff, - 0xff, 0x83, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x85, 0xff, 0xff, 0xff, 0x57, 0xff, 0xff, - 0xff, 0x27, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/wait_1_darwin.go b/icon/wait_1_darwin.go deleted file mode 100644 index 228f3912..00000000 --- a/icon/wait_1_darwin.go +++ /dev/null @@ -1,115 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait1 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x37, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, - 0x03, 0x03, 0x01, 0x04, 0x04, 0x01, 0x06, 0x05, 0x02, 0x06, 0x06, 0x02, - 0x07, 0x06, 0x02, 0x07, 0x07, 0x02, 0x09, 0x08, 0x03, 0x0b, 0x0a, 0x03, - 0x0b, 0x0b, 0x04, 0x0d, 0x0c, 0x04, 0x12, 0x10, 0x06, 0x14, 0x12, 0x06, - 0x17, 0x16, 0x07, 0x1a, 0x18, 0x08, 0x1c, 0x1a, 0x09, 0x1d, 0x1a, 0x09, - 0x1e, 0x1b, 0x09, 0x1f, 0x1c, 0x0a, 0x21, 0x1e, 0x0a, 0x22, 0x1f, 0x0b, - 0x23, 0x20, 0x0b, 0x25, 0x22, 0x0b, 0x27, 0x24, 0x0c, 0x28, 0x25, 0x0c, - 0x2b, 0x28, 0x0e, 0x2d, 0x2a, 0x0e, 0x2e, 0x2b, 0x0f, 0x2f, 0x2c, 0x0f, - 0x32, 0x2f, 0x10, 0x34, 0x30, 0x10, 0x35, 0x31, 0x11, 0x36, 0x32, 0x11, - 0x3a, 0x36, 0x12, 0x43, 0x3e, 0x15, 0x46, 0x41, 0x16, 0x48, 0x43, 0x17, - 0x4d, 0x47, 0x18, 0x50, 0x4a, 0x19, 0x54, 0x4e, 0x1a, 0x55, 0x4f, 0x1b, - 0x56, 0x4f, 0x1b, 0x5b, 0x54, 0x1c, 0x5d, 0x56, 0x1d, 0x5f, 0x58, 0x1e, - 0x61, 0x5a, 0x1e, 0x65, 0x5d, 0x20, 0x6f, 0x66, 0x23, 0x74, 0x6b, 0x24, - 0x76, 0x6d, 0x25, 0x7c, 0x72, 0x27, 0x7e, 0x74, 0x27, 0x7f, 0x76, 0x28, - 0x84, 0x7a, 0x2a, 0x86, 0x7c, 0x2a, 0x87, 0x7d, 0x2a, 0x89, 0x7f, 0x2b, - 0x90, 0x85, 0x2d, 0x93, 0x88, 0x2e, 0x94, 0x89, 0x2e, 0x99, 0x8e, 0x30, - 0x9a, 0x8f, 0x30, 0x9e, 0x92, 0x32, 0x9f, 0x93, 0x32, 0xa4, 0x98, 0x33, - 0xa7, 0x9a, 0x34, 0xa8, 0x9b, 0x35, 0xa9, 0x9c, 0x35, 0xaa, 0x9d, 0x35, - 0xaf, 0xa2, 0x37, 0xb0, 0xa3, 0x37, 0xb2, 0xa4, 0x38, 0xb3, 0xa5, 0x38, - 0xb7, 0xa9, 0x39, 0xb8, 0xaa, 0x3a, 0xb9, 0xab, 0x3a, 0xba, 0xac, 0x3a, - 0xbc, 0xae, 0x3b, 0xc1, 0xb2, 0x3c, 0xc2, 0xb3, 0x3d, 0xc4, 0xb5, 0x3d, - 0xc5, 0xb6, 0x3e, 0xc6, 0xb7, 0x3e, 0xc8, 0xb9, 0x3f, 0xc9, 0xb9, 0x3f, - 0xca, 0xba, 0x3f, 0xce, 0xbe, 0x40, 0xcf, 0xbf, 0x41, 0xd3, 0xc4, 0x42, - 0xd5, 0xc5, 0x43, 0xd6, 0xc6, 0x43, 0xdb, 0xcb, 0x45, 0xdc, 0xcc, 0x45, - 0xde, 0xce, 0x46, 0xdf, 0xce, 0x46, 0xe0, 0xcf, 0x46, 0xe2, 0xd1, 0x47, - 0xe3, 0xd2, 0x47, 0xe4, 0xd3, 0x48, 0xe5, 0xd4, 0x48, 0xe6, 0xd5, 0x48, - 0xe8, 0xd7, 0x49, 0xea, 0xd9, 0x49, 0xeb, 0xd9, 0x4a, 0xed, 0xdb, 0x4a, - 0xef, 0xdd, 0x4b, 0xf1, 0xdf, 0x4c, 0xf3, 0xe1, 0x4c, 0xf4, 0xe2, 0x4d, - 0xf6, 0xe4, 0x4d, 0xf7, 0xe4, 0x4d, 0xf8, 0xe5, 0x4e, 0xf9, 0xe6, 0x4e, - 0xfa, 0xe7, 0x4e, 0xfb, 0xe8, 0x4f, 0xfc, 0xe9, 0x4f, 0x9a, 0x13, 0x0f, - 0x3c, 0x00, 0x00, 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, - 0x29, 0x33, 0x34, 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, - 0x73, 0x78, 0x80, 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, - 0xb8, 0xbb, 0xbc, 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, - 0xda, 0xdb, 0xde, 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, - 0xef, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, - 0x00, 0x00, 0x01, 0xd5, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0x60, - 0xa0, 0x3a, 0x60, 0xe4, 0x97, 0x94, 0x53, 0xd5, 0x36, 0xb6, 0x76, 0x70, - 0x77, 0xb3, 0xb3, 0x33, 0xd1, 0x52, 0x95, 0x97, 0xe0, 0x63, 0x44, 0x55, - 0xc1, 0x2f, 0xad, 0xe9, 0xe4, 0x8e, 0x01, 0x9c, 0xd5, 0xa5, 0xf8, 0x10, - 0x6a, 0xcc, 0x40, 0x42, 0xd1, 0xf9, 0x35, 0xed, 0xd3, 0x16, 0xaf, 0xd9, - 0xb8, 0x67, 0xf7, 0x86, 0x0d, 0x0b, 0xa7, 0x76, 0x54, 0xe7, 0x45, 0x81, - 0x44, 0x4d, 0xe1, 0x8a, 0xdc, 0xdd, 0xcb, 0xba, 0xd6, 0xed, 0xc1, 0x00, - 0x6b, 0x3b, 0x4b, 0xdd, 0xdd, 0x91, 0x14, 0xed, 0xc1, 0x01, 0x68, 0xac, - 0x68, 0x6b, 0x7b, 0x51, 0x46, 0x66, 0x49, 0xf7, 0x76, 0x7c, 0x8a, 0xb6, - 0xc7, 0x40, 0x3c, 0x9f, 0xb4, 0x00, 0x9f, 0x49, 0x7d, 0x3e, 0x89, 0xc5, - 0x85, 0x40, 0xbf, 0x07, 0xcf, 0xc5, 0xa5, 0xa8, 0x67, 0xc2, 0x9e, 0x3d, - 0xa0, 0x90, 0xd8, 0xd9, 0x16, 0xe0, 0x1e, 0xb9, 0x19, 0xbb, 0xa2, 0x56, - 0x4f, 0xef, 0x2e, 0xa8, 0x81, 0x13, 0x3d, 0xdc, 0x1b, 0xb0, 0x2a, 0x6a, - 0xf5, 0x74, 0x77, 0x87, 0xab, 0xca, 0x73, 0x4f, 0xc1, 0xa6, 0xa8, 0xd7, - 0x13, 0xe4, 0x62, 0xef, 0x49, 0x10, 0x45, 0xad, 0xee, 0x9e, 0xdb, 0xb0, - 0x28, 0x9a, 0x51, 0x55, 0xe4, 0xee, 0x5e, 0x5e, 0x35, 0x0f, 0x24, 0xd5, - 0x98, 0x16, 0xe7, 0xee, 0x9e, 0x92, 0x3e, 0x13, 0x8b, 0x9b, 0xe6, 0xbb, - 0xbb, 0x4f, 0x86, 0x3a, 0xc9, 0x07, 0x64, 0x6a, 0xec, 0x4a, 0x2c, 0x8a, - 0xb6, 0x87, 0xb8, 0x97, 0xc0, 0x43, 0x02, 0xa8, 0x66, 0x19, 0xaa, 0x75, - 0x6e, 0x90, 0x20, 0xa8, 0x70, 0xf7, 0xec, 0x87, 0xab, 0x02, 0xab, 0xd9, - 0xe3, 0xee, 0x06, 0x57, 0x64, 0xef, 0xbe, 0x10, 0x24, 0xb2, 0x2e, 0xdc, - 0xdd, 0xbb, 0x76, 0xfd, 0x9e, 0x3d, 0x4b, 0x67, 0xed, 0xd9, 0x33, 0x6f, - 0x35, 0x48, 0x64, 0xba, 0xbb, 0x2d, 0x5c, 0x91, 0xb2, 0x7b, 0x01, 0x58, - 0xff, 0xbc, 0x50, 0xa0, 0xff, 0xe2, 0x23, 0xe0, 0xe1, 0xb5, 0x25, 0xc1, - 0x5d, 0x16, 0xae, 0x88, 0xdb, 0xc5, 0x63, 0x0a, 0x58, 0x74, 0x49, 0x2e, - 0x38, 0xea, 0x02, 0xeb, 0x20, 0x8a, 0x2a, 0xdd, 0x0d, 0x58, 0x11, 0xe9, - 0x57, 0xc6, 0x3d, 0x6a, 0x03, 0x44, 0x7c, 0x51, 0x73, 0x55, 0x4d, 0xf7, - 0x26, 0x08, 0x7b, 0x86, 0x97, 0xab, 0x20, 0x52, 0x46, 0x60, 0xd2, 0x75, - 0xcf, 0xde, 0x81, 0x9e, 0x96, 0x56, 0x84, 0xb9, 0x2b, 0xa0, 0x64, 0x17, - 0x1e, 0x2b, 0xf7, 0x92, 0x9d, 0xa8, 0x6a, 0x36, 0x24, 0xbb, 0x6b, 0x30, - 0xa3, 0x66, 0x2a, 0x21, 0x27, 0xf7, 0xe2, 0xed, 0xc8, 0x6a, 0x36, 0x66, - 0xba, 0x1b, 0xb2, 0xa3, 0x67, 0x4e, 0x61, 0x47, 0xf7, 0xac, 0x55, 0x08, - 0x35, 0xab, 0x53, 0xdd, 0xcd, 0x79, 0x31, 0xb3, 0xb0, 0x80, 0x85, 0x7b, - 0xf8, 0x6c, 0x98, 0x9a, 0x39, 0x91, 0xee, 0x46, 0xbc, 0xd8, 0x32, 0x3a, - 0xa7, 0x96, 0xbb, 0x6f, 0xd3, 0x2e, 0x90, 0x92, 0xdd, 0x2d, 0xfe, 0xee, - 0x3a, 0x1c, 0xd8, 0x8b, 0x03, 0x16, 0x45, 0x77, 0xf7, 0x2c, 0x60, 0xd8, - 0x2f, 0xcf, 0x71, 0x77, 0x57, 0x62, 0xc1, 0x59, 0x6a, 0x88, 0x59, 0xba, - 0xfb, 0xd5, 0xd6, 0x07, 0xb9, 0xdb, 0x88, 0xe3, 0x2b, 0x5b, 0xd8, 0x54, - 0xdc, 0x80, 0x21, 0xae, 0xc6, 0x45, 0xa0, 0x08, 0x12, 0xd1, 0xd7, 0x13, - 0x65, 0xa0, 0x19, 0x00, 0x00, 0x52, 0xa2, 0x92, 0x30, 0xd2, 0x21, 0x7e, - 0x61, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82, -} - diff --git a/icon/wait_1_unix.go b/icon/wait_1_unix.go deleted file mode 100644 index 1f00f335..00000000 --- a/icon/wait_1_unix.go +++ /dev/null @@ -1,114 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait1 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x34, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf1, 0xb3, 0x09, 0xf1, 0xb3, 0x0a, 0xf1, 0xb4, 0x0b, - 0xf1, 0xb4, 0x0c, 0xf1, 0xb4, 0x0d, 0xf1, 0xb4, 0x0e, 0xf1, 0xb5, 0x0f, - 0xf1, 0xb5, 0x11, 0xf1, 0xb6, 0x12, 0xf2, 0xb6, 0x14, 0xf2, 0xb7, 0x16, - 0xf2, 0xb7, 0x17, 0xf2, 0xb8, 0x19, 0xf2, 0xb8, 0x1a, 0xf2, 0xb9, 0x1c, - 0xf2, 0xba, 0x1e, 0xf2, 0xba, 0x1f, 0xf2, 0xba, 0x20, 0xf2, 0xba, 0x21, - 0xf2, 0xbb, 0x22, 0xf3, 0xbb, 0x24, 0xf3, 0xbc, 0x25, 0xf3, 0xbc, 0x26, - 0xf3, 0xbd, 0x28, 0xf3, 0xbd, 0x29, 0xf3, 0xbe, 0x2e, 0xf3, 0xbf, 0x2f, - 0xf3, 0xbf, 0x31, 0xf4, 0xc1, 0x35, 0xf4, 0xc1, 0x36, 0xf4, 0xc2, 0x3a, - 0xf4, 0xc2, 0x3b, 0xf4, 0xc3, 0x3c, 0xf4, 0xc3, 0x3e, 0xf4, 0xc4, 0x3f, - 0xf4, 0xc4, 0x40, 0xf4, 0xc5, 0x42, 0xf4, 0xc5, 0x43, 0xf5, 0xc6, 0x48, - 0xf5, 0xc7, 0x4a, 0xf5, 0xc7, 0x4b, 0xf5, 0xc8, 0x4c, 0xf5, 0xc8, 0x4d, - 0xf5, 0xc9, 0x50, 0xf5, 0xc9, 0x51, 0xf5, 0xca, 0x53, 0xf5, 0xca, 0x54, - 0xf6, 0xcc, 0x59, 0xf6, 0xcc, 0x5a, 0xf6, 0xcc, 0x5b, 0xf6, 0xcd, 0x5c, - 0xf6, 0xce, 0x5f, 0xf6, 0xcf, 0x64, 0xf6, 0xcf, 0x65, 0xf6, 0xd1, 0x69, - 0xf7, 0xd2, 0x6e, 0xf7, 0xd3, 0x6f, 0xf7, 0xd3, 0x72, 0xf7, 0xd6, 0x79, - 0xf7, 0xd6, 0x7b, 0xf8, 0xd6, 0x7c, 0xf8, 0xd7, 0x7e, 0xf8, 0xd9, 0x83, - 0xf8, 0xd9, 0x84, 0xf8, 0xda, 0x86, 0xf8, 0xdc, 0x8c, 0xf9, 0xdc, 0x8e, - 0xf9, 0xde, 0x93, 0xf9, 0xe1, 0x9d, 0xfa, 0xe2, 0xa0, 0xfa, 0xe2, 0xa2, - 0xfa, 0xe3, 0xa4, 0xfa, 0xe4, 0xa6, 0xfa, 0xe5, 0xab, 0xfa, 0xe5, 0xac, - 0xfa, 0xe6, 0xad, 0xfb, 0xe7, 0xb1, 0xfb, 0xe8, 0xb4, 0xfb, 0xe9, 0xb9, - 0xfb, 0xea, 0xbb, 0xfb, 0xeb, 0xbd, 0xfc, 0xed, 0xc6, 0xfc, 0xef, 0xca, - 0xfc, 0xef, 0xcb, 0xfc, 0xef, 0xcc, 0xfc, 0xf0, 0xce, 0xfc, 0xf1, 0xd1, - 0xfc, 0xf1, 0xd2, 0xfc, 0xf1, 0xd3, 0xfd, 0xf2, 0xd5, 0xfd, 0xf3, 0xd8, - 0xfd, 0xf3, 0xd9, 0xfd, 0xf4, 0xdb, 0xfd, 0xf5, 0xdd, 0xfd, 0xf5, 0xde, - 0xfd, 0xf5, 0xdf, 0xfd, 0xf6, 0xe1, 0xfd, 0xf6, 0xe2, 0xfd, 0xf6, 0xe3, - 0xfd, 0xf7, 0xe4, 0xfd, 0xf7, 0xe5, 0xfd, 0xf8, 0xe8, 0xfe, 0xf7, 0xe6, - 0xfe, 0xf9, 0xec, 0xfe, 0xfa, 0xee, 0xfe, 0xfb, 0xf2, 0xfe, 0xfb, 0xf3, - 0xfe, 0xfc, 0xf4, 0xfe, 0xfc, 0xf7, 0xfe, 0xfd, 0xf8, 0xff, 0xfc, 0xf6, - 0xff, 0xfd, 0xf9, 0xff, 0xfe, 0xfb, 0xff, 0xfe, 0xfc, 0xff, 0xfe, 0xfd, - 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xce, 0x02, 0xe3, 0x64, 0x00, 0x00, - 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, 0x29, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, 0x73, 0x78, 0x80, - 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, 0xb8, 0xbb, 0xbc, - 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xda, 0xdb, 0xde, - 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, 0x00, 0x00, 0x01, - 0xd7, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0x57, 0x57, 0x13, - 0x51, 0x14, 0x86, 0xe1, 0xa0, 0xd8, 0x05, 0xec, 0xbd, 0x2b, 0x16, 0xec, - 0xbd, 0xa3, 0xa2, 0xe6, 0x43, 0x8c, 0x8d, 0x18, 0xc5, 0x82, 0x25, 0x1a, - 0x1b, 0xf6, 0x0a, 0x4a, 0xec, 0x60, 0x6c, 0x01, 0x15, 0x15, 0x2c, 0x58, - 0xa3, 0xc1, 0x5e, 0x90, 0x38, 0xbc, 0x7f, 0xce, 0x8b, 0xc1, 0x49, 0x42, - 0x26, 0xf1, 0x46, 0xf6, 0xd5, 0xac, 0xb3, 0x9e, 0x75, 0xce, 0x99, 0xbd, - 0xce, 0xb7, 0x1d, 0x8e, 0xff, 0x5e, 0x69, 0x59, 0x03, 0x87, 0x65, 0x4f, - 0x9c, 0xb9, 0x70, 0x29, 0xce, 0xdc, 0xdc, 0x59, 0x39, 0xd9, 0xc3, 0x07, - 0x64, 0xa6, 0xc5, 0x8b, 0xac, 0xc1, 0x13, 0xf2, 0x48, 0xa8, 0xe5, 0xe3, - 0x06, 0x65, 0x46, 0xcd, 0x1c, 0x80, 0xf7, 0x0f, 0x2a, 0xcb, 0x8f, 0xec, - 0xda, 0x5c, 0xa8, 0x7c, 0xb7, 0xdb, 0x7b, 0xf4, 0xc2, 0x8d, 0x9a, 0x30, - 0xc0, 0x6c, 0x0b, 0xc1, 0x9d, 0x32, 0x8f, 0x12, 0x6a, 0xd3, 0xf9, 0xbb, - 0x10, 0x83, 0x94, 0xa4, 0xda, 0x18, 0xad, 0x2d, 0xaf, 0x7e, 0x52, 0x17, - 0x2c, 0x75, 0xa5, 0x42, 0xae, 0x77, 0xe6, 0xcf, 0xbf, 0xdc, 0x93, 0x6a, - 0xa7, 0x33, 0x4d, 0xaf, 0xaa, 0xee, 0x85, 0xe1, 0xdb, 0xbe, 0x64, 0xe8, - 0xdc, 0x29, 0xc9, 0x23, 0xa9, 0xc0, 0xff, 0x8b, 0x86, 0xf5, 0xf6, 0xc8, - 0x6f, 0x44, 0xca, 0x5a, 0x36, 0x3c, 0xd9, 0xcc, 0x55, 0x5b, 0xe4, 0x37, - 0xc0, 0x52, 0x35, 0xd4, 0xdb, 0xa1, 0xb3, 0x06, 0x40, 0xe4, 0x84, 0x89, - 0xfc, 0x18, 0x6b, 0x6c, 0x50, 0x49, 0xa0, 0x1a, 0x6e, 0x07, 0x7c, 0x92, - 0x74, 0xe5, 0xd9, 0x5b, 0xa8, 0x7f, 0x7a, 0xc8, 0xe6, 0x4e, 0x7b, 0xe1, - 0x78, 0xcb, 0x95, 0x9a, 0x00, 0x42, 0x5b, 0x6d, 0x90, 0xeb, 0x2b, 0x41, - 0xab, 0x13, 0x10, 0x2a, 0x8e, 0x3f, 0xce, 0x69, 0xb6, 0xe0, 0x16, 0xc6, - 0x69, 0x4b, 0x85, 0x8a, 0x25, 0x09, 0xa7, 0x85, 0x96, 0xe0, 0x95, 0x24, - 0xcf, 0x67, 0x22, 0x15, 0x1b, 0xa5, 0x1d, 0x07, 0x25, 0x5f, 0x91, 0x24, - 0x1d, 0x66, 0xb1, 0x85, 0x46, 0x73, 0x5f, 0x92, 0xe4, 0xfb, 0x02, 0x91, - 0x37, 0x1f, 0xac, 0x7e, 0xad, 0x7b, 0xcd, 0x50, 0x0b, 0x75, 0x5b, 0xd1, - 0x7c, 0x4c, 0x92, 0xb4, 0xf3, 0x21, 0x00, 0x3f, 0xae, 0x9b, 0xe8, 0x26, - 0xd3, 0x3a, 0x44, 0xdf, 0xef, 0x10, 0xc2, 0x6e, 0x73, 0x7d, 0xf7, 0xa5, - 0x40, 0x65, 0xe9, 0x06, 0xf3, 0xbb, 0xe4, 0xf7, 0xca, 0x9e, 0x31, 0x41, - 0x68, 0x37, 0x99, 0xc7, 0xab, 0x5b, 0xbf, 0xa5, 0x6d, 0x9f, 0x18, 0x11, - 0x17, 0x97, 0xee, 0x0b, 0x08, 0x16, 0xc4, 0x1b, 0xf7, 0x0b, 0xc6, 0xb7, - 0x8f, 0x0f, 0x55, 0xaf, 0x3c, 0xaa, 0x5c, 0xb1, 0xa6, 0xb0, 0x8e, 0xe9, - 0x9d, 0x5a, 0x87, 0xb3, 0xf7, 0x32, 0x6a, 0xb7, 0x44, 0x4d, 0xd1, 0x73, - 0xe6, 0x66, 0x24, 0x46, 0xb8, 0xc7, 0x3c, 0x3e, 0x1e, 0xf8, 0x6b, 0xf6, - 0x37, 0x30, 0x23, 0xc3, 0x2e, 0xe8, 0x5d, 0x72, 0x68, 0xbc, 0xbc, 0x4a, - 0x92, 0xf2, 0x2f, 0xfe, 0x64, 0x52, 0x67, 0xfb, 0x71, 0x90, 0x3e, 0x12, - 0x6a, 0xbd, 0xd2, 0xf6, 0x47, 0x30, 0x2a, 0x3d, 0xe9, 0xd4, 0xe8, 0x37, - 0x9f, 0xc6, 0x8a, 0x6b, 0xdf, 0x59, 0xd4, 0x3f, 0xd5, 0x6c, 0xe9, 0x38, - 0xc6, 0x09, 0x8c, 0xed, 0xfa, 0x8f, 0x11, 0xd4, 0x67, 0xea, 0x94, 0xbe, - 0x8e, 0x36, 0xab, 0x3f, 0x5a, 0x80, 0x37, 0x0c, 0xe5, 0x06, 0x52, 0x9c, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/wait_1_win.go b/icon/wait_1_win.go deleted file mode 100644 index 791bab47..00000000 --- a/icon/wait_1_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait1 []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x83, 0xd9, - 0xf8, 0xff, 0x7c, 0xd6, 0xf8, 0xff, 0xf3, 0xfb, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc6, 0xed, 0xfc, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x25, 0xbc, 0xf3, 0xff, 0xbb, 0xea, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x72, 0xd3, - 0xf7, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, - 0xf1, 0xff, 0x6e, 0xd2, 0xf7, 0xff, 0xf7, 0xfc, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xe5, 0xf7, 0xfd, 0xff, 0x3e, 0xc3, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3c, 0xc3, 0xf4, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xed, - 0xfc, 0xff, 0x21, 0xba, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x20, 0xba, - 0xf2, 0xff, 0xd1, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xa6, 0xe4, 0xfa, 0xff, 0x0e, 0xb4, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0xca, 0xef, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0xd3, 0xf1, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xeb, - 0xfb, 0xff, 0x0d, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x24, 0xbb, - 0xf3, 0xff, 0xe8, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x2f, 0xbf, 0xf3, 0xff, 0x6f, 0xd3, 0xf7, 0xff, 0x8c, 0xdc, - 0xf8, 0xff, 0x84, 0xd9, 0xf8, 0xff, 0x5b, 0xcc, 0xf6, 0xff, 0x16, 0xb7, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x42, 0xc5, 0xf4, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xff, 0xff, 0xff, 0x4b, 0xc7, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x29, 0xbd, 0xf3, 0xff, 0xb9, 0xe9, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xfc, - 0xfe, 0xff, 0x7e, 0xd7, 0xf8, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xad, 0xe6, 0xfa, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0xec, 0xf9, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, 0xff, 0xff, 0xdb, 0xf4, - 0xfd, 0xff, 0xe4, 0xf7, 0xfd, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xfb, 0xfe, - 0xff, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0xd9, 0xf3, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0xe6, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, - 0xff, 0xff, 0x83, 0xd9, 0xf8, 0xff, 0x1a, 0xb8, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x28, 0xbd, 0xf3, 0xff, 0x3f, 0xc4, - 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3a, 0xc2, - 0xf4, 0xff, 0x20, 0xba, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x43, 0xc5, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x93, 0xde, - 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0x53, 0xca, - 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x54, 0xca, 0xf5, 0xff, 0xf9, 0xfd, - 0xff, 0xff, 0xde, 0xf5, 0xfd, 0xff, 0x26, 0xbc, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0e, 0xb4, 0xf1, 0xff, 0xee, 0xfa, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x54, 0xca, 0xf5, 0xff, 0xf9, 0xfd, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, 0xfd, 0xff, 0x26, 0xbc, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x36, 0xc1, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4c, 0xc8, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x50, 0xc9, - 0xf5, 0xff, 0xf9, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf5, - 0xfd, 0xff, 0x22, 0xbb, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x42, 0xc5, - 0xf4, 0xff, 0x8c, 0xdc, 0xf8, 0xff, 0xab, 0xe5, 0xfa, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9d, 0xe1, 0xf9, 0xff, 0x8c, 0xdc, - 0xf8, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x79, 0xd6, - 0xf7, 0xff, 0xce, 0xf0, 0xfc, 0xff, 0xdd, 0xf5, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xf1, 0xfc, 0xff, 0xcc, 0xef, - 0xfc, 0xff, 0x40, 0xc4, 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x59, 0xcc, - 0xf6, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, - 0xff, 0xff, 0x4d, 0xc8, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x69, 0xd1, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0x0f, 0xb5, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x69, 0xd1, 0xf6, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfe, 0xff, 0xff, 0x5c, 0xcd, - 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd2, 0xf1, 0xfc, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x69, 0xd1, 0xf6, 0xff, 0xfd, 0xfe, - 0xff, 0xff, 0xfb, 0xfe, 0xff, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x50, 0xc9, 0xf5, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x7b, 0xd6, 0xf7, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x5a, 0xcc, - 0xf6, 0xff, 0x51, 0xc9, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1c, 0xb9, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x69, 0xd1, - 0xf6, 0xff, 0xf6, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0x14, 0xb6, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x54, 0xca, - 0xf5, 0xff, 0xf9, 0xfd, 0xff, 0xff, 0xd8, 0xf3, 0xfd, 0xff, 0xa6, 0xe4, - 0xfa, 0xff, 0xac, 0xe5, 0xfa, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xfb, 0xfe, 0xff, 0x3b, 0xc2, - 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0e, 0xb4, 0xf1, 0xff, 0xdf, 0xf5, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd5, 0xf2, 0xfd, 0xff, 0x35, 0xc1, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x11, 0xb5, - 0xf1, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0xab, 0xe5, 0xfa, 0xff, 0xcb, 0xef, - 0xfc, 0xff, 0xca, 0xef, 0xfc, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x5b, 0xcc, - 0xf6, 0xff, 0x0e, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xa0, 0xe2, 0xfa, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1e, 0xba, 0xf2, 0xff, 0x5f, 0xce, 0xf6, 0xff, 0xa2, 0xe2, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe1, 0xf6, 0xfd, 0xff, 0xb1, 0xe7, 0xfb, 0xff, 0x84, 0xd9, - 0xf8, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0x48, 0xc6, 0xf5, 0xff, 0x2e, 0xbe, - 0xf3, 0xff, 0x1f, 0xba, 0xf2, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x4a, 0xc7, 0xf5, 0xff, 0x64, 0xcf, - 0xf6, 0xff, 0x86, 0xda, 0xf8, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0xe2, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x29, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xbc, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xb8, 0xff, 0xff, - 0xff, 0x70, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x29, 0xff, 0xff, 0xff, 0x5b, 0xff, 0xff, - 0xff, 0x83, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x85, 0xff, 0xff, 0xff, 0x57, 0xff, 0xff, - 0xff, 0x27, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/wait_2_darwin.go b/icon/wait_2_darwin.go deleted file mode 100644 index 2e9145b2..00000000 --- a/icon/wait_2_darwin.go +++ /dev/null @@ -1,113 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait2 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x28, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, - 0x03, 0x03, 0x01, 0x05, 0x05, 0x02, 0x06, 0x05, 0x02, 0x06, 0x06, 0x02, - 0x07, 0x06, 0x02, 0x07, 0x07, 0x02, 0x08, 0x07, 0x02, 0x09, 0x08, 0x03, - 0x0b, 0x0a, 0x03, 0x0b, 0x0b, 0x04, 0x0d, 0x0c, 0x04, 0x0e, 0x0d, 0x04, - 0x17, 0x15, 0x07, 0x17, 0x16, 0x07, 0x18, 0x16, 0x07, 0x1a, 0x18, 0x08, - 0x1d, 0x1a, 0x09, 0x1e, 0x1b, 0x09, 0x1f, 0x1c, 0x0a, 0x27, 0x24, 0x0c, - 0x2a, 0x27, 0x0d, 0x2d, 0x2a, 0x0e, 0x2f, 0x2c, 0x0f, 0x30, 0x2d, 0x0f, - 0x32, 0x2f, 0x10, 0x34, 0x30, 0x10, 0x36, 0x32, 0x11, 0x3a, 0x36, 0x12, - 0x3f, 0x3a, 0x14, 0x43, 0x3e, 0x15, 0x44, 0x3f, 0x15, 0x46, 0x41, 0x16, - 0x4d, 0x47, 0x18, 0x4e, 0x48, 0x18, 0x50, 0x4a, 0x19, 0x54, 0x4e, 0x1a, - 0x59, 0x52, 0x1c, 0x5b, 0x54, 0x1c, 0x5d, 0x56, 0x1d, 0x5f, 0x58, 0x1e, - 0x60, 0x59, 0x1e, 0x61, 0x5a, 0x1e, 0x62, 0x5a, 0x1f, 0x65, 0x5d, 0x20, - 0x66, 0x5e, 0x20, 0x6a, 0x62, 0x21, 0x74, 0x6b, 0x24, 0x7b, 0x71, 0x26, - 0x7c, 0x72, 0x27, 0x7e, 0x74, 0x27, 0x7f, 0x76, 0x28, 0x81, 0x78, 0x29, - 0x86, 0x7c, 0x2a, 0x88, 0x7e, 0x2b, 0x89, 0x7f, 0x2b, 0x8f, 0x84, 0x2d, - 0x90, 0x85, 0x2d, 0x92, 0x87, 0x2e, 0x94, 0x89, 0x2e, 0x95, 0x8a, 0x2f, - 0x96, 0x8b, 0x2f, 0x9e, 0x92, 0x32, 0x9f, 0x93, 0x32, 0xa0, 0x94, 0x32, - 0xa4, 0x98, 0x33, 0xa7, 0x9a, 0x34, 0xa9, 0x9c, 0x35, 0xac, 0x9f, 0x36, - 0xb1, 0xa4, 0x37, 0xb4, 0xa6, 0x38, 0xb6, 0xa8, 0x39, 0xb9, 0xab, 0x3a, - 0xba, 0xac, 0x3a, 0xbc, 0xae, 0x3b, 0xc0, 0xb1, 0x3c, 0xc1, 0xb2, 0x3c, - 0xc2, 0xb3, 0x3d, 0xc3, 0xb4, 0x3d, 0xc6, 0xb7, 0x3e, 0xc8, 0xb9, 0x3f, - 0xca, 0xba, 0x3f, 0xcb, 0xbb, 0x40, 0xce, 0xbe, 0x40, 0xd0, 0xc0, 0x41, - 0xd1, 0xc1, 0x41, 0xd2, 0xc2, 0x42, 0xd3, 0xc4, 0x42, 0xd6, 0xc6, 0x43, - 0xdc, 0xcc, 0x45, 0xdf, 0xce, 0x46, 0xe0, 0xcf, 0x46, 0xe3, 0xd2, 0x47, - 0xe4, 0xd3, 0x48, 0xe5, 0xd4, 0x48, 0xe6, 0xd5, 0x48, 0xe8, 0xd7, 0x49, - 0xe9, 0xd8, 0x49, 0xea, 0xd9, 0x49, 0xeb, 0xd9, 0x4a, 0xec, 0xda, 0x4a, - 0xed, 0xdb, 0x4a, 0xee, 0xdc, 0x4b, 0xf3, 0xe1, 0x4c, 0xf6, 0xe4, 0x4d, - 0xf7, 0xe4, 0x4d, 0xf8, 0xe5, 0x4e, 0xf9, 0xe6, 0x4e, 0xfa, 0xe7, 0x4e, - 0xfb, 0xe8, 0x4f, 0xfc, 0xe9, 0x4f, 0xd2, 0x85, 0xae, 0xf5, 0x00, 0x00, - 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, 0x29, 0x33, 0x34, - 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, 0x73, 0x78, 0x80, - 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, 0xb8, 0xbb, 0xbc, - 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xda, 0xdb, 0xde, - 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, 0xef, 0xf0, 0xf1, - 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, 0x00, 0x00, 0x01, - 0xd0, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0xe9, 0x57, 0x8c, - 0x71, 0x18, 0xc6, 0xf1, 0x89, 0xec, 0x2a, 0xfb, 0x4e, 0xb6, 0x2c, 0xd9, - 0xf7, 0x3d, 0x84, 0xf9, 0x8e, 0x6c, 0x93, 0x75, 0x2a, 0x4b, 0x86, 0x88, - 0x29, 0xd9, 0x86, 0x22, 0x8a, 0xec, 0x31, 0x28, 0x64, 0xac, 0x63, 0xcb, - 0x36, 0x86, 0x64, 0xe6, 0xfa, 0xf7, 0xbc, 0x78, 0xcc, 0xfe, 0x3c, 0xbc, - 0xd1, 0xf5, 0xfa, 0x73, 0xce, 0xef, 0x77, 0x9f, 0x73, 0x5f, 0xb7, 0xcd, - 0xf6, 0xdf, 0x93, 0x91, 0x33, 0x72, 0x5c, 0xde, 0x8c, 0x05, 0x2b, 0xd6, - 0x60, 0x2f, 0x28, 0x58, 0x98, 0x9f, 0x97, 0x3b, 0x22, 0x3b, 0x23, 0x59, - 0xe4, 0x8c, 0x9e, 0x5e, 0x48, 0x5a, 0xd6, 0x4d, 0x1d, 0x95, 0x1d, 0x37, - 0x8b, 0x01, 0xf6, 0x56, 0x5d, 0xbc, 0xd9, 0xfa, 0xe6, 0x63, 0x48, 0x91, - 0x60, 0x30, 0xd0, 0x72, 0xeb, 0xc2, 0xf1, 0x32, 0x80, 0x45, 0x31, 0x04, - 0x67, 0x9a, 0x3f, 0x2b, 0x2d, 0x9f, 0xee, 0x9c, 0x82, 0x04, 0x24, 0x8b, - 0x74, 0x25, 0x6a, 0x70, 0xbb, 0xdd, 0xee, 0x46, 0xa9, 0xce, 0x17, 0xb6, - 0x46, 0x2d, 0xc5, 0x80, 0x47, 0x72, 0x51, 0xfe, 0xda, 0xfa, 0xb9, 0x5a, - 0x03, 0x1d, 0x82, 0x5d, 0x7e, 0x2b, 0xf4, 0xca, 0x69, 0xa0, 0xce, 0x1b, - 0x4e, 0x4a, 0x43, 0x16, 0xa8, 0x8a, 0x9d, 0xd7, 0x8b, 0x3d, 0x92, 0x74, - 0xcf, 0xc1, 0x25, 0x73, 0xf4, 0x7d, 0x33, 0x75, 0x7a, 0xe4, 0x93, 0x24, - 0x55, 0xb2, 0xdf, 0x1c, 0xb5, 0xc1, 0xb3, 0xe8, 0x54, 0x4d, 0x38, 0x3a, - 0x4c, 0xd1, 0x7d, 0x78, 0x1b, 0x45, 0x77, 0xe1, 0xab, 0x29, 0xf2, 0x43, - 0x6b, 0x14, 0x35, 0xe2, 0x8c, 0x98, 0xa2, 0x8e, 0xed, 0x9c, 0x96, 0x24, - 0x9d, 0x7d, 0x10, 0x39, 0x48, 0x65, 0xea, 0x9f, 0xec, 0xc6, 0x74, 0xe7, - 0xd9, 0xe8, 0x93, 0x24, 0x97, 0xf3, 0x04, 0x34, 0x1b, 0xc8, 0x1e, 0x43, - 0xab, 0x09, 0x48, 0xd2, 0x97, 0x12, 0x36, 0xd5, 0x7f, 0x93, 0x5c, 0xc0, - 0x91, 0xb0, 0x24, 0x3d, 0x66, 0x55, 0x0c, 0x4d, 0xa2, 0x5a, 0x92, 0xf4, - 0x72, 0x37, 0x54, 0x1b, 0xe8, 0xb6, 0x24, 0xfd, 0xd8, 0xc7, 0xd8, 0x18, - 0xea, 0xb7, 0xde, 0xf1, 0x50, 0x92, 0xd4, 0x5e, 0x53, 0xe4, 0x31, 0x90, - 0xb3, 0x4d, 0x52, 0x2d, 0x73, 0x7b, 0xc4, 0xf7, 0x77, 0x0c, 0x65, 0xc1, - 0x3f, 0xdb, 0xf8, 0x5c, 0xba, 0xe2, 0xf5, 0x7a, 0xcf, 0xbd, 0x90, 0x9e, - 0x14, 0x6d, 0x18, 0x98, 0x50, 0x84, 0x6e, 0xb3, 0x38, 0xda, 0x99, 0xba, - 0x4b, 0xef, 0xf7, 0x30, 0x3e, 0xa9, 0x2e, 0xfd, 0x97, 0x73, 0xf2, 0x57, - 0xb2, 0x09, 0x1e, 0x60, 0x5a, 0xf7, 0xe4, 0x52, 0x0d, 0x2a, 0xa4, 0xe6, - 0x67, 0xa2, 0x09, 0x1d, 0x66, 0x5e, 0xaf, 0xd4, 0x72, 0x0e, 0x5e, 0x4b, - 0xc5, 0x87, 0xb8, 0x69, 0x2f, 0x67, 0x49, 0x56, 0x7a, 0x85, 0x07, 0x2c, - 0xa5, 0xe4, 0x69, 0xd4, 0xf8, 0x4b, 0x99, 0x9f, 0x65, 0x56, 0xf4, 0x3e, - 0xf9, 0x6c, 0xb9, 0x1a, 0x96, 0xa4, 0xc8, 0xb5, 0x6d, 0xcc, 0xec, 0x6d, - 0x7e, 0x0e, 0x32, 0x27, 0x40, 0x45, 0x40, 0x7a, 0x77, 0x0c, 0x26, 0x66, - 0x5a, 0x5e, 0x8d, 0x61, 0xcb, 0xd8, 0x5a, 0x7f, 0x79, 0x07, 0x2b, 0x87, - 0xff, 0xed, 0xb6, 0xf4, 0x9c, 0x6c, 0x07, 0xa6, 0xf4, 0xfd, 0xc7, 0x09, - 0x1a, 0x32, 0x67, 0xf6, 0x50, 0x5b, 0x97, 0xe5, 0x37, 0x5a, 0xed, 0x8a, - 0x3e, 0x1c, 0x6b, 0x7c, 0x77, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, - 0x44, 0xae, 0x42, 0x60, 0x82, -} - diff --git a/icon/wait_2_unix.go b/icon/wait_2_unix.go deleted file mode 100644 index a552eb17..00000000 --- a/icon/wait_2_unix.go +++ /dev/null @@ -1,113 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait2 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x25, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf1, 0xb3, 0x09, 0xf1, 0xb3, 0x0a, 0xf1, 0xb4, 0x0b, - 0xf1, 0xb4, 0x0c, 0xf1, 0xb4, 0x0d, 0xf1, 0xb4, 0x0e, 0xf1, 0xb5, 0x0f, - 0xf1, 0xb6, 0x12, 0xf2, 0xb7, 0x17, 0xf2, 0xb8, 0x18, 0xf2, 0xb8, 0x19, - 0xf2, 0xb8, 0x1a, 0xf2, 0xb9, 0x1b, 0xf2, 0xb9, 0x1c, 0xf2, 0xba, 0x1e, - 0xf2, 0xba, 0x1f, 0xf2, 0xba, 0x20, 0xf2, 0xba, 0x21, 0xf3, 0xbb, 0x24, - 0xf3, 0xbc, 0x25, 0xf3, 0xbd, 0x28, 0xf3, 0xbe, 0x2e, 0xf3, 0xbf, 0x31, - 0xf3, 0xc0, 0x32, 0xf3, 0xc0, 0x33, 0xf3, 0xc0, 0x34, 0xf4, 0xc1, 0x36, - 0xf4, 0xc2, 0x39, 0xf4, 0xc2, 0x3a, 0xf4, 0xc3, 0x3c, 0xf4, 0xc3, 0x3e, - 0xf4, 0xc4, 0x41, 0xf4, 0xc5, 0x42, 0xf4, 0xc5, 0x43, 0xf4, 0xc5, 0x44, - 0xf5, 0xc6, 0x48, 0xf5, 0xc7, 0x4a, 0xf5, 0xc7, 0x4b, 0xf5, 0xc8, 0x4d, - 0xf5, 0xc9, 0x4f, 0xf5, 0xca, 0x52, 0xf5, 0xcb, 0x57, 0xf6, 0xcc, 0x5a, - 0xf6, 0xcd, 0x5c, 0xf6, 0xce, 0x5f, 0xf6, 0xcf, 0x63, 0xf6, 0xcf, 0x64, - 0xf6, 0xcf, 0x65, 0xf7, 0xd2, 0x6c, 0xf7, 0xd2, 0x6d, 0xf7, 0xd2, 0x6e, - 0xf7, 0xd3, 0x70, 0xf7, 0xd3, 0x72, 0xf7, 0xd4, 0x73, 0xf7, 0xd6, 0x79, - 0xf7, 0xd6, 0x7a, 0xf8, 0xd6, 0x7c, 0xf8, 0xd8, 0x81, 0xf8, 0xd9, 0x83, - 0xf8, 0xd9, 0x84, 0xf8, 0xda, 0x86, 0xf8, 0xda, 0x87, 0xf9, 0xdc, 0x8e, - 0xf9, 0xdf, 0x98, 0xf9, 0xe0, 0x9c, 0xf9, 0xe1, 0x9d, 0xfa, 0xe1, 0x9f, - 0xfa, 0xe2, 0xa0, 0xfa, 0xe2, 0xa1, 0xfa, 0xe2, 0xa2, 0xfa, 0xe3, 0xa4, - 0xfa, 0xe4, 0xa6, 0xfa, 0xe4, 0xa8, 0xfa, 0xe6, 0xad, 0xfb, 0xe7, 0xb1, - 0xfb, 0xe7, 0xb3, 0xfb, 0xe8, 0xb4, 0xfb, 0xea, 0xbb, 0xfb, 0xea, 0xbc, - 0xfb, 0xeb, 0xbd, 0xfb, 0xec, 0xc1, 0xfc, 0xed, 0xc6, 0xfc, 0xef, 0xca, - 0xfc, 0xef, 0xcc, 0xfc, 0xf0, 0xce, 0xfc, 0xf0, 0xd0, 0xfc, 0xf1, 0xd1, - 0xfc, 0xf1, 0xd3, 0xfd, 0xf2, 0xd6, 0xfd, 0xf3, 0xd9, 0xfd, 0xf6, 0xe1, - 0xfd, 0xf6, 0xe2, 0xfd, 0xf6, 0xe3, 0xfd, 0xf7, 0xe5, 0xfd, 0xf8, 0xe8, - 0xfe, 0xf7, 0xe6, 0xfe, 0xf8, 0xe8, 0xfe, 0xf8, 0xe9, 0xfe, 0xfb, 0xf1, - 0xfe, 0xfb, 0xf2, 0xfe, 0xfb, 0xf3, 0xfe, 0xfc, 0xf4, 0xfe, 0xfc, 0xf7, - 0xfe, 0xfd, 0xf8, 0xff, 0xfc, 0xf6, 0xff, 0xfd, 0xf7, 0xff, 0xfd, 0xf9, - 0xff, 0xfe, 0xfa, 0xff, 0xfe, 0xfc, 0xff, 0xfe, 0xfd, 0xff, 0xff, 0xfe, - 0xff, 0xff, 0xff, 0x1c, 0x0a, 0x3b, 0x32, 0x00, 0x00, 0x00, 0x47, 0x74, - 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, - 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, 0x29, 0x33, 0x34, 0x36, 0x3a, 0x3f, - 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, 0x73, 0x78, 0x80, 0x83, 0x85, 0x86, - 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, 0xb8, 0xbb, 0xbc, 0xc0, 0xc1, 0xc3, - 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, 0xda, 0xdb, 0xde, 0xdf, 0xe1, 0xe2, - 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, - 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, 0x00, 0x00, 0x01, 0xcf, 0x49, 0x44, - 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, 0xe7, 0x77, 0x8b, 0x71, 0x18, 0xc6, - 0xf1, 0x94, 0xda, 0xda, 0xda, 0x7b, 0x53, 0xa3, 0xf6, 0xde, 0x45, 0x91, - 0x2b, 0x51, 0x15, 0xb1, 0x6a, 0xc5, 0x8c, 0xa2, 0x45, 0xa8, 0x3d, 0x8a, - 0xd2, 0x12, 0xab, 0xda, 0x50, 0x4a, 0xd4, 0x68, 0x11, 0xb3, 0x7d, 0xa8, - 0x7c, 0xff, 0x3e, 0x2f, 0x1e, 0xd9, 0xcf, 0xc3, 0x1b, 0xbd, 0x5e, 0x7f, - 0xce, 0xf9, 0xfd, 0xee, 0x73, 0xee, 0xeb, 0x76, 0x38, 0xfe, 0x7b, 0xb2, - 0xf2, 0x86, 0x8f, 0xc9, 0x9f, 0x3e, 0x7f, 0xf9, 0x6a, 0x9c, 0x85, 0x85, - 0x0b, 0x0a, 0xf2, 0xc7, 0x0e, 0xcb, 0xcd, 0x4a, 0x15, 0x79, 0x23, 0xa7, - 0x15, 0x91, 0x91, 0xb5, 0x53, 0x46, 0xe4, 0x26, 0xcc, 0x22, 0x80, 0x77, - 0x0d, 0xb7, 0x2e, 0x94, 0xef, 0xdd, 0xe1, 0x91, 0xcb, 0xeb, 0xf5, 0x55, - 0x9c, 0xbf, 0xfd, 0xa4, 0x05, 0x60, 0x61, 0x1c, 0xc1, 0xfd, 0xca, 0x6d, - 0xca, 0xc8, 0xf6, 0xb3, 0x0f, 0x21, 0x09, 0xc9, 0x26, 0x9d, 0x89, 0xae, - 0x87, 0xc3, 0xe1, 0x70, 0x95, 0x54, 0x13, 0x70, 0xdb, 0xa3, 0x8a, 0x76, - 0x20, 0x24, 0x45, 0x68, 0xde, 0x67, 0xff, 0x5c, 0xad, 0x89, 0x5e, 0xc2, - 0x67, 0xbf, 0x1d, 0xda, 0x6f, 0x98, 0xa8, 0xf8, 0xa2, 0x41, 0xab, 0xc7, - 0x06, 0x35, 0xf0, 0xe5, 0x52, 0x7b, 0x48, 0x92, 0x4e, 0x47, 0xb9, 0x69, - 0x8d, 0x3c, 0x3f, 0xa8, 0xd1, 0xf1, 0x80, 0x24, 0xa9, 0x91, 0x37, 0xd6, - 0xa8, 0x0c, 0x0e, 0xc7, 0xa6, 0xba, 0x42, 0xb4, 0xc4, 0x12, 0x9d, 0x82, - 0x3d, 0x31, 0x74, 0x06, 0xb6, 0x58, 0x22, 0x3f, 0x94, 0xc7, 0x50, 0x15, - 0x86, 0xcb, 0x12, 0x95, 0x7c, 0xe3, 0x81, 0x24, 0xe9, 0xde, 0x49, 0xd7, - 0x2b, 0x1a, 0xd3, 0xff, 0xe4, 0x34, 0xa7, 0xbb, 0xc3, 0xaf, 0x80, 0x24, - 0x45, 0x8c, 0xc7, 0x50, 0x69, 0x22, 0x67, 0x1c, 0xad, 0xc2, 0x27, 0x49, - 0x5b, 0x3f, 0xf2, 0xb3, 0x7a, 0xb3, 0x14, 0x01, 0x9e, 0xbb, 0x25, 0xe9, - 0x18, 0x2b, 0xe3, 0x68, 0x22, 0xf5, 0x92, 0xa4, 0x03, 0x9f, 0xa0, 0xde, - 0x44, 0xe7, 0x24, 0x69, 0xd3, 0x5b, 0x46, 0xc7, 0x51, 0x9f, 0x75, 0xd1, - 0x13, 0x92, 0xa4, 0xd2, 0xba, 0x8e, 0x90, 0x89, 0x8c, 0x32, 0x49, 0xb5, - 0xcc, 0xe9, 0x96, 0xd8, 0xdf, 0x51, 0xb4, 0x78, 0xff, 0x6c, 0xe3, 0x21, - 0xe9, 0x5a, 0x30, 0x18, 0xbc, 0x7b, 0x50, 0x3a, 0xda, 0xb1, 0xbe, 0x7f, - 0x52, 0x11, 0xba, 0xcc, 0xe4, 0x59, 0x71, 0xfa, 0x2e, 0xed, 0xfa, 0xc0, - 0xb8, 0x94, 0xba, 0xf4, 0x5d, 0xc6, 0xa3, 0x0d, 0xa9, 0xc6, 0xfb, 0x9a, - 0xa9, 0x5d, 0x53, 0x4b, 0x35, 0xa0, 0x88, 0xba, 0x8d, 0xc9, 0xc6, 0xf3, - 0x82, 0xb9, 0x3d, 0xd2, 0xcb, 0x39, 0x70, 0x0d, 0x4d, 0x3b, 0x13, 0xa6, - 0xb4, 0x99, 0xc5, 0x39, 0x99, 0x15, 0xee, 0xb7, 0x84, 0xf7, 0x47, 0x62, - 0xc6, 0xdf, 0xca, 0xbc, 0x1c, 0xab, 0xa2, 0xf7, 0x2a, 0xa0, 0xed, 0xaa, - 0x5b, 0x92, 0x5c, 0x97, 0xbf, 0x33, 0xa3, 0xa7, 0xf5, 0x39, 0xc8, 0x1e, - 0x0f, 0x4d, 0x3e, 0x69, 0xf7, 0x53, 0x98, 0x90, 0x6d, 0x7b, 0x35, 0x86, - 0x2c, 0xa5, 0xad, 0xfa, 0xc6, 0x57, 0x56, 0x0c, 0xfd, 0xdb, 0x6d, 0xe9, - 0x3e, 0xc9, 0x09, 0x4c, 0xee, 0xfd, 0x8f, 0x13, 0x34, 0x68, 0xf6, 0xac, - 0xc1, 0x8e, 0x4e, 0xcb, 0x6f, 0x32, 0x5f, 0x31, 0x81, 0xae, 0x65, 0x50, - 0x27, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82, -} - diff --git a/icon/wait_2_win.go b/icon/wait_2_win.go deleted file mode 100644 index 68b64f6e..00000000 --- a/icon/wait_2_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait2 []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x83, 0xd9, - 0xf8, 0xff, 0x7c, 0xd6, 0xf8, 0xff, 0xf3, 0xfb, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc6, 0xed, 0xfc, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x25, 0xbc, 0xf3, 0xff, 0xbb, 0xea, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x72, 0xd3, - 0xf7, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, - 0xf1, 0xff, 0x6e, 0xd2, 0xf7, 0xff, 0xf7, 0xfc, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xe5, 0xf7, 0xfd, 0xff, 0x3e, 0xc3, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3c, 0xc3, 0xf4, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xed, - 0xfc, 0xff, 0x21, 0xba, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x20, 0xba, - 0xf2, 0xff, 0xd1, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xa6, 0xe4, 0xfa, 0xff, 0x0e, 0xb4, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0xca, 0xef, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0xd3, 0xf1, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xeb, - 0xfb, 0xff, 0x0d, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x24, 0xbb, - 0xf3, 0xff, 0xe8, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1e, 0xba, 0xf2, 0xff, 0x39, 0xc2, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x73, 0xd4, 0xf7, 0xff, 0x9d, 0xe1, - 0xf9, 0xff, 0x9d, 0xe1, 0xf9, 0xff, 0x9d, 0xe1, 0xf9, 0xff, 0x9c, 0xe0, - 0xf9, 0xff, 0x36, 0xc1, 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x42, 0xc5, 0xf4, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xff, 0xff, 0xff, 0x4b, 0xc7, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x20, 0xba, 0xf2, 0xff, 0xa6, 0xe4, - 0xfa, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xb3, 0xe7, 0xfb, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xe8, 0xf8, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xfd, - 0xff, 0xff, 0x41, 0xc4, 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xad, 0xe6, 0xfa, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x34, 0xc0, 0xf3, 0xff, 0xe9, 0xf8, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xad, 0xe6, 0xfa, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xe8, 0xf8, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x63, 0xcf, - 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0xd9, 0xf3, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x1b, 0xb9, - 0xf2, 0xff, 0xe6, 0xf7, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xfe, - 0xff, 0xff, 0x83, 0xd9, 0xf8, 0xff, 0x18, 0xb8, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xe8, 0xf8, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xec, - 0xfb, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x43, 0xc5, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x98, 0xdf, - 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0x52, 0xca, - 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xe8, 0xf8, 0xfe, 0xff, 0xf7, 0xfd, - 0xff, 0xff, 0xa8, 0xe4, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0f, 0xb5, 0xf1, 0xff, 0xf4, 0xfc, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa1, 0xe2, 0xfa, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x9f, 0xe1, 0xfa, 0xff, 0x4d, 0xc8, - 0xf5, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0xd0, 0xf0, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xbc, 0xea, 0xfb, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3c, 0xc3, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x48, 0xc6, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x79, 0xd6, 0xf7, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf7, 0xfd, 0xff, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x4f, 0xc9, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x28, 0xbd, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x5a, 0xcc, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0xb8, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x41, 0xc4, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0xc2, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x70, 0xd3, 0xf7, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x0f, 0xb5, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0xf9, 0xfd, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xda, 0xf8, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x44, 0xc5, 0xf4, 0xff, 0x52, 0xca, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xbc, 0xea, 0xfb, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd6, 0xf2, 0xfd, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xb1, 0xe7, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xfb, 0xfe, 0xff, 0x6d, 0xd2, - 0xf7, 0xff, 0xf6, 0xfc, 0xff, 0xff, 0xb3, 0xe7, 0xfb, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x57, 0xcb, 0xf5, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x81, 0xd8, 0xf8, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x33, 0xc0, - 0xf3, 0xff, 0xf7, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0xe7, 0xfb, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0d, 0xb4, 0xf1, 0xff, 0x6c, 0xd2, - 0xf7, 0xff, 0xf7, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0xe7, 0xfb, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xcc, 0xef, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xfb, 0xfe, 0xff, 0x3c, 0xc3, - 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x4a, 0xc7, - 0xf5, 0xff, 0xf6, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0xe7, 0xfb, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xe8, 0xf8, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd1, 0xf1, 0xfc, 0xff, 0x32, 0xc0, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x7a, 0xd6, - 0xf7, 0xff, 0xce, 0xf0, 0xfc, 0xff, 0xce, 0xf0, 0xfc, 0xff, 0xce, 0xf0, - 0xfc, 0xff, 0xce, 0xf0, 0xfc, 0xff, 0x79, 0xd6, 0xf7, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x87, 0xda, 0xf8, 0xff, 0x52, 0xca, - 0xf5, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xa0, 0xe2, 0xfa, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1e, 0xba, 0xf2, 0xff, 0x5f, 0xce, 0xf6, 0xff, 0xa2, 0xe2, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe1, 0xf6, 0xfd, 0xff, 0xb1, 0xe7, 0xfb, 0xff, 0x84, 0xd9, - 0xf8, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0x48, 0xc6, 0xf5, 0xff, 0x2e, 0xbe, - 0xf3, 0xff, 0x1f, 0xba, 0xf2, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x4a, 0xc7, 0xf5, 0xff, 0x64, 0xcf, - 0xf6, 0xff, 0x86, 0xda, 0xf8, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0xe2, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x29, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xbc, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xb8, 0xff, 0xff, - 0xff, 0x70, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x29, 0xff, 0xff, 0xff, 0x5b, 0xff, 0xff, - 0xff, 0x83, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x85, 0xff, 0xff, 0xff, 0x57, 0xff, 0xff, - 0xff, 0x27, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - diff --git a/icon/wait_3_darwin.go b/icon/wait_3_darwin.go deleted file mode 100644 index a3832351..00000000 --- a/icon/wait_3_darwin.go +++ /dev/null @@ -1,116 +0,0 @@ -//+build darwin - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait3 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x37, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x01, - 0x03, 0x03, 0x01, 0x05, 0x05, 0x02, 0x06, 0x05, 0x02, 0x06, 0x06, 0x02, - 0x07, 0x06, 0x02, 0x07, 0x07, 0x02, 0x0a, 0x09, 0x03, 0x0b, 0x0b, 0x04, - 0x0c, 0x0b, 0x04, 0x0d, 0x0c, 0x04, 0x0e, 0x0d, 0x04, 0x0f, 0x0e, 0x05, - 0x15, 0x13, 0x07, 0x16, 0x14, 0x07, 0x17, 0x16, 0x07, 0x1a, 0x18, 0x08, - 0x1b, 0x19, 0x08, 0x1d, 0x1a, 0x09, 0x1e, 0x1b, 0x09, 0x1f, 0x1c, 0x0a, - 0x27, 0x24, 0x0c, 0x2a, 0x27, 0x0d, 0x2b, 0x28, 0x0e, 0x2c, 0x29, 0x0e, - 0x2d, 0x2a, 0x0e, 0x2f, 0x2c, 0x0f, 0x36, 0x32, 0x11, 0x37, 0x33, 0x11, - 0x38, 0x34, 0x12, 0x3a, 0x36, 0x12, 0x41, 0x3c, 0x14, 0x43, 0x3e, 0x15, - 0x46, 0x41, 0x16, 0x4d, 0x47, 0x18, 0x4f, 0x49, 0x19, 0x50, 0x4a, 0x19, - 0x54, 0x4e, 0x1a, 0x56, 0x4f, 0x1b, 0x5b, 0x54, 0x1c, 0x5d, 0x56, 0x1d, - 0x5f, 0x58, 0x1e, 0x61, 0x5a, 0x1e, 0x64, 0x5c, 0x1f, 0x6b, 0x63, 0x21, - 0x6c, 0x64, 0x22, 0x6f, 0x66, 0x23, 0x74, 0x6b, 0x24, 0x79, 0x6f, 0x26, - 0x7b, 0x71, 0x26, 0x7c, 0x72, 0x27, 0x7e, 0x74, 0x27, 0x7e, 0x75, 0x28, - 0x7f, 0x76, 0x28, 0x80, 0x77, 0x28, 0x86, 0x7c, 0x2a, 0x87, 0x7d, 0x2a, - 0x90, 0x85, 0x2d, 0x92, 0x87, 0x2e, 0x94, 0x89, 0x2e, 0x9a, 0x8f, 0x30, - 0x9d, 0x91, 0x31, 0x9e, 0x92, 0x32, 0x9f, 0x93, 0x32, 0xa0, 0x94, 0x32, - 0xa4, 0x98, 0x33, 0xa7, 0x9a, 0x34, 0xa8, 0x9b, 0x35, 0xb2, 0xa4, 0x38, - 0xb7, 0xa9, 0x39, 0xb9, 0xab, 0x3a, 0xba, 0xac, 0x3a, 0xbb, 0xad, 0x3b, - 0xbc, 0xae, 0x3b, 0xbd, 0xaf, 0x3b, 0xc0, 0xb1, 0x3c, 0xc1, 0xb2, 0x3c, - 0xc2, 0xb3, 0x3d, 0xc3, 0xb4, 0x3d, 0xc4, 0xb5, 0x3d, 0xc6, 0xb7, 0x3e, - 0xc7, 0xb8, 0x3e, 0xc8, 0xb9, 0x3f, 0xcb, 0xbb, 0x40, 0xd1, 0xc1, 0x41, - 0xd2, 0xc2, 0x42, 0xd3, 0xc4, 0x42, 0xd4, 0xc4, 0x43, 0xd6, 0xc6, 0x43, - 0xda, 0xca, 0x44, 0xdb, 0xcb, 0x45, 0xdf, 0xce, 0x46, 0xe0, 0xcf, 0x46, - 0xe1, 0xd0, 0x47, 0xe3, 0xd2, 0x47, 0xe4, 0xd3, 0x48, 0xe5, 0xd4, 0x48, - 0xe6, 0xd5, 0x48, 0xe8, 0xd7, 0x49, 0xea, 0xd9, 0x49, 0xeb, 0xd9, 0x4a, - 0xed, 0xdb, 0x4a, 0xef, 0xdd, 0x4b, 0xf0, 0xde, 0x4b, 0xf1, 0xdf, 0x4c, - 0xf2, 0xe0, 0x4c, 0xf3, 0xe1, 0x4c, 0xf4, 0xe2, 0x4d, 0xf5, 0xe3, 0x4d, - 0xf6, 0xe4, 0x4d, 0xf7, 0xe4, 0x4d, 0xf8, 0xe5, 0x4e, 0xf9, 0xe6, 0x4e, - 0xfa, 0xe7, 0x4e, 0xfb, 0xe8, 0x4f, 0xfc, 0xe9, 0x4f, 0x1d, 0x3c, 0x4a, - 0x1b, 0x00, 0x00, 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, - 0x29, 0x33, 0x34, 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, - 0x73, 0x78, 0x80, 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, - 0xb8, 0xbb, 0xbc, 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, - 0xda, 0xdb, 0xde, 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, - 0xef, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, - 0x00, 0x00, 0x01, 0xe2, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, - 0xe9, 0x57, 0x8c, 0x71, 0x18, 0xc6, 0xf1, 0x89, 0xec, 0x2a, 0xfb, 0xbe, - 0x93, 0x25, 0xfb, 0xbe, 0x47, 0x61, 0xbe, 0xa6, 0xb1, 0x8b, 0x18, 0x63, - 0x29, 0x2a, 0xb2, 0xef, 0x0c, 0x49, 0x94, 0xac, 0x49, 0xf6, 0x65, 0x8c, - 0x64, 0x89, 0x9a, 0x06, 0x21, 0x35, 0xd7, 0x1f, 0xe7, 0xc5, 0x33, 0x6b, - 0xf3, 0xcc, 0xf4, 0x86, 0xfb, 0xd5, 0x73, 0xce, 0xf3, 0x39, 0xbf, 0xe5, - 0xfc, 0xee, 0xeb, 0xb6, 0x58, 0xfe, 0x79, 0x25, 0xa5, 0x0d, 0x1f, 0x93, - 0x3e, 0x7d, 0xfe, 0xf2, 0xd5, 0x58, 0x33, 0x33, 0x17, 0x64, 0xa4, 0x8f, - 0x1d, 0x96, 0x9a, 0x14, 0x2d, 0xd2, 0x46, 0x4e, 0xcb, 0x26, 0xa6, 0xd6, - 0x4c, 0x19, 0x91, 0x1a, 0x36, 0x8b, 0x00, 0xf6, 0x1e, 0xbf, 0x5a, 0x55, - 0x5b, 0xf7, 0xa5, 0x59, 0x7e, 0xaf, 0xd7, 0x53, 0x73, 0xfb, 0xca, 0x51, - 0x27, 0xc0, 0xc2, 0x10, 0x82, 0xb3, 0xf7, 0x1a, 0x15, 0x53, 0x5f, 0xef, - 0x9e, 0x81, 0x08, 0x14, 0xf9, 0xaf, 0x25, 0xe2, 0x3b, 0x1e, 0x7a, 0xb1, - 0xed, 0x49, 0xe7, 0xa8, 0x9a, 0x2d, 0xb5, 0x89, 0xd1, 0x8f, 0x5b, 0x27, - 0xf7, 0x43, 0x78, 0x2d, 0x33, 0xf4, 0xc0, 0x61, 0x5c, 0xbe, 0x30, 0x01, - 0xba, 0x93, 0x03, 0xf9, 0x87, 0x21, 0xcf, 0x1d, 0x1f, 0xbd, 0xdd, 0x80, - 0xe3, 0x91, 0xaa, 0xc9, 0x73, 0x4b, 0x15, 0xdf, 0xe2, 0xa0, 0x63, 0x6c, - 0x7f, 0x27, 0xbd, 0x71, 0xba, 0xa5, 0x52, 0xca, 0xcd, 0x91, 0xcf, 0xce, - 0xe5, 0xe0, 0x36, 0x25, 0x14, 0x98, 0xa3, 0x57, 0xf0, 0x32, 0x88, 0x6e, - 0x62, 0xfb, 0x69, 0x8a, 0x1e, 0x43, 0x7d, 0x10, 0xdd, 0x87, 0x46, 0x53, - 0x54, 0x07, 0x35, 0x41, 0x54, 0x8e, 0xfd, 0xb7, 0x29, 0xf2, 0x3b, 0xb8, - 0x20, 0xa9, 0x5e, 0x52, 0x7b, 0x3e, 0x45, 0x1d, 0xcf, 0x64, 0x35, 0x6e, - 0x57, 0xb6, 0xd3, 0x2d, 0xb9, 0x6c, 0x3e, 0xa9, 0x14, 0x2a, 0x0d, 0x64, - 0x0d, 0xa1, 0x55, 0x78, 0x24, 0xe9, 0xfb, 0x7b, 0xc9, 0x05, 0x4d, 0x9f, - 0xce, 0x41, 0x51, 0x9b, 0x24, 0x3d, 0x65, 0x65, 0x08, 0x4d, 0xe4, 0x44, - 0xe0, 0x2c, 0x2e, 0xc0, 0x69, 0x83, 0x03, 0x0d, 0x92, 0xd4, 0xb2, 0x8f, - 0xd1, 0x21, 0xd4, 0x67, 0xed, 0xfa, 0x87, 0x92, 0xa4, 0xd6, 0x1d, 0x00, - 0xd8, 0xcf, 0xfb, 0x24, 0x49, 0x97, 0x98, 0xd3, 0x2d, 0xdc, 0xbf, 0xa3, - 0x70, 0x7a, 0x25, 0x49, 0xcf, 0x73, 0xe1, 0x62, 0x55, 0xa0, 0x4b, 0x9f, - 0xe5, 0xac, 0xeb, 0x1f, 0x11, 0x84, 0x2e, 0x33, 0x39, 0xf2, 0xc7, 0x68, - 0xb9, 0x5c, 0x9a, 0x02, 0x5b, 0x7f, 0xdc, 0xc5, 0xb8, 0xa8, 0xb8, 0xf4, - 0x5d, 0xc6, 0xe9, 0x36, 0x63, 0xad, 0xc2, 0x5f, 0x86, 0xf1, 0x16, 0x30, - 0xb5, 0x6b, 0x74, 0xa8, 0x06, 0x64, 0x73, 0xaa, 0x35, 0xb2, 0xd3, 0x9b, - 0x0f, 0x31, 0xb7, 0x47, 0xc7, 0x70, 0x0e, 0xcc, 0xa2, 0xf8, 0x73, 0xd8, - 0x34, 0x1c, 0x64, 0x71, 0x4a, 0x6c, 0x84, 0xfb, 0x2d, 0x61, 0x77, 0xe8, - 0x81, 0x5f, 0xef, 0x61, 0x5e, 0x8a, 0x59, 0xd0, 0x7b, 0x65, 0xb0, 0xf1, - 0x46, 0xbb, 0x24, 0xf9, 0x2b, 0x36, 0x33, 0xa3, 0xa7, 0xf9, 0x38, 0x48, - 0x1e, 0x0f, 0xc5, 0x1e, 0xe9, 0x43, 0x09, 0x4c, 0x48, 0x8e, 0x3b, 0x35, - 0x86, 0x2c, 0x65, 0xd3, 0xb5, 0xeb, 0x5b, 0x59, 0x31, 0x34, 0xd1, 0x6c, - 0xe9, 0x3e, 0xc9, 0x0a, 0x4c, 0xee, 0xdd, 0xc9, 0x08, 0x1a, 0x34, 0x7b, - 0xd6, 0x60, 0xcb, 0x7f, 0xab, 0xbf, 0x88, 0xc3, 0x91, 0x41, 0xc9, 0xc9, - 0x63, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, - 0x60, 0x82, -} - diff --git a/icon/wait_3_unix.go b/icon/wait_3_unix.go deleted file mode 100644 index c33886f6..00000000 --- a/icon/wait_3_unix.go +++ /dev/null @@ -1,115 +0,0 @@ -//+build linux - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait3 []byte = []byte { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, - 0x08, 0x03, 0x00, 0x00, 0x00, 0xd6, 0xde, 0x68, 0xaa, 0x00, 0x00, 0x00, - 0x03, 0x73, 0x42, 0x49, 0x54, 0x08, 0x08, 0x08, 0xdb, 0xe1, 0x4f, 0xe0, - 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, - 0x00, 0x00, 0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, - 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, - 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, - 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, - 0x02, 0x2b, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf1, 0xb3, 0x09, 0xf1, 0xb3, 0x0a, 0xf1, 0xb4, 0x0b, - 0xf1, 0xb4, 0x0c, 0xf1, 0xb4, 0x0d, 0xf1, 0xb4, 0x0e, 0xf1, 0xb5, 0x0f, - 0xf1, 0xb5, 0x10, 0xf1, 0xb5, 0x11, 0xf1, 0xb6, 0x12, 0xf2, 0xb6, 0x13, - 0xf2, 0xb6, 0x14, 0xf2, 0xb7, 0x15, 0xf2, 0xb7, 0x16, 0xf2, 0xb7, 0x17, - 0xf2, 0xb8, 0x19, 0xf2, 0xb8, 0x1a, 0xf2, 0xb9, 0x1c, 0xf2, 0xba, 0x1e, - 0xf2, 0xba, 0x1f, 0xf2, 0xba, 0x20, 0xf2, 0xba, 0x21, 0xf2, 0xbb, 0x23, - 0xf3, 0xbb, 0x24, 0xf3, 0xbc, 0x25, 0xf3, 0xbd, 0x29, 0xf3, 0xbd, 0x2a, - 0xf3, 0xbe, 0x2e, 0xf3, 0xbf, 0x30, 0xf3, 0xbf, 0x31, 0xf3, 0xc0, 0x32, - 0xf3, 0xc0, 0x33, 0xf4, 0xc2, 0x39, 0xf4, 0xc3, 0x3c, 0xf4, 0xc3, 0x3d, - 0xf4, 0xc3, 0x3e, 0xf4, 0xc4, 0x40, 0xf4, 0xc4, 0x41, 0xf4, 0xc5, 0x42, - 0xf4, 0xc5, 0x43, 0xf4, 0xc5, 0x44, 0xf5, 0xc6, 0x47, 0xf5, 0xc6, 0x48, - 0xf5, 0xc7, 0x49, 0xf5, 0xc7, 0x4a, 0xf5, 0xc7, 0x4b, 0xf5, 0xc8, 0x4d, - 0xf5, 0xc9, 0x51, 0xf6, 0xcc, 0x5b, 0xf6, 0xcd, 0x5c, 0xf6, 0xce, 0x5f, - 0xf6, 0xcf, 0x63, 0xf6, 0xcf, 0x64, 0xf6, 0xcf, 0x65, 0xf6, 0xd0, 0x66, - 0xf6, 0xd1, 0x69, 0xf7, 0xd2, 0x6e, 0xf7, 0xd3, 0x70, 0xf7, 0xd3, 0x72, - 0xf7, 0xd6, 0x7b, 0xf8, 0xd6, 0x7c, 0xf8, 0xd8, 0x82, 0xf8, 0xd9, 0x83, - 0xf8, 0xd9, 0x84, 0xf8, 0xda, 0x86, 0xf8, 0xda, 0x87, 0xf8, 0xdb, 0x89, - 0xf9, 0xdc, 0x8e, 0xf9, 0xde, 0x93, 0xf9, 0xdf, 0x96, 0xf9, 0xdf, 0x97, - 0xf9, 0xe1, 0x9e, 0xfa, 0xe2, 0xa0, 0xfa, 0xe2, 0xa2, 0xfa, 0xe3, 0xa4, - 0xfa, 0xe4, 0xa6, 0xfa, 0xe5, 0xab, 0xfa, 0xe6, 0xad, 0xfb, 0xe7, 0xb1, - 0xfb, 0xe7, 0xb2, 0xfb, 0xe8, 0xb4, 0xfb, 0xea, 0xbb, 0xfb, 0xeb, 0xbd, - 0xfb, 0xeb, 0xbf, 0xfc, 0xed, 0xc6, 0xfc, 0xee, 0xc8, 0xfc, 0xee, 0xc9, - 0xfc, 0xef, 0xca, 0xfc, 0xf1, 0xd1, 0xfc, 0xf1, 0xd3, 0xfd, 0xf2, 0xd4, - 0xfd, 0xf2, 0xd5, 0xfd, 0xf2, 0xd6, 0xfd, 0xf3, 0xd9, 0xfd, 0xf6, 0xe1, - 0xfd, 0xf6, 0xe2, 0xfd, 0xf6, 0xe3, 0xfd, 0xf7, 0xe5, 0xfd, 0xf8, 0xe8, - 0xfe, 0xf7, 0xe5, 0xfe, 0xf8, 0xea, 0xfe, 0xf9, 0xeb, 0xfe, 0xfb, 0xf1, - 0xfe, 0xfb, 0xf2, 0xfe, 0xfb, 0xf3, 0xfe, 0xfc, 0xf5, 0xfe, 0xfc, 0xf7, - 0xfe, 0xfd, 0xf8, 0xff, 0xfd, 0xf9, 0xff, 0xfe, 0xfa, 0xff, 0xfe, 0xfc, - 0xff, 0xfe, 0xfd, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x57, 0x54, 0xb7, - 0x11, 0x00, 0x00, 0x00, 0x47, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x0f, 0x12, 0x13, 0x16, 0x17, 0x19, 0x1d, 0x1e, 0x27, - 0x29, 0x33, 0x34, 0x36, 0x3a, 0x3f, 0x46, 0x4f, 0x53, 0x57, 0x5b, 0x70, - 0x73, 0x78, 0x80, 0x83, 0x85, 0x86, 0x91, 0x93, 0x94, 0x99, 0xa2, 0xab, - 0xb8, 0xbb, 0xbc, 0xc0, 0xc1, 0xc3, 0xc7, 0xcc, 0xd1, 0xd2, 0xd5, 0xd6, - 0xda, 0xdb, 0xde, 0xdf, 0xe1, 0xe2, 0xe5, 0xe7, 0xe8, 0xeb, 0xed, 0xee, - 0xef, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, 0xfb, 0xfe, 0xb8, 0x42, 0x04, 0x8f, - 0x00, 0x00, 0x01, 0xe1, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0xd4, - 0xe9, 0x57, 0x8c, 0x71, 0x18, 0xc6, 0xf1, 0x89, 0xec, 0x2a, 0xfb, 0xbe, - 0x93, 0x25, 0xfb, 0xbe, 0x87, 0x30, 0xd7, 0x94, 0x10, 0xa6, 0x29, 0xb2, - 0x24, 0x63, 0xec, 0x4b, 0x92, 0x35, 0x4a, 0x18, 0x63, 0xdf, 0x89, 0x8a, - 0xb2, 0x0c, 0x26, 0x23, 0x32, 0x8d, 0xef, 0x9f, 0xe7, 0xc5, 0x33, 0x6b, - 0xf3, 0xcc, 0xf4, 0x86, 0xfb, 0xd5, 0x73, 0xce, 0xf3, 0x39, 0xbf, 0xe5, - 0xfc, 0xee, 0xeb, 0xb6, 0x58, 0xfe, 0x79, 0xa5, 0x65, 0x8d, 0x9e, 0x90, - 0x3d, 0x7b, 0xf1, 0xea, 0xf5, 0x58, 0x73, 0x73, 0x97, 0xe4, 0x64, 0x4f, - 0x1c, 0x95, 0x99, 0x16, 0x2f, 0xb2, 0xc6, 0xce, 0xca, 0x23, 0xa1, 0x36, - 0xce, 0x18, 0x93, 0x19, 0x35, 0xcb, 0x00, 0x3e, 0xbf, 0x74, 0xd7, 0x54, - 0x56, 0xec, 0x29, 0x96, 0xcd, 0xe1, 0x70, 0x56, 0x5d, 0xbd, 0xf3, 0xda, - 0x0b, 0xb0, 0x34, 0x82, 0xe0, 0xf1, 0xa5, 0x52, 0x25, 0xd4, 0xee, 0xcb, - 0x4f, 0x20, 0x06, 0xc5, 0xfe, 0x2b, 0x8a, 0xf9, 0x4e, 0x86, 0x4e, 0xb4, - 0x9f, 0xe9, 0x1e, 0x55, 0xf3, 0xb3, 0x32, 0x35, 0xda, 0x71, 0xed, 0xf9, - 0x47, 0x88, 0xae, 0x65, 0x86, 0x2e, 0xf8, 0x8c, 0xcb, 0x37, 0xa7, 0x40, - 0x57, 0x3a, 0xa1, 0xf5, 0x2d, 0xb4, 0xb9, 0x92, 0xa3, 0xc3, 0xbf, 0xf1, - 0x9d, 0x53, 0x35, 0x6d, 0x2e, 0xa9, 0x76, 0x57, 0x12, 0xf4, 0x8a, 0x1f, - 0x87, 0xa4, 0x23, 0x5e, 0x97, 0xe4, 0xa6, 0xde, 0x1c, 0xd9, 0x03, 0xdc, - 0x0d, 0x6f, 0xd3, 0x40, 0x8b, 0x39, 0x3a, 0x06, 0xc7, 0xc3, 0xa8, 0x8e, - 0xe0, 0x76, 0x53, 0x74, 0x16, 0xca, 0xc3, 0xe8, 0x22, 0x94, 0x9a, 0xa2, - 0x0a, 0xa8, 0x0a, 0xa3, 0x7a, 0x02, 0x5b, 0x4d, 0x91, 0xcd, 0xc7, 0x03, - 0x49, 0xe5, 0x92, 0xf2, 0x5b, 0x69, 0xea, 0x7a, 0x26, 0xab, 0x71, 0xbb, - 0x5b, 0xdf, 0x5d, 0x92, 0x27, 0x68, 0x97, 0xdc, 0x70, 0xdd, 0x40, 0xd6, - 0x08, 0x5a, 0x87, 0x53, 0x92, 0x76, 0x1e, 0x94, 0x3c, 0x50, 0xb2, 0xef, - 0x11, 0x34, 0x15, 0x48, 0xd2, 0x69, 0xd6, 0x46, 0xd0, 0x54, 0x5e, 0x84, - 0xce, 0xe2, 0x01, 0xbc, 0x41, 0xf8, 0x50, 0x26, 0x49, 0x45, 0x9f, 0x18, - 0x1f, 0x41, 0x03, 0x36, 0xfd, 0x39, 0x2f, 0x49, 0x2a, 0xf4, 0x03, 0x10, - 0x78, 0x68, 0x97, 0x24, 0xdd, 0x63, 0x41, 0xaf, 0x68, 0xff, 0x8e, 0xc3, - 0xeb, 0x90, 0x24, 0x9d, 0xf4, 0xc3, 0xfd, 0x9a, 0x50, 0x97, 0x9e, 0xea, - 0xdc, 0x3c, 0x38, 0x26, 0x08, 0x3d, 0xe6, 0xf2, 0x66, 0x8b, 0xd1, 0x72, - 0x7e, 0x4a, 0x42, 0x5b, 0xef, 0xff, 0xc6, 0xa4, 0xb8, 0xb8, 0x0c, 0x5c, - 0xc5, 0xd3, 0x02, 0x63, 0xad, 0xe6, 0x6d, 0x86, 0x71, 0xb4, 0x30, 0xb3, - 0x67, 0x7c, 0xa8, 0x86, 0xe4, 0xf1, 0xac, 0x30, 0xb6, 0xd3, 0x8b, 0xdf, - 0xb1, 0xb0, 0x4f, 0xd7, 0x70, 0x0e, 0xdd, 0x40, 0xe3, 0xde, 0xa8, 0x29, - 0x7b, 0xcf, 0xf2, 0x8c, 0xc4, 0x08, 0x0f, 0x5a, 0xc1, 0xd7, 0xc8, 0x03, - 0x1f, 0xfd, 0xc2, 0xa2, 0x0c, 0xb3, 0xa0, 0xf7, 0xcb, 0xa1, 0xe3, 0x46, - 0xbe, 0x24, 0xd9, 0x6a, 0x7f, 0x31, 0xa7, 0xaf, 0xf9, 0x38, 0x48, 0x9f, - 0x0c, 0x8d, 0x4e, 0xe9, 0x40, 0x03, 0x4c, 0x49, 0x4f, 0x3a, 0x35, 0x46, - 0xac, 0xa4, 0xe3, 0xf6, 0xcd, 0x76, 0xd6, 0x8c, 0x4c, 0x35, 0x5b, 0x7a, - 0x4f, 0xb3, 0x02, 0xd3, 0xfb, 0x77, 0x33, 0x82, 0x86, 0xcd, 0x9f, 0x37, - 0xdc, 0xf2, 0xdf, 0xea, 0x2f, 0xf4, 0x00, 0x35, 0xee, 0x8f, 0x76, 0x64, - 0x55, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82, -} - diff --git a/icon/wait_3_win.go b/icon/wait_3_win.go deleted file mode 100644 index 13f2138a..00000000 --- a/icon/wait_3_win.go +++ /dev/null @@ -1,471 +0,0 @@ -//+build windows - -// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) - -package icon - -var Wait3 []byte = []byte{ - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x24, 0x24, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x88, 0x15, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0xc3, 0x0e, - 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, - 0xff, 0xd1, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0x46, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x0f, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xab, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, - 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x83, 0xd9, - 0xf8, 0xff, 0x7c, 0xd6, 0xf8, 0xff, 0xf3, 0xfb, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xeb, 0xff, 0xff, 0xff, 0x53, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x05, 0xff, 0xff, 0xff, 0x91, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc6, 0xed, 0xfc, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x25, 0xbc, 0xf3, 0xff, 0xbb, 0xea, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x93, 0xff, 0xff, 0xff, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, - 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfd, 0xfe, 0xff, 0x72, 0xd3, - 0xf7, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, - 0xf1, 0xff, 0x6e, 0xd2, 0xf7, 0xff, 0xf7, 0xfc, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0x13, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x33, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, - 0xff, 0xff, 0xe5, 0xf7, 0xfd, 0xff, 0x3e, 0xc3, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3c, 0xc3, 0xf4, 0xff, 0xe3, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, - 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x3a, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xed, - 0xfc, 0xff, 0x21, 0xba, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x20, 0xba, - 0xf2, 0xff, 0xd1, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xe1, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x36, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xa6, 0xe4, 0xfa, 0xff, 0x0e, 0xb4, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0xca, 0xef, 0xfc, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xff, 0xff, 0xff, 0x12, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, - 0xff, 0xff, 0xa4, 0xe3, 0xfa, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x41, 0xc4, 0xf4, 0xff, 0xc9, 0xee, - 0xfc, 0xff, 0x10, 0xb5, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0xd3, 0xf1, - 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, - 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x03, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xeb, - 0xfb, 0xff, 0x0d, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x40, 0xc4, 0xf4, 0xff, 0xf1, 0xfb, 0xfe, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x1a, 0xb8, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x24, 0xbb, - 0xf3, 0xff, 0xe8, 0xf8, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x78, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x41, 0xc4, - 0xf4, 0xff, 0xf1, 0xfb, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x93, 0xde, 0xf9, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x42, 0xc5, 0xf4, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x19, 0xff, 0xff, - 0xff, 0xf5, 0xfe, 0xff, 0xff, 0xff, 0x4b, 0xc7, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0e, 0xb4, 0xf1, 0xff, 0xf1, 0xfb, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xfe, - 0xff, 0xff, 0x97, 0xdf, 0xf9, 0xff, 0x16, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x8e, 0xdc, 0xf9, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0xff, 0xff, 0xff, 0x06, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x94, 0xff, 0xff, - 0xff, 0xff, 0xad, 0xe6, 0xfa, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x87, 0xda, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0xf2, 0xfd, 0xff, 0x20, 0xba, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0xd9, 0xf3, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, - 0xff, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x14, 0xb6, - 0xf2, 0xff, 0x2a, 0xbd, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x87, 0xda, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x1a, 0xb8, 0xf2, 0xff, 0x23, 0xbb, 0xf2, 0xff, 0x9e, 0xe1, - 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xee, - 0xfc, 0xff, 0x0c, 0xb4, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x43, 0xc5, - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xed, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x82, 0xd8, - 0xf8, 0xff, 0xeb, 0xf9, 0xfe, 0xff, 0x33, 0xc0, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x87, 0xda, 0xf8, 0xff, 0xfd, 0xfe, - 0xff, 0xff, 0x16, 0xb7, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x84, 0xd9, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x69, 0xd1, 0xf6, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0xe5, 0xf7, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x96, 0xdf, 0xf9, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x29, 0xbd, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0b, 0xb4, 0xf1, 0xff, 0xd4, 0xf2, 0xfd, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc8, 0xee, 0xfc, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x2e, 0xbe, 0xf3, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4a, 0xc7, 0xf5, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x7b, 0xd6, 0xf7, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfa, 0xfe, 0xff, 0xff, 0x0f, 0xb5, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x47, 0xc6, 0xf5, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x29, 0xbd, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x5b, 0xcc, 0xf6, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0xb9, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x3d, 0xc3, 0xf4, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xc3, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x70, 0xd3, 0xf7, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfd, 0xfe, 0xff, 0xff, 0x11, 0xb5, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x16, 0xb7, 0xf2, 0xff, 0xfa, 0xfe, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x89, 0xdb, 0xf8, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xbb, 0xea, 0xfb, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xd3, 0xf1, 0xfc, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0xb2, 0xe7, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xfb, 0xfe, 0xff, 0x30, 0xbf, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x39, 0xc2, - 0xf4, 0xff, 0xe2, 0xf6, 0xfd, 0xff, 0x33, 0xc0, 0xf3, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x84, 0xd9, 0xf8, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x7b, 0xd6, 0xf7, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x32, 0xc0, - 0xf3, 0xff, 0xf9, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe5, 0xf7, - 0xfe, 0xff, 0x49, 0xc7, 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x4d, 0xc8, - 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xea, 0xf8, 0xfe, 0xff, 0x33, 0xc0, - 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x6e, 0xd2, - 0xf7, 0xff, 0x15, 0xb7, 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x63, 0xcf, 0xf6, 0xff, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, 0xf2, 0xfd, 0xff, 0xbf, 0xeb, - 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xea, 0xf8, - 0xfe, 0xff, 0x33, 0xc0, 0xf3, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x51, 0xc9, 0xf5, 0xff, 0xe5, 0xf7, - 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc9, 0xee, 0xfc, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x13, 0xb6, - 0xf2, 0xff, 0x66, 0xd0, 0xf6, 0xff, 0xab, 0xe5, 0xfa, 0xff, 0xd6, 0xf2, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xfb, - 0xfe, 0xff, 0x44, 0xc5, 0xf4, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x4d, 0xc8, - 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xfc, 0xfe, 0xff, 0x48, 0xc6, - 0xf5, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x40, 0xc4, - 0xf4, 0xff, 0xf3, 0xfb, 0xfe, 0xff, 0x44, 0xc5, 0xf4, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x12, 0xb6, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xa0, 0xe2, 0xfa, 0xff, 0x5c, 0xcd, 0xf6, 0xff, 0x1c, 0xb9, - 0xf2, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, 0xf1, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x1e, 0xba, 0xf2, 0xff, 0x5f, 0xce, 0xf6, 0xff, 0xa2, 0xe2, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe1, 0xf6, 0xfd, 0xff, 0xb1, 0xe7, 0xfb, 0xff, 0x84, 0xd9, - 0xf8, 0xff, 0x65, 0xcf, 0xf6, 0xff, 0x48, 0xc6, 0xf5, 0xff, 0x2e, 0xbe, - 0xf3, 0xff, 0x1f, 0xba, 0xf2, 0xff, 0x17, 0xb7, 0xf2, 0xff, 0x09, 0xb3, - 0xf1, 0xff, 0x0a, 0xb3, 0xf1, 0xff, 0x19, 0xb8, 0xf2, 0xff, 0x19, 0xb8, - 0xf2, 0xff, 0x31, 0xbf, 0xf3, 0xff, 0x4a, 0xc7, 0xf5, 0xff, 0x64, 0xcf, - 0xf6, 0xff, 0x86, 0xda, 0xf8, 0xff, 0xb4, 0xe8, 0xfb, 0xff, 0xe2, 0xf6, - 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x29, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xbc, 0xff, 0xff, - 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xb8, 0xff, 0xff, - 0xff, 0x70, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0x02, 0xff, 0xff, 0xff, 0x29, 0xff, 0xff, 0xff, 0x5b, 0xff, 0xff, - 0xff, 0x83, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, - 0xff, 0xda, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xee, 0xff, 0xff, - 0xff, 0xee, 0xff, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, - 0xff, 0xa2, 0xff, 0xff, 0xff, 0x85, 0xff, 0xff, 0xff, 0x57, 0xff, 0xff, - 0xff, 0x27, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xf8, - 0x01, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x7f, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0xc0, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, - 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, - 0x00, 0x00, 0xfe, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0xfc, 0x00, - 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x03, 0xf0, 0x00, - 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, - 0x00, 0x00, -} - From 68d73410021f2bdb71a09f63cbb2465b4456d89e Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:43:53 +0200 Subject: [PATCH 015/174] [feat] add go wrapper Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 72 +++++++++++ gui/backend.go | 342 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 414 insertions(+) create mode 100644 bitmask.pro create mode 100644 gui/backend.go diff --git a/bitmask.pro b/bitmask.pro new file mode 100644 index 00000000..1afe1623 --- /dev/null +++ b/bitmask.pro @@ -0,0 +1,72 @@ +CONFIG += qt staticlib +windows:CONFIG += console +unix:DEBUG:CONFIG += debug +lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") + +# trying to optimize size of the static binary. +# probably more can be shaved off with some patience +# You need to recompile your version of Qt to use the libraries you want. The +# information comes from the build configuration of the Qt version that you are +# using. Simply point Qts configure to the relevant libraries you wish to +# override, build it, and use it to build your project. It will automatically +# pull in the newer libraries that you overrode. +# TODO: patch the $(PKG)_BUILD definition in mxe/src/qtbase.mk and shave some options there. +# https://stackoverflow.com/questions/5587141/recommended-flags-for-a-minimalistic-qt-build +# See also: https://qtlite.com/ + +#QTPLUGIN.imageformats = - +#QTPLUGIN.QTcpServerConnectionFactory =- +#QTPLUGIN.QQmlDebugServerFactory =- +#QTPLUGIN.QWindowsIntegrationPlugin =- +#QTPLUGIN.QQmlDebuggerServiceFactory =- +#QTPLUGIN.QQmlInspectorServiceFactory =- +#QTPLUGIN.QLocalClientConnectionFactory =- +#QTPLUGIN.QDebugMessageServiceFactory =- +#QTPLUGIN.QQmlNativeDebugConnectorFactory =- +#QTPLUGIN.QQmlNativeDebugServiceFactory =- +#QTPLUGIN.QQmlPreviewServiceFactory =- +#QTPLUGIN.QQmlProfilerServiceFactory =- +#QTPLUGIN.QQuickProfilerAdapterFactory =- +#QTPLUGIN.QQmlDebugServerFactory =- +#QTPLUGIN.QTcpServerConnectionFactory =- +#QTPLUGIN.QGenericEnginePlugin =- + +QT += qml quick + +TARGET=minivpn + +SOURCES += \ + gui/main.cpp \ + gui/qjsonmodel.cpp \ + gui/handlers.cpp + +RESOURCES += gui/gui.qrc + +HEADERS += \ + gui/handlers.h \ + gui/qjsonmodel.h \ + lib/libgoshim.h + +LIBS += -L./lib -lgoshim -lpthread + +DESTDIR = release +OBJECTS_DIR = release/.obj +MOC_DIR = release/.moc +RCC_DIR = release/.rcc +UI_DIR = release/.ui + +Release:DESTDIR = release +Release:DESTDIR = release +Release:OBJECTS_DIR = release/.obj +Release:MOC_DIR = release/.moc +Release:RCC_DIR = release/.rcc +Release:UI_DIR = release/.ui + +Debug:DESTDIR = debug +Debug:OBJECTS_DIR = debug/.obj +Debug:MOC_DIR = debug/.moc +Debug:RCC_DIR = debug/.rcc +Debug:UI_DIR = debug/.ui + +DISTFILES += \ + README.md diff --git a/gui/backend.go b/gui/backend.go new file mode 100644 index 00000000..9a952a77 --- /dev/null +++ b/gui/backend.go @@ -0,0 +1,342 @@ +package main + +/* a wrapper around bitmask that exposes status to a QtQml gui */ + +import ( + "bytes" + "encoding/json" + "fmt" + "log" + "net/http" + "os" + "reflect" + "sync" + "unsafe" + + "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "github.com/jmshal/go-locale" + "github.com/kalikaneko/bitmask-vpn/pkg/systray2" + "golang.org/x/text/message" +) + +// typedef void (*cb)(); +// inline void _do_callback(cb f) { +// f(); +// } +import "C" + +/* callbacks into C-land */ + +var mut sync.Mutex +var stmut sync.Mutex +var cbs = make(map[string](*[0]byte)) +var initOnce sync.Once + +// Events are just a enumeration of all the posible events that C functions can +// be interested in subscribing to. You cannot subscribe to an event that is +// not listed here. +type Events struct { + OnStatusChanged string +} + +const OnStatusChanged string = "OnStatusChanged" + +// subscribe registers a callback from C-land. +// This callback needs to be passed as a void* C function pointer. +func subscribe(event string, fp unsafe.Pointer) { + mut.Lock() + defer mut.Unlock() + e := &Events{} + v := reflect.Indirect(reflect.ValueOf(&e)) + hf := v.Elem().FieldByName(event) + if reflect.ValueOf(hf).IsZero() { + fmt.Println("ERROR: not a valid event:", event) + } else { + cbs[event] = (*[0]byte)(fp) + } +} + +// trigger fires a callback from C-land. +func trigger(event string) { + mut.Lock() + defer mut.Unlock() + cb := cbs[event] + if cb != nil { + C._do_callback(cb) + } else { + fmt.Println("ERROR: this event does not have subscribers:", event) + } +} + +/* connection status */ + +const logFile = "systray.log" + +const ( + offStr = "off" + startingStr = "starting" + onStr = "on" + stoppingStr = "stopping" + failedStr = "failed" +) + +// status reflects the current VPN status. Go code is responsible for updating +// it; C-land just watches its changes and pulls its updates via the serialized +// context object. +type status int + +const ( + off status = iota + starting + on + stopping + failed + unknown +) + +func (s status) String() string { + return [...]string{offStr, startingStr, onStr, stoppingStr, failedStr}[s] +} + +func (s status) MarshalJSON() ([]byte, error) { + b := bytes.NewBufferString(`"`) + b.WriteString(s.String()) + b.WriteString(`"`) + return b.Bytes(), nil +} + +func (s status) fromString(st string) status { + switch st { + case offStr: + return off + case startingStr: + return starting + case onStr: + return on + case stoppingStr: + return stopping + case failedStr: + return failed + default: + return unknown + } +} + +// An action is originated in the UI. These represent requests coming from the +// frontend via the C code. VPN code needs to watch them and fullfill their +// requests as soon as possible. +type actions int + +const ( + switchOn actions = iota + switchOff + unblock +) + +func (a actions) String() string { + return [...]string{"switchOn", "switchOff", "unblock"}[a] +} + +func (a actions) MarshalJSON() ([]byte, error) { + b := bytes.NewBufferString(`"`) + b.WriteString(a.String()) + b.WriteString(`"`) + return b.Bytes(), nil +} + +// The connectionCtx keeps the global state that is passed around to C-land. It +// also serves as the primary way of passing requests from the frontend to the +// Go-core, by letting the UI write some of these variables and processing +// them. +type connectionCtx struct { + AppName string `json:"appName"` + Provider string `json:"provider"` + Status status `json:"status"` + Actions []actions `json:"actions,omitempty"` + bm bitmask.Bitmask +} + +func (c connectionCtx) toJson() ([]byte, error) { + stmut.Lock() + defer stmut.Unlock() + b, err := json.Marshal(c) + if err != nil { + log.Println(err) + return nil, err + } + return b, nil +} + +func (c connectionCtx) updateStatus() { + if stStr, err := c.bm.GetStatus(); err != nil { + log.Printf("Error getting status: %v", err) + } else { + setStatusFromStr(stStr) + } + + statusCh := c.bm.GetStatusCh() + for { + select { + case stStr := <-statusCh: + setStatusFromStr(stStr) + } + } +} + +var ctx *connectionCtx + +func setStatus(st status) { + stmut.Lock() + defer stmut.Unlock() + ctx.Status = st + go trigger(OnStatusChanged) +} + +func setStatusFromStr(stStr string) { + log.Println("status:", stStr) + setStatus(unknown.fromString(stStr)) +} + +func initPrinter() *message.Printer { + locale, err := go_locale.DetectLocale() + if err != nil { + log.Println("Error detecting the system locale: ", err) + } + + return message.NewPrinter(message.MatchLanguage(locale, "en")) +} + +// initializeBitmask instantiates a bitmask connection +func initializeBitmask() { + if ctx == nil { + log.Println("error: cannot initialize bitmask, ctx is nil") + os.Exit(1) + } + conf := systray.ParseConfig() + conf.Version = "unknown" + conf.Printer = initPrinter() + b, err := bitmask.Init(conf.Printer) + if err != nil { + log.Fatal(err) + } + ctx.bm = b +} + +func startVPN() { + err := ctx.bm.StartVPN(ctx.Provider) + if err != nil { + log.Println(err) + os.Exit(1) + } +} + +func stopVPN() { + err := ctx.bm.StopVPN() + if err != nil { + log.Println(err) + } +} + +// initializeContext initializes an empty connStatus and assigns it to the +// global ctx holder. This is expected to be called only once, so the public +// api uses the sync.Once primitive to call this. +func initializeContext(provider, appName string) { + var st status = off + ctx = &connectionCtx{ + AppName: appName, + Provider: provider, + Status: st, + } + go trigger(OnStatusChanged) + initializeBitmask() +} + +/* mock http server: easy way to mocking vpn behavior on ui interaction. This +* should also show a good way of writing functionality tests just for the Qml +* layer */ + +func mockUIOn(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: on") + setStatus(on) +} + +func mockUIOff(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: off") + setStatus(off) +} + +func mockUIFailed(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: failed") + setStatus(failed) +} + +func mockUI() { + http.HandleFunc("/on", mockUIOn) + http.HandleFunc("/off", mockUIOff) + http.HandleFunc("/failed", mockUIFailed) + http.ListenAndServe(":8080", nil) +} + +/* + + exported C api + +*/ + +//export SwitchOn +func SwitchOn() { + setStatus(starting) + startVPN() +} + +//export SwitchOff +func SwitchOff() { + setStatus(stopping) + stopVPN() +} + +//export Quit +func Quit() { + if ctx.Status != off { + setStatus(stopping) + stopVPN() + } +} + +//export Unblock +func Unblock() { + fmt.Println("unblock... [not implemented]") +} + +//export SubscribeToEvent +func SubscribeToEvent(event string, f unsafe.Pointer) { + subscribe(event, f) +} + +//export InitializeBitmaskContext +func InitializeBitmaskContext() { + provider := "black.riseup.net" + appName := "RiseupVPN" + initOnce.Do(func() { + initializeContext(provider, appName) + }) + go ctx.updateStatus() +} + +//export RefreshContext +func RefreshContext() *C.char { + c, _ := ctx.toJson() + return C.CString(string(c)) +} + +/* end of the exposed api */ + +/* we could enable this one optionally for the qt tests */ + +/* uncomment: export MockUIInteraction */ +func MockUIInteraction() { + log.Println("mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") + go mockUI() +} + +func main() {} From d32bb22d63d37c4f6f69112afdfa60ff4c4f0d7d Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:55:52 +0200 Subject: [PATCH 016/174] [pkg] add qt build script Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 2 +- build.sh | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 build.sh diff --git a/bitmask.pro b/bitmask.pro index 1afe1623..79d7f3b1 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -47,7 +47,7 @@ HEADERS += \ gui/qjsonmodel.h \ lib/libgoshim.h -LIBS += -L./lib -lgoshim -lpthread +LIBS += -L../lib -lgoshim -lpthread DESTDIR = release OBJECTS_DIR = release/.obj diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..667457c7 --- /dev/null +++ b/build.sh @@ -0,0 +1,56 @@ +#!/bin/bash +set -e + + +XBUILD=${XBUILD-no} +WIN64="win64" +GO=`which go` + +PROJECT=bitmask.pro +TARGET_GOLIB=lib/libgoshim.a +SOURCE_GOLIB=gui/backend.go + + +if [ "$XBUILD" == "$WIN64" ] +then + # TODO allow to override vars + QMAKE="`pwd`/../mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake" + PATH="`pwd`/../mxe/usr/bin"/:$PATH + CC=x86_64-w64-mingw32.static-gcc +else + QMAKE=`which qmake` +fi + + +function init { + mkdir -p lib +} + +function buildGoLib { + echo "[+] Using go in" $GO "[`go version`]" + if [ "$XBUILD" == "no" ] + then + echo "[+] Building Go library with standard Go compiler" + CGO_ENABLED=1 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB + fi + if [ "$XBUILD" == "$WIN64" ] + then + echo "[+] Building Go library with mxe" + echo ">> using cc:" $CC + CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB + fi +} + +function buildQmake { + echo "[+] Now building Qml app with Qt qmake" + echo ">> using qmake:" $QMAKE + mkdir -p qtbuild + $QMAKE -o qtbuild/Makefile "CONFIG-=debug CONFIG+=release" $PROJECT +} + +echo "[+] Building minimal qml example..." + +buildGoLib +buildQmake +make -C qtbuild clean +make -C qtbuild -j4 all From 0c50e7a3937cc5c589e542b3cb1e5cb9e508f781 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:56:32 +0200 Subject: [PATCH 017/174] [pkg] ignore new stuff Signed-off-by: kali kaneko (leap communications) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f834d003..5cb4e9ee 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ locales/*/out.gotext.json tools/transifex/transifex branding/assets/default +lib/* +qtbuild/* .*.swp *.exe From b06b1ad1572cdedc6a2c37d6f190c67a83600081 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:56:56 +0200 Subject: [PATCH 018/174] [pkg] switch to leap main repo Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/backend.go b/gui/backend.go index 9a952a77..885ece2a 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -14,8 +14,8 @@ import ( "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/systray2" "github.com/jmshal/go-locale" - "github.com/kalikaneko/bitmask-vpn/pkg/systray2" "golang.org/x/text/message" ) From 4d4155d6d9f90c85a6c9daa399a04f5b03375cf3 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 11:57:48 +0200 Subject: [PATCH 019/174] [refactor] comment out some initialization functions, still need work Signed-off-by: kali kaneko (leap communications) --- build.sh | 2 +- pkg/systray2/run.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 667457c7..402525f1 100755 --- a/build.sh +++ b/build.sh @@ -48,7 +48,7 @@ function buildQmake { $QMAKE -o qtbuild/Makefile "CONFIG-=debug CONFIG+=release" $PROJECT } -echo "[+] Building minimal qml example..." +echo "[+] Building BitmaskVPN" buildGoLib buildQmake diff --git a/pkg/systray2/run.go b/pkg/systray2/run.go index 937fb58b..00c2c943 100644 --- a/pkg/systray2/run.go +++ b/pkg/systray2/run.go @@ -23,6 +23,7 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/config" ) +/* func initialize(conf *Config, bt *bmTray, finishedCh chan bool) { defer func() { finishedCh <- true }() if _, err := os.Stat(config.Path); os.IsNotExist(err) { @@ -55,6 +56,7 @@ func initialize(conf *Config, bt *bmTray, finishedCh chan bool) { log.Printf("Error enabling autostart: %v", err) } } +*/ func checkAndStartBitmask(b bitmask.Bitmask, conf *Config) { if conf.Obfs4 { From e53cd6dee857969b7f5aa9bd689c73fb28dcdb87 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 12:06:13 +0200 Subject: [PATCH 020/174] [refactor] rename binary Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bitmask.pro b/bitmask.pro index 79d7f3b1..6abb8d17 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -1,3 +1,6 @@ +# FIXME: this should be overwritten by build templates +TARGET=riseup-vpn + CONFIG += qt staticlib windows:CONFIG += console unix:DEBUG:CONFIG += debug @@ -33,8 +36,6 @@ lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") QT += qml quick -TARGET=minivpn - SOURCES += \ gui/main.cpp \ gui/qjsonmodel.cpp \ From ca2f718a3ce8cb618cc79bfac380426edf023b42 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 12:10:07 +0200 Subject: [PATCH 021/174] [refactor] add comment, unsure about using this Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/backend.go b/gui/backend.go index 885ece2a..812258d5 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -122,6 +122,12 @@ func (s status) fromString(st string) status { } } +// FIXME ----------------------------------------------------------------------- +// at some moment I thought this was a good idea, but probably is overkill - +// and not used right now. Discuss with meskio in code review, and very likely +// remove it - there are probably better ways of dealing with tracking of user +// actions more towards the ui layer. + // An action is originated in the UI. These represent requests coming from the // frontend via the C code. VPN code needs to watch them and fullfill their // requests as soon as possible. @@ -144,6 +150,8 @@ func (a actions) MarshalJSON() ([]byte, error) { return b.Bytes(), nil } +// ----------------------------------------------------------------------------- + // The connectionCtx keeps the global state that is passed around to C-land. It // also serves as the primary way of passing requests from the frontend to the // Go-core, by letting the UI write some of these variables and processing From d88cf84188bc5055e6a091e40edacee225fd18d5 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 13:32:42 +0200 Subject: [PATCH 022/174] [bug] fix function call Signed-off-by: kali kaneko (leap communications) --- gui/qml/main.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 38f5331a..b601f407 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -92,13 +92,13 @@ ApplicationWindow { }, State { name: "stopping" - PropertyChanges { target: systray; tooltip: toHuman["stopping"]; icon.source: icons["wait"] } - PropertyChanges { target: statusItem; text: toHuman["stopping"] } + PropertyChanges { target: systray; tooltip: toHuman("stopping"); icon.source: icons["wait"] } + PropertyChanges { target: statusItem; text: toHuman("stopping") } }, State { name: "failed" - PropertyChanges { target: systray; tooltip: toHuman["failed"]; icon.source: icons["wait"] } - PropertyChanges { target: statusItem; text: toHuman["failed"] } + PropertyChanges { target: systray; tooltip: toHuman("failed"); icon.source: icons["wait"] } + PropertyChanges { target: statusItem; text: toHuman("failed") } } ] } From 36808bf43ed6c4de51b232d1c685c7d48741e667 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 16:25:04 +0200 Subject: [PATCH 023/174] [feat] pickled helpers ftw Signed-off-by: kali kaneko (leap communications) --- go.mod | 1 + go.sum | 2 + gui/backend.go | 6 ++ gui/main.cpp | 6 ++ pkg/pickle/helpers.go | 121 ++++++++++++++++++++++++++++++++++++ pkg/pickle/statik/statik.go | 14 +++++ 6 files changed, 150 insertions(+) create mode 100644 pkg/pickle/helpers.go create mode 100644 pkg/pickle/statik/statik.go diff --git a/go.mod b/go.mod index 8a6b75b3..97123df8 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 github.com/mattn/go-gtk v0.0.0-20191030024613-af2e013261f5 // indirect github.com/mattn/go-pointer v0.0.0-20190911064623-a0a44394634f // indirect + github.com/rakyll/statik v0.1.7 github.com/sevlyar/go-daemon v0.1.5 github.com/skelterjohn/go.wde v0.0.0-20190318181201-adc3f78cdb45 // indirect github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e diff --git a/go.sum b/go.sum index 596446de..01a400cb 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,8 @@ github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgF github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk= github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE= github.com/skelterjohn/go.wde v0.0.0-20180104102407-a0324cbf3ffe/go.mod h1:zXxNsJHeUYIqpg890APBNEn9GoCbA4Cdnvuv3mx4fBk= diff --git a/gui/backend.go b/gui/backend.go index 812258d5..ecff8dce 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -14,6 +14,7 @@ import ( "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/pickle" "0xacab.org/leap/bitmask-vpn/pkg/systray2" "github.com/jmshal/go-locale" "golang.org/x/text/message" @@ -337,6 +338,11 @@ func RefreshContext() *C.char { return C.CString(string(c)) } +//export InstallHelpers +func InstallHelpers() { + pickle.InstallHelpers() +} + /* end of the exposed api */ /* we could enable this one optionally for the qt tests */ diff --git a/gui/main.cpp b/gui/main.cpp index f2545d39..3e967612 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -65,6 +65,12 @@ int main(int argc, char **argv) { bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; + if (argc > 1 && strcmp(argv[1], "install-helpers") == 0) { + qDebug() << "Will try to install helpers with sudo"; + InstallHelpers(); + exit(0); + } + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); diff --git a/pkg/pickle/helpers.go b/pkg/pickle/helpers.go new file mode 100644 index 00000000..ec034d35 --- /dev/null +++ b/pkg/pickle/helpers.go @@ -0,0 +1,121 @@ +//go:generate statik -src=../../helpers -include=* + +// Copyright (C) 2020 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package pickle + +import ( + "fmt" + "io/ioutil" + "log" + "math/rand" + "os" + "os/exec" + "time" + + _ "0xacab.org/leap/bitmask-vpn/pkg/pickle/statik" + "github.com/rakyll/statik/fs" +) + +const ( + bitmaskRoot = "/usr/sbin/bitmask-root" + // TODO parametrize this with config.appName + policyFile = "/usr/share/polkit-1/actions/se.leap.bitmask.riseupvpn.policy" +) + +var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +func randSeq(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] + } + return string(b) +} + +func check(e error) { + if e != nil { + panic(e) + } +} + +func alreadyThere(path string) bool { + if _, err := os.Stat(path); err == nil { + return true + } + return false +} + +func copyAsRoot(orig, dest string, isExec bool) { + if alreadyThere(dest) { + fmt.Println("> File exists: ", dest) + return + } + var confirm string + fmt.Println("> About to write (as root):", dest) + fmt.Printf("> Continue? [y/N] ") + fmt.Scanln(&confirm) + if confirm != "y" { + fmt.Println("aborting") + os.Exit(1) + } + cmd := exec.Command("sudo", "cp", orig, dest) + err := cmd.Run() + check(err) + + if isExec { + cmd = exec.Command("sudo", "chmod", "776", dest) + err = cmd.Run() + check(err) + } + + fmt.Println("> done") +} + +/* dumpHelper works in linux only at the moment. + TODO should separate implementations by platform */ +func dumpHelper(fname, dest string, isExec bool) { + stFS, err := fs.New() + if err != nil { + log.Fatal(err) + } + + r, err := stFS.Open("/" + fname) + if err != nil { + log.Fatal(err) + } + defer r.Close() + + c, err := ioutil.ReadAll(r) + if err != nil { + log.Fatal(err) + } + tmp := "/dev/shm/" + randSeq(14) + + f, err := os.Create(tmp) + check(err) + defer os.Remove(tmp) + + _, err = f.Write(c) + check(err) + copyAsRoot(tmp, dest, isExec) +} + +func InstallHelpers() { + rand.Seed(time.Now().UnixNano()) + dumpHelper("bitmask-root", bitmaskRoot, true) + dumpHelper("se.leap.bitmask.policy", policyFile, false) +} diff --git a/pkg/pickle/statik/statik.go b/pkg/pickle/statik/statik.go new file mode 100644 index 00000000..5cf32ffb --- /dev/null +++ b/pkg/pickle/statik/statik.go @@ -0,0 +1,14 @@ +// Code generated by statik. DO NOT EDIT. + +package statik + +import ( + "github.com/rakyll/statik/fs" +) + + +func init() { + data := "PK\x03\x04\x14\x00\x08\x00\x08\x004\x8a\x86P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00 \x00bitmask-rootUT\x05\x00\x015d\x8b^\xe4}\x7fw\xdb6\xb2\xe8\xff\xfa\x14Sz{,%\x12m'\xa9\xf7\xae\xefu\xefS\x1c9\xd5]\xc7\xf6\xcar\xbb}\xae\xab@$$\xa1\xa1\x00.\x00\xdaV\xb7\xfb\xdd\xdf\xc1\x00\xfcM\xc9r\x9aMs\xcf\xd39\x89%\x123\x18\xcc\x0c\x06\x83\x99!\xb8\xf3\xd5^\xa2\xe4\xde\x94\xf1=\xca\xef ^\xe9\x85\xe0/[;\xd0{\xd6\x83@\x84\x8c\xcf\x8f \xd1\xb3\xde\x7f\x98+\xad\x9d\xd6\x0e\x9c\x88x%\xd9|\xa1\xa1}\xd2\x81\x17\xfb\x07\xafz/\xf6\x0f\xfe\x02g\x83\xfe%6\x18/\x98\x82X\x8a\xb9$K`\nf\x92RPb\xa6\xef\x89\xa4G\xb0\x12 \x04\x84\x83\xa4!SZ\xb2i\xa2)0\x0d\x84\x87{B\xc2R\x84l\xb6j\xed\x98K \x0f\xa9\x04\xbd\xa0\xa0\xa9\\*\x103\xfc\xf1\xf6\xfc\x1a\xdeRN%\x89\xe02\x99F,\x803\x16P\xae(\x10\x05\xb1\xb9\xa2\x164\x84\xa9Ac\x00N\x0d\x05W\x8e\x028\x15 \x0f\x89f\x82w\x812\xbd\xa0\x12\xee\xa8TLpx\x99v\xe1\xf0uA\xc8\xd6\x0e\xb4\x896dK\x10\xb1\x01\xeb\x00\xe1+\x88\x88\xce!\xfd\xc6\x91\xe7\x03\x0c\x81qD\xbc\x101\x05\xbd \xda\x8c\xef\x9eE\x11L)$\x8a\xce\x92\xa8\xdb\xda\x81i\xa2\xe1\x87\xe1\xf8\xbb\x8b\xeb1\xf4\xcf\x7f\x84\x1f\xfa\xa3Q\xff|\xfc\xe3\x7f\xc2=\xd3\x0b\x91h\xa0w\xd4bb\xcb8b4\x84{\"%\xe1z\x05b\xd6\xda\x81w\x83\xd1\xc9w\xfd\xf3q\xff\xf5\xf0l8\xfe\x11\x84\x84\xd3\xe1\xf8|pu\x05\xa7\x17#\xe8\xc3e\x7f4\x1e\x9e\\\x9f\xf5Gpy=\xba\xbc\xb8\x1a\xf8\x00W\xd4\x10E[;\x9bx;C\xe9H\n!\xd5\x84E\xca\x8e\xf9G\x91\x80Z\x88$\naA\xee(H\x1aPvGC \x10\x88x\xf5\xb8\xccZ;@\"\xc1\xe78B\xd0\x05\x16\xfa\x00\xc3\x19p\xa1\xbb\xa0(\x85\xffZh\x1d\x1f\xed\xed\xdd\xdf\xdf\xfbs\x9e\xf8B\xce\xf7\"\x8bC\xed}k\xa8\xf1<\xaf\x852`\n\x08\xc4\x92\xdd\xb1\x88\xcei\x08\x0b\x1a\xc5T\x82\n$\x8b5\x0eD\x91\x19\x8dV \x13\xce\x19\x9fC@\xa5&\x8cC \x96K\xc2Ce\x14I\n\xa1\xfd\xd6P\xa7\xc3\x13\xb98?\x1d\xbe=\xc8\xfe6 \x9b\xdd\xf7\xe8\x92\xb05t\xe67\x0d\xba\x84\x85\xadV?\x8a\x80\x04F\xa8\n$\xd5\x89\xe4@\x1f\x986\xa6\x91\xc2\xbe\xd5\xa4$\x08\xa8R]\xe0\x82\xf7~\xa5R\x8006\xe5\x9e)\xea\xb7Z\xe3\x05\x85\xf7%:\xdf;\x84FIUL\x03F\xa2#c\x0c\x8cZ)\xa0\x0f4\x00\xc1\xb3\xa1\x11\x1e\x82\xa4qD\x02\xaaZF\xdf\x82DJ\xca\xb5\x99#\xa6[\xdfL\x11s\xfd\xbdc\xeb{\x88\x89$Kj\x8c\x93\x99JD)\x1av\xb1I&\x08cwZ\\h\xa3\xcd\x9a\x12IC\x08\xc5=OmT@\x145\xf3\x96p\xa0R\n a\"\xcd$\x89H\xc2\x83\x85\x8f\xd3\x8c-c!5\x08\x95~\x934\xfd\xa6\xd8\x9c\x93(\xfb%\x82\x0fTg\xbfV*\x12\xf3\xecW2u\xc3(\xdc\xcf\xbej\x92\x81iI\x02:%\xc1\x87V+X\x86\xc1\x82\x06\x1f\xe0\xb8\x00\xee\xe3\xa5\x89Ht\x9c\xe8\x96]\xa6.\xce\xaf\xc6\xfd\xf3\xf1U\xab\xd5\n\xe9\x0c\xe6TO\xb8\x98\xcc\xa5H\xe2 'K\xda\xeeX\xa57\xa31\x7fGV\xbc\x86\x01vy\xc3\xa6`\x9a\x82\x16\xc6F\xa3\xb8\x8b2\xb8\xb8\xf2\x11t\xf0@\x96qD\x95Eh>=\xb8\x9e&\\'G\xc0\x05\xe2)\xdc\xe9\xcb`a\xaeOE\xb8j\xe1\xf5#\xa9W1=\x02\xa5\xa5\x99\xd0\xe7\x82\xd3\x12i\x8e\x0bsi\xd1h\xb9\xca{\x9a\xcb\xd8\x9fS=\x97\x9c,\xdb\xbb\x16\xebn'\xbb\xed\x946\xbd\x81\xd7\xe9C@c\x0d\x7f\xa5\xab\x81\x11o\x8e\xab\x84\xb8 9\x0e\xa5\x80\xbd\xdc\x83\xbd\x9b\xdd\\\xdbM\x01\n\x87j\x05\xa4\x85\xd2\xb2\xad\x9cT\xdc}\xe5\x87\xd4\xcc\xb5\xf6.:!\xbb\x9dV\xeb\xfb\xc1\xe8jxq\x0e\xc7\xe0\x1d\x1cx\xad\xab\x93\xd1\xf0rl~\x15'\xb3\xd7:\xef\xbf\x1b\\\x0dF\xdf\x0fF\x93\xf1\xc9%\xb6\xde\xf7_\x1d\xf8\xfb\xfeA\xe9\xe6\xf5\x9b\xec\xe6\x0b{s'\x93\xb3fK\nS\xca\xf8\xbc\x0b\xf7tWRX\x10\x19Z\xb7\x08t\x10\x9b\x89\x1a\x08\xce\xa9\x9d\xd08\xf1\x94_\xc0\x0e\xc7P\xa6\xa3\xf5z8~\xd7\xbf\xfa\xeb\xe4\xe4\xbb\xfe\xf0\xbc@\xb5W\xbe39\xef\x8f'\xc6 \xd8\xdc\xe2\xf2\xe2\xaa\xd8d\x12\x1b\x1e\x8aD3>\xaf6\x1f\xbc\xeb\x0f\xcf\x8am\xd1\xd65\xb6\xaatl[\xba\xc9\xe5\xb5\xce.N\xfag\x93\xe1\xf9x0:\xed\x9f\x0cL\xc3Hx\xad\xe1\xbb\xfe\xe5\xe4\xf2b\x84\x90\x07\x7f\xf9\x8fW^\xeb\xea\xdd8\xbf\xf4b\xff\xe0\xa5g%\xad\xee\x17,X\xb4\xa7\x8c\x13\xb9\xaa\xcc\xc2S\xc6C\xe4\xbdY\x15\xcd\xbc\xb3\xad\x8ci2\xcbYm\xbe\x94\x80\x8d\xdcf\"2N#\xe3p\xe3\xe1\n\xe8u\xc1\xcb\x16\xd6\xecG\xbeBz\xb7\xb9fb\xa7\xc7 \x94o\xbe\xf9\xbf\x08\xc6\xdb\x16a\xd7\x11\x92\xeb>\x9be\xed\x98\x9a\xb1\x88\xb6\xcd\xf7N\xa3\x9a\x9b;\x96tI\x98\xa20\xc0\xa9\xc1\x04o{'\x84\xef\x9a5\x92\x87\xf0\xb5\xf2\xe0kp|\xe9v:\xad\xd6\xd0\xe8\xa6c\x97\xc7b\xaf\xd3\x1a^\x8e\xfb\xaf\xcf\x06W\xa5\xeb\x9aL#\xaa\xf0\xeea\xc3\xed\xc3\xec\xfe\xd5\x8fW'\xe3\xb3\xc2M\xb5R\x81\x8e\xbcN\xabuq98\xff\xfe\xf2|r}\x85j\xebY\x83\xe1e\xd7\xdf\x8e.\xae\x0d5\x0dv\xb4e\\\x7f\xd7\xce\x80\x16~\xe6\xf0W?^\x8d\x07\xef&\xaf\xad\xd6\xe7\x9e\x8e[\xe8<\x80\x1dxC\xa7\x8cp0\xb21\xcc\xc9`\x0d\xc2\x12d\xc1\xbf\x89(\x89{E$\x0d^RN\xc4y\x01Q\x93\xb3\xb3\x16\x91i\xdcj\x9d\x0e\xff>x39=\xeb\xbf5\x1c\xbe\xb1\xca\xd7\xeb)\xaa)\xbf3\xbaU\x1cz\x17\xbc\x03\xaf\x9b\xb6\xe1b\xcax\x98\xff\x0e\"F\xb9\xce\x7f\x87\x14\x11\xe8\x84\xe7\xd7t\xa4j\xed$]\nM{\xc6a5\xf7\x0d\x8c\xa2\xf2\x8e\xca\xbc\xc9\x92p2\xa7K\xcau\xcf\xae\xc5\xf9-\xeb\x01\xf7\x14\x0d\x12\xc9\xf4\xaaBc\xa2\x0c\x9aL\xf6\xd9\xf5\xd8lr\x94\xee}\xa0\x0d\x17Q\x16=\x16\x97\xc9v\xfb\xa2\xde\xd2\xce\xb9\x03\x7f\xdf\xeb\xb6n[-6\x83\xb2F1e<|\\\x08\xec\xd4)\xf0\xd8\xa7\x0f\x9a\xf2\xb0}\xe3\xf5z\xa8p^\xb7\x0c}\xdbi\xb5\xfagg\x17?\x14\xa4\xf2\xcf2\xa7\xbc#\xb8\xf1\x86\x97\x86\x88\xf3\xebw\xaf\x07#\xf3\xedrt1\xbe\xf0n\xcb\x8cf\xf1\x82Jl~2\xbc\xfcn0*\xdc\xdft\x8f$z\xd1|'\x97\x03\xde\x7f3\x1c\xfd\xf6\x9b\xa5\xe4\xfa|\xf8\xf7\xab\x8b\x93\xbf\x0e\xc6\xbf\xfd\xe6\xa8j\x02s\xc2\xb7r1(\xcc\xe4,\x92E\xa5E}:<\x1b\x14\xae\x1b95\\\x0eH\xd3\xd5\x99$\xf3\x8c\xc6\x1a1\x1f(\x8dI\xc4\xeeh\xf1v\xce\xcb\xbc\xe1\x1d\x95\xd3f\x14\xb5\xf1\x98f\x05\xde'\xbc\xc7\xe2\xbbCw\xf5_\xad\xd6e\x7f\xd4\x7f79\xbd\x18\xbd\xeb\x8f\x0b\x12u\x88\x8f \"\xcbiH@\x1d\x81\xa4\xfe\x92hc\xc8~\xfe)|\xfe'\xaf\x0b\xaa\xe3\x10[\x11\xafi\xdc\xd6A\xfc[\x12\xc6\xbf\xe9 ~e\xbe\xbc\xea\x94\x80\x87\x97%H\xa6&w$b\xe1\x84\x84\xa1\xa4J\xb5\xb3\x86N\xe6k\xba\xb9\xe9\xf7\xfe\xef~\xef/\xbd\xdb2i(\xc5F\x10\xbc\x8fm~\xbe!\xbd_-\xf8\xe4'\xff\xa7\xffs[\xfc\xdd\xc3+\xcf~\xfa\xd3\x7f;\xbc\xc6\\\x0d\x07\x83\x01\\\xe9\x10\x0e\xf6\xf7_\xfa\x07\xbd\x17\xfb\xfb\x07\xb6?\x14x\xb1\xbf\xca\xba\x95\x11\xf6f8Z\xd3.d\xb2\x9d\xfeRq\xc4t[un\xf6o\xb3\x11e\xfa\\\x82Wp|\x0c^\xc2\xd9Cj\x1c\xae\x87o\xd62+\x1b`\xca.\xa3\x0bfQ\xd0T.\x19\xa7\xf0\xb7dJ\x15\\\\\xa5A\x97\xaeY\x83 _\xb5\xfev\xfdzp5\xb9\x1c]\xfc\xfd\xc7\xc2\xeaM\x1f\x98\xd2\xaa\xed\xed\xdd\x11\xb9'\x13\xbe\xf7\x0f\x03\xbf\xa7\x17L\xf5\x98\xea\xc5R<\xac\xee\x96^\xa7UZ\xc9\xcdH\xbd=\xaa\x03\xdb\xdcs\x0b\xba\xed\xe2\xe4\xf4-.\x1d\xf2~/\x10|\xc6\xe6{^\xe1\xee\xf0\xf2\xbb\x8b\x8b\xbf\xc2q\xa1\xf1s\xf0\x10M\x8f\xc5\xbd`A\xf8\x9c\xf6\x16B|(B\x9d\xfe0\xc9|\xd8\x06\xc0t\xd3\x86F\xc0\xd9o\xb7+\x98\x95v@$\x8a\xda7\xa9{\xd053+bJ\x9b\xb9\xfa\xb7\xd7W\xbd\xd3\x8b\xd1\x0f\xfd\xd1\x1b\xef\xb6cd\xb2\x9f{)\xb6K\xeb\xab\xbe\xc2\xab4R\xb4\xf9\xfe\xcbV~o\x07\xcd6qBQ+\xa5\xe9\xb2U\x05\xd8o\xb5Zo\x06\xaf\xaf\xdfZ\xb1\xccq\x9dl{x\xc9\xeb\xb4\xc6\x03t_\x0bw\xcc\x15\xe3\x8d\xb0\x19`#\xdb\x97\xdb\xffDb>g|\x8e\x97fB.\x896\x9b\xdc\xe3\xf4\xba\x7f\x9a^+\xcc\xa3\xaf\xdbD\x05\xc6\x8f\xef(\xe8\xc1\xd7m\xe3\xb1\xb8\xaf\x11\xbd\xa3Q\xe1\xf7\x92*E\xe6\xb4c\x1c%\x03\x1b,\n\xb8\xaf\xb4\xa4d\xf9\x1d1\xee\x84l\xa7\x0d|E\xf5\x99A\xd3N\xdb!\xd5\xc5\xdb9Q\x19\xc9\xf6\xb6\x81(\x91?\xa7\xfa\x0c\xaf\xb5'\xe8XM&\xc5\x86\x1b\xbbrMH\x18\xa6\x14\x06\x8bN\xabew\xdb\xe8\xd4Db\xde\xb6j\xd6\xb1\xfb\xe3\xeb1\x06\x08[;n\xfbU\xb3qw$Jh\xc5;\xff\xde\xb4 \xdaE0\xad\x9b\xae\x14\x0d\x81\xc56\xe6\x86(`x \x0e\x8b\xef\x1cv\xdc\x1a\x01\xa2L \x8b\xac\xd1\xb0\xa1\x7f\x1f\xdazA\xab\xac\x0c\xe9\x8c\x18\x83\xc3\x14h\x99PHxd46\xa4\xda\xe8\x9b\x90\xc0x\x9cd\xb7Sf\xbe\xa7\x0fL\x07\"\xa4\xef\x8d!\xfc@S\xd2\xba\x98$,$#0\x17\xc1\xb8\xd2\x94\x84F\x9b\x0dQ\x99\x9a\x02\xbc\xb7\xfd\x14\x87$\x13\x8c\xf5\xdb\x1b4\xccr )\x04\xd2S\x040\xfa\x93\xcd\x02\xa3\x87\xf7\x92i3C\x14\xbaE\xa0E\xd7Q\x84\x91\xd1\x05\x85K\x03Re\x84\x98\xfeB\x03\x9du\xa3\x17R\xdc\x97\xe8\xc2\xe0\x18\n\xcb\xad\xc8\x86\xb9zA%E\xf7\"\xcdG\xb8\xc1\xd6\xd0W\xc6\x9ej@L\xa4\xc6\xb9\xe7Fp\x9b_M#\x0cF\x85,\xe3C:Mp\xed7\\2K=\x94\x96z\x0f<;_\x10\xdc\xa8>BM\xd2\x9c\x84\xd3A\xe3\xcc\xb5=\xbc\xe8uqt\x16\xfb\xc4 \xbd\xd2\xd0^\xf5\xba\xd6epM\xadVTZ\xe2\xc5J\xc3L *m\xd3\xeb\x95\xe6\xc8\xf6j[\xbc\x987\xc4\x96n5l\xbb\xc1 \xe9`q\xd5\x98\xe4\xeak)-\xad\x84\xd5KP\x08\xe9\xe7{\x16T\x12\xcb\xc9.\x18#\xc8\x8f\x8bw\x87\x97\x83\x82e\xa9-6\xcd\x88\x1a\x93\x13YF\xa5\x8c\xa5f8Cz\xc7\x93(B\xe6P\xde\xde\xdd\x0b\xe9\xdd\x9e\xb9\xb2\xdb\x85\xdd\xfbJ\xe2\xa3\x96~\xc2-X>\x1a\x91\xe8c\x87\x10\x7fS)\xd3\xdf\x8dD\xee\xe7c\xb5V\xb4\xd0\xc1 \x06\"/\xed/\xb4\xad@\x94iWY\x7fg\xb96\xd4Wp63\x10\xbe\xed\x0e\x15\xe6\xabc8h^\xe9w`\xdf\x88\xf6\x00\xad\x12\xba\x80\xd4\xa5\xb4\xad\xfd!|\xa5\x17f\xb2\x1b\x8e\xae\xc1\xe0\xf2\xe6Sj\xf7'\xa1\xdf\xd8\xceM8\xe7h\x9f \x88Q;c\xa4\x8c\x07\x8eQ\xf1FH\xfbi\x9b1\x05\xcb\xb0\x8b\x83\xb3\x96\xb9\xd3\xcdM\xc81}\x08\xea\x1eRf?\x8b\xfc(\xb5\xa2\x91\xe1&*|\x833\x86\x96\x8a>\x04\x15\x90\xaa\x8e\x9a\x8f\xb1I\x8f\x8do\xcd(\x9a\x87]\x19\x9a]\x12\xcd\x8ee\xa9\xe6\xc7v\xad\xcc\x9b\xd8\xdf\xb1dB2\xbd:v[\xc2\xb3\x8b\xb7\x93\xe1\xf9\xe9Ee\xad\x8c%\xe3X\x89c\xd0\xc1=\xb1\xf6\xdcm\x8c\x8d>dx\xcb\x1b\xbb\xa5\x9a\x1f9{B\"g\xa4\x1dT\xd1\xcf\xc7f\xd9\x96\xae\x114\xc7_\x01\xcb6i5`;$\xc0\xed|\x15Jp\xccd\x9b\xe1\x0e\xde\x0dFo\xbb\xf8\xb5\x7f6\x18\x8d\xed\xd7\x93\xd1\xd0}\x1b\x8cF5~\x9b\xeb?\xf4G\xe7\xc3s\x07y~1\x1e\x9e\x0c\xecw\xc3?\xfb\x0dw\xe2%F\xb2\x99\xe9\xbf\x1e\xdc\xce\x98lw\x97N\xf6\xe9\xe2\xb2T\xf3\x82/\xe5De\xff\xb4S \xdaVi'\x85\x85\xb2\xa9+6\x03\x8c\xb1\x08Y\x0c\xa7\xa4\x9f,\xab\xee#I\x13\xfa\x10\xb4\x1f\xef>\x87\xb2\x01\x0d\x0b\x96\xaa\xa1\x9d\xcd\xeb\x14\xb1\xa2n\xff\x93(m}\x9bH\xcc\xad]a\n\xd4\x07\x16\xc74L\xdd$$\xdc\x87kE\xa1\xa2\xbc\x88\x03\xeb\xa1\x8cK\x82=\xa7Z\xa7\xa0}O!\x14|W\xc3=\xe1\xb8\x8d]2\xa5\x8c3\xb1\xec\xf8UY\xada\x92\x9bS\x85Q\xa4\xc3\xc49\xbd\xe5(\xc9\x94\x1bFE\xe8\xac\xf9\xd9x\xdb\x1d;bsU\xd9\xe2';q\x94&:QXbR&\xb4\x89\x1cd\xc1\x03\xd3\xed\x03\x17\xd7q\xf9\x91,\xaecvQ.\xab5\x992\xbe\xa1\xea\x01\x93\x9f\x86\x93\xae(\xce\\\xb3;\xa7\xac\x1a\xc5\xe5\xc5\xcd\xacJ\xfd\\W\x87\xb4\xc0\xca;m\x9d\xb5\x1a\x7f\x85\xf2)\xbfcRp\xf46v\xaf\xce\xfb\x97\xbb\x1d44\x95Xt5SW\xd81\xdaZ>\xc5I\xec\xecEa\x81\x91t)\xeehhk\xa1L\xb3\xd0\xa6\x12c\x12|\xc8\x8c\x10\xe4v\xbf\xdaM\xab@i#9Y\xf6\xb2S\x8b\x0b\xd4\xdbXl\x96\xde\xb4N\xabD1\x89\x94\xd8@\xb6\xff\x085i>t=-i\x0b\xa7\x041\x91\x8afj0\x8b\xc8\\Y\x97\xb7\xac\x0cc\xf2\x81\x02\x91\xf3dI\xb9\xb6\xbb\xe3\x8c\xb2\xd4\xfb7\x1b@\x14\x1c\xe2\x04\xa6\xbb\xb60\x8eD\x91\xb8\xc7-\x81XZ\xcd\xb0\x11\xf2Db.\x17\xb0\xd3t\xd5@\x03m\x08h\x88\xf1T\xa33%'\x0d3\xfc\x11\x99c=@\x1e\x04\xb3;@\xef\xe7^\xcf\xab\x84\x18Lc\x8c\xa6\xc21~\xbf\xd9\xbf-\xddg\xb3B\x13\xc6\xa1\x94M\\\x17\x84I7\xd7\x19d\x93\x7f\xf1\x8f\x84I\x1aNlQ\x08\x1c\x971\xdfd\xa0\xb75P\x0c$\x95\xa0\xd7\xb9h\xb3\x88hMq\x93\xa4\xa8i\xaa]\xb2:\xc6r\xb1& \xec7\xa3\xe9\x86\xb9\x12\xb6)\n\x9bqX\x92\xb89\x14`>\x85\xcc\x8e\xcb\x02u\xba\x96\xab\x07G\xb7\x1dD\xc5P2\x16_}h`\x87\x17Q\xde.\x10\xd21~\xa8\xb9V\x19\xf6\x9a \x144\xc4g\xcd\xd2G\xb9H\xe6\x0bW\x85\x83\xc4<\xe6:B\xbe\xf4\xe6\xa2\xac\xcb2\xfdT7\x13\xd5\x0f\x06hL\xef]\xfbg\x82j\xce8\xfc\xca\xe2\xe2x\xbbU\xf9n\x18(\x96\"Y,9N\xc7|\xef\xb7\xdf\xaa\xea^\xfd\xb0\x19\x94\xb2\xa97:\xa6\xb7m\xc4\xf4\x08$\xd4\xb4\xddB=\nT\x8e\x11V?\xcd.r\xf1S\x15\xedk\x12\xe66\xe9q\x89BQ\xaa\x96\xe4\xcd4\xaf\x93j3\xa5H\x9ds \x8f \xe1\x92\x06b\xce\xd9\xaf4\xcc\x16I\xb4O\xd6\xb3k0\x10\xf5`r5\x0bQ\xdb\xd9\x959b\x04z5<\x7f\x0b\xd6DU}H\xb3%\xc8{+\xe7\xd1\n\x08\xe7T\xfa\x99\x1b\xd1.m\x91\xea\xa5y\xe9\xc2\x81\x05\xa6M\x0b\xc7\x19V\x86\xa6\xed\xba\xa0\x08g\x9a\xfdj\x96\x03\x0c\x04t\x0bu\xaci\x84\xa8R\xc8\x8a\x1e\x10\"C\x0f\xc3\xf12\x8bL\xe1\x1d\xe7\xf5\xdb\x85#\xd5\x89t\x7f\xea2QZ\xa4\xc0\x16d\xd3RSZ\x10\xe1x\xfd2\xd9r\xbc,\xdd\xcay\x9a\xd7>\xd5\xbc\xad\xacM\xda\xc7\x8dk|\x0b\xcf\x8b\xa5.\xf0\xbc\x8c\xfcq Z\x95H\x0b\xd8S\x86\xa1\x1fi\xc9+\xaaEe\x0e\x18pl\x94_\xc6|.=\x82\x19\x93J\xe7\x13N\x8bl\xe5g\n\xd8\x9c\x0b\x99\x86\x00\x82Di\xb1$\x92E+P\xd44- +\xb8\x0c\xb9\xf3e\xdc\xc0\x07\x1a\xdc\xa5\x8e\x8c5\xbb\x8e\x88\xf2|C\x07{\xd7\x99\x80 \xdb4[\xa7#sGm\x04k\xb7S\xd3S\x117\xa9\xe9\x95\x16qI\xbd0\x8di\\W\xe3\x94cu?\xe5\xae\xcc\xd9\xd5\x8f\xd9\x12\xc8G\xf5ok\x95\x8bq\xa1=nHn\xe0m\x17\xe3\xef\xda\xa8\xb91\xfa\xe5T\x14\x9b\xc1t\xa5\xa9j{i\xa5Z\x17\xd2\xd2Xln\xc0\x8c\xb0l\xabB9Z\xbd]Y\xa3\x84\xf2?\xb0(j\x9b\xbdi\xcc\xc2N\xd7\xd5q\xfbW\xc3\xb7\xe3\xc1\xe8]Y\x81\xac\x91\xc7\x0d\xc7\xe9p4\xf8\xa1\x7fvV\xdaq\xcc\x89\xa6\xf7d\xa5\xda\xe9\x97Z\x99'&\x02I:k\x15\xfdGBy\x80\x9b\xf5\x14\xa4\x18RF\x17\xd3\xe5\x8dYh6 \x15\x9b\x90\x02\x1d\x01iD\x96g\x1f\x8b\x91\x85\x1c\x8ai*\xc94\xb2K@\x9a\xdb)]\xac\xf9\xa7.9QM\x9cw3\xac\x99\xd9\xc0p\x0f\x82U\x14<\x8d\n\x9d\x0b7\xb0\x8c\\|2`\xc6h\xe85\xcd\x8eu\xe92\x97i\x98\x84\xf4\x8e\x05M\x15\xee\x92\xd1;Z2\xbfir\x82S}/\xe4\x07\xb0\xa0\xfe\xe6B[)\x12\x8d\xc9\xad5%\xf8\xed\x9b\xe1e\x17\x1e\xcbb\x19\x15\x9b\x15\x81\xbf*\x95\x13\x9aO\x8e\xac*|\xa7Nv\x8cVrO\x1d\xa3\x83\xfa_2F\xab#O\x1d\xa3\x83\xfa\xbcc<~\xfa\x18Kfa}cW`\xe8\xe6x{\x0b\x93\x90\xb6}\x85\x86+\xfduX\x99)\xf1\xabu\x18\xdd\xfd\xc3\xb5\xf7S\x92\xd6b\xd8D\x13\xee\xb1\x90s\xaaL\xd1\x1aC\x98\x17\xe5\xae'd-\xa9\xeb 9\xfc\x08B\x0e\x1f\xa3D\x8b\xf9<\xa2v\x11\xb5\x89\x88\xe3\xdd\x90)\x83i\xd7\xd1\xc2fi\x8a\xe2\xf8\x18\xb2\x9b\xb9&\x18-M\xab\xc0p\x1e\x14ZS\xde\xd8x\xbfI\xa1p\x9d\xc1\x9f\xf9Bj\x1f`\xea\xc2n\xef~\xb7\x0b\xbb\x9cj\xdf\x90\xea\x07\x82\xcf|\x12E\xbe#\x07\x07p\xfc\xb5\xda\x85\xafM\x17\xb7fxf\xb3r~1\x1e`y\xa2\xa2\xa0\xa9\xb2\x9b7\xb7\xc0\x10\x08\x16\x84qk\xb9\x15,\xf1!P\xc6\x03!%\x0dt\xb4\xca\x8a\x92H\xa4\xa8\x9f>\xee\xbf@\x83\xa4\xe0~a\x9f\xcb\xaf\x95\xaa\xe0\x83\xbdX\x91\x96\xadr\xb64;\xdd\\\xbe\xb7\x0f\xd2\x9fbr\x85)\x90\x94(\xc1\xbb\x16\xa3\xd9\xca\xc6i\xc8$\xad\x05\xef\x02&\xb7p\x81\xd22Q\xe8\xd6\xb4v\\Y\x92\xd9\xf6\xb0\xf8\xeea\x82\xc3\x99\xb82\xf8\x8eM\xaf\xb92!\x12\xe1.\x83hM\x971\xee\xf2\xad\xcdq\x07& \xa4\x9f\xd7\x06\xc7w\xaf\xca\xd8\xf0G\x17p\xf0\x99\x7f/\x99\xa6\xed\xdd\x83\x9fx\x16NL;\\\x1f\xf7~\x8d\xe7\"$q\x89\xbe\xa6`aZi\x9c\xc7\xb6\\]\xbd\x0d\x94\xa7\xb5Q\x1bC\x87\xe5\xe0\x8e\x8b!V#>-+\xc6jL\xc2\xb5n\x0cV\x14\x11\xac\x81?\\\x07\x7f\xd8\x08\x9fE\xb1\x8e\xcb\xc1@\x1bK\xc7&;f\xdb\xeaB\xc8n\x8ee\x0f\xbac\xacN\n\x8e\x1c\xbb\xb8\x1e_^\x8f]\x13\xa3\nS\xe1\xf2\x04v\xa9\xda\xb5a\xb8]\\\x02\xf0\x02'z\xd7\xdaV\x95%\xd2\x8d\x1a\xd7'}\xe9\xd9\xf7\xc2\x8e8\xf7\x0b\xcdl\xa4\xf7=\xab\xe6](\x03<\x01y\xfa<\x7f\xd7\x92\xb7\xae/\xfc\x86O\xe0\x12\xb7\x8d[\xdb{\x8a\xf1\xc9T\\^\\}j2\x0c\xca*\x1d\x87\xdb\xb2\xfap{Vo\xa61\xdf\xfdZ\x9d\xf1\xaaK\xab\xd7\xeb\xfd\x92,\xe3G8\xb9m'f\xd0\xa3\x8b\xeb\xf1\xf0\xfc\xed\x93z*0+\xce{\xaa\x13\xbf\x0eI6\x810*\n\xc6 \xe2\x0c\x7fs~\x05\xe2\x8eJ\xf8\xfe\xf2\xdc\xb5h\xdb\x94\xcey\x7f\x9c\x0740\xc8\x8b\xc6\x12\xe7u\xc25\x8b\xe0\x03\x95\x9cF\xf0\xd2\xff\xb3s'\x1amv*\xe1\xe2\xe3\x96f\xd6\xe5O\xfc}{\x0c/s\xd9\xee\x80\xa4hV\x91\xb6\x98\x04\x1f\xa8\xb6\xb1\xb6\xef/\xcf\xcd\xb5\xfftO\x0f\xc6\x92\xa6\xc5\"T\xc1\x92\xa8\x7f$T\x92B=fQ(\xba$\x8fY\x94\xa8\x85}\xa4\xbb\xf7\xb7\xd7W\x85\xa5h=L\x1eBp@\xe6\xaa\xe1\xb3\x97\x84qM\x96`\xe5\x19\xc6\xc2\xca\xe7\x9b\x97%\xd9xo\xce\xfbNZZ4\x02\x17\x8e\x03y\x0e\xde\xd17/\x7f'\x91:\xf8\x8cD\x96\xfd\x83\x1d[\xe6\x03!\xc7\x8d\x13.\x07\x0b\xe1\xd6)\xd8n<%e\xc6[\xb1\x14Z\x04\"zL\x02\xd4>\xcez\xf0\xe2\xcf\xfe\xbe\x7f\xe0\x1ft\xed\xb7\xfd\xc2\xb7t\xdc%F4\xa3KY\xd3?9\x19\\\x8e\x0b2\xc9\xd5\xd6\xcc-\x91\xe8\xb9\xc0\x87\x81\x9c\xfe\xba\xb3\x80\x9c\n\x83=|\xa1\x00\xdc6Wq\xba)\xb1\xa4\x9a-\xa9B\x80\xf1\xc9\xe5WO\x12\xfc\x9a\x05\xe4\x0bV\xd5\xcd\x14\x7fV\xbd\x05\x94\x85\xb5c\xb9E\xc1\x93|\x94\xb0y\xdf\xa2Q\xb2\x12\xd7\x94\xc3t\x05\xa6S{FV\x8e \xcf\xb6\xb3Im\x0c\x07\x80\x12\x89\x0c(\x0c/\x95\x0f\xfd8\x8eV\x05\xbb\xe5\xd2\x95\x02\x01r\n\xbb\x05|\xb5\xeaT\x828\x98N\xc1\xb2\xb9\x85\x93MR%\xa2\xbb4y \x1f+\x0e\\\xfb7\xce\xae&jK\xedj\x93u\xa3\xfc\xde\xf5\xaf\xfev=\x18\xf5\xdf\x0c~\xaf&}b\xd2Q\x19\xb7'\x1d\x11\xa6\xd6\xcf\xe6\x8f\xd2\x84\xa9\x96d6cA\xba8\xd6]\xec\xba\xf9,#0\xe43\x8eU\x92\xaa\x91G\xebl\xe7zn8t^\xb7\x81\x9c\xae\xcbD\x95\x1d\xf7\xa7\x1b\xc9\xa6\xa1\xd8Ia\xd7\xf87\xe7WE\xab\x98\x96\xbc\xa1\xae7\x80\x9a\xd9\x88\xd3r^\x9b\x8f\xe7\xfdq\x01\x93A0\xa7:\xab\xf7YH,\xfbKgu.6\xbd@R3\xe2\x98hS\xf0\xdbM\x85,\xff\xfa\x88\xd1\xa8\xc1\x15\xbbz\x1c\xfc\xd3J\x00i\xc6%\xc7R\x91\xc9\x02\xf7>\x99@\xd6\xf0\xbf\x91\xe1fc.\xc5jk\x96\xe3\x1c\xf8\x08~\x97\x95\xbe\x91\xf9\xebm\xcafde\x894L\x9c-{\xf9\x92d\xb5\xcd\\\xf9t\xa2\xfbX\xdb\xb5^\x8c\xcd\xf6h3\xb6\x8f\x90\xe3\xe70{_\x9e 7\x9a=h\x1bO\xbb\xd3$\xc6\xc3\x8f\xb4~\x87_\xbe\xf5;|T\x10\xbf\x9f\xf3\xa5\x8d\x8c{\x1e\xa0r\xe0\xa0\xc0\xc3\x06k\xc5l\xeeb\xb9\xb2\xac\xf8 [\xf5\xdd*\xd9`l\xf9\xb8\xd2\xee}{\x11\x9diHb\x7fC\xe8\xc1\xbb\x8c(Q\xd4\xc8\x1e\xde\x97^o\xf6\xde\xd6\x00\xfb\xd9S\xa0\xb3{\xf7\x86\x9c\xed\xcaD\xed;\xc66\x15\x8b\x9aV\x89\xa2\x12\x12\x16\xa6\xef\xcfK\x85\x94\xbe/\x0b\x1e\xab\x16\xddP`\xe9^\xfdS*\xb3\xb4\xbbulW\x14\xc5c\x05\x85\xf8\xbe\xa0'WN:\xb0JG\x9b*\x06\x1b:\xda\xa6n\xb0\xd4Qc\xb5\x1d\x8e{\xfd\xf6'E\xb0\x1dK\xd3w$\xad-`}2k\xb1.\xf1\xe3\xd8\xdbT\x1c\xfa8\x8bk\x1dn\xcf\xe6b\x0de\x13\xab\x1f\xdbj\x16\xb18~\xbf\xb1q\x0e\x9c\x01\x04_\xb3gX\xcb\x96$F\x03\xa6\x96:\xb6~\xb3H\xb4b!\xad\xf5\xbe\xa6\xa0\x04{\xaa\xac\x8dHk\x8fqM\xe5\x8c`\x82\xbc\xf2\xa6\xabn5 \xd5P\xd0TH1e/\xc4Z\x9f\x0f\xffB(\xcd\xde\xd3\xf5\xef\xa0tc\xd1M3\x8f*\xd9\x8e\x7fK\xcf\xcdc.\xa7 \xdc\xbc\xc1\x8741y\xa4+\x87)\xe1\xebLn\xd1\xe2\xdf\xec\xdfnZ\x89\xce\x05\x1as|\x16\xca\x0d\xcc\xfc>\x06\x07\x9b\xe7<\xdc9\x17 g\x0f\xb0\x9b\xb0p\xd7\x96\x9e\xe5\xda\x9f\xaf!\xe5y`\x06\xa6\x9e\xc42\xf4\xdfkl\x13\x89\xde\xa8[5\x00{\xfa~\x17\xe6\xd3t\x9aC\x85\xa3M\xe70\xd7\x11\xa5\xe1\xd4L\xfc\xf5&P\xee\xcf\xec.kmJ\xe2\xc8O\xb8\xb5\n\x95\x02\xe3\xaa\xb3%\x1fj\x0c}\x8c\x0d5\xb2\xb6\xe5\xc0Z\xd2E\xfc\x11\x94\x1b\xc3W\xa1\x9c5\x9d9Tr.:u\xaav@\x0baV\x88\xa9P\x14\x14\xe3A!m\"\xa2HayZ\x0d,&\xaa|q\xd3[|\xac\xefQ\xab\xdd`\nBq\xcf\xbd\x8d\xe3u\x86\xfe \x1a\xdb\x90X\xfa(ym\xab\xb1\xe5x\xc8\xf6b7\x1a[\xf6W\x1e\x97~\xce\x8d-\xf5v\x03q\xdb\xf2a\x93\xde~,\xfd\x1f\xa5\xbd\xb5tV\xfa\xc9\xce\xf5.+Z\xc5\x19d\n\x92x\xc3\xf1\xde\xdbkp\x1dq]\x8f\xab\xb8\xaa'\x17\xab\x04\xdf\x9ai\xcf\xfa\x86\xb1\\\x95}F\xb3H7\x1e&\xf0qx\xf0\xdd\xd0\xe9\x0b\x92Q\x14\x93\x89q\x82&\x13'\x05\xb7K\x80\x8a\x0b\xe2Xd\xfd%K\x8d[A\xff_\x00\x00\x00\xff\xffPK\x07\x08/\x1c\xa5\x87\xb7#\x00\x00\x04\x8f\x00\x00PK\x03\x04\x14\x00\x08\x00\x08\x00\xb4\x037P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00 \x00se.leap.bitmask.policyUT\x05\x00\x01\xf4\xe8(^|\x93\xcbn\xdb<\x10\x85\xf7z\x8a\xf9\xb9\xb7\x98\xec~\x04\xb4\x82\\\\\xa0h\xd0\x1aE\xb2\xe8*\x98\x90c\x991=\x14\xc8\x91m\xe5\xe9\x0b\xc979\x01\xba\xb3\xc93\xdf9\x9c\x19\x99\xdb\xdd:\xc0\x86R\xf6\x91\xa7\xea\xba\xbcR@l\xa3\xf3\\O\xd5\xcb\xf3\xb7\xc9\xff\xea\xb6*\xcc\x7f\x8f\xbf\x1e\x9e\xff\xccg\xd0\xc4\xe0mg#/|\x0d\xf3\x97\xfb\xa7\xef\x0f\x05\xa8\x89\xd6\x8bD\xe4(\xaf$6Z?>?\xc2|P\xfe\xf0r\xf8\x05\x0fCQ\x9bP|d\xb8.\xaf\xb4\x9e\xfdT\x05\xa8\xa5Hs\xa3\xf5v\xbb-G\x942\xa6ZgAv\x98\\\xd6'\x9c\xbe\xd6\xe3\x10\xa5\x13\xa7\xaa\xc2\x8c\xcf\xaa\xa2\x000\x1bb\x17S\xf54\xbb\x9b\xc3\x8cm\xea\x9a\xc1\xf8\xceZ\xca\x19\xe6)\xbe\x93\x15\xa3\x0f\xb2s\xc5k\x9bBu\xc8\x14\x08\x9b2\x93>\xca\x86\xbb\x81\x8ev\xa0y7U\x99\xcaA\xf7\xe6e\x8dyU\xee\xa3\xa8\x1e `\x1ce\x9b\xfc\xe0]\xfdn9\xc3A\x06K\n\x0d%\x90\x08\x01[\xb6KX\xf8D[\x0c\x01\x90\x1d\xc4\x86x\xd3\xb0\xd1\xe3\xfa/D\xd8\xad\xc3M\xc0~X\x94U5{'\xdb\n\x02\x05\xc0\xec\xb3\x10\x0b\x81\xa3\x93e\x83 ! \x7f`\xea5'\xc3\xee_vk\xca\x19k\xaa\xee\x0f\x10&r\x19d\x89\x02]l\x01[Y\x12\x8b\xb7(\xd4?&\x0b&1\xfaXu\xc1\xf8\x14\xf7L\xb4\x94\xbd`\xcf\x8a\xc9\x7f\xa0\xed\x9f6\x84\xb5qM}\xdc\xcf@o#\xbf2\xae\xa9j\xd0\xae\xb0\xa6\xc9nR\x13S\xf2\xd6\xe8\xf3%\x1c;\xb6\xc06H\xde\x17\xf7\xd3\x0b!n_\x91\xbb\xaa\xa3l\xf4\xf9\xef\xa5\xc0s?\xe6\x0d\x8dU\xa7\xb3O\xac/\xc2\xb1\xac\xef\xeb8\x82A\xe6(}\xc7V\xd4MUL\xf5\xc5\xea\xef7h\xe5\xa5\xa4\x1d\xd9\xb2AY\xaaJ\xb79\xe9\xfc\xe6Y\x1f\xc69I1\x8a\xd1G\xd4\xb0\xc2z\xbf\x97Ua\xf4\xe5\x17\xf17\x00\x00\xff\xffPK\x07\x08\xdf\x04|\xcb\xf7\x01\x00\x00\xea\x03\x00\x00PK\x03\x04\x14\x00\x08\x00\x08\x00\xb4\x037P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00 \x00se.leap.bitmask.snap.policyUT\x05\x00\x01\xf4\xe8(^\x94\x93Oo\xdb<\x0c\xc6\xef\xfe\x14|\x85\x1e\xde\x1db\xb5\xb7\xa1P\\tm\x06\x0c+\xba`h\x0f;\x15\xac\xcc\xd8jdJ\x90\xe4$n\xb1\xef>\xd8\xf9S\xa7\xd9e'\xdb\xd2\xc3\x1f\x1f\xd2\xa4\xba\xda4\x16V\x14\xa2q<\x15\x17\xf9\xb9\x00b\xedJ\xc3\xd5T<>|\x9d|\x16WE\xa6\xfe\xbb\xfdq\xf3\xf0k>\x03\xef\xac\xd1\x9dv\xbc0\x15\xcc\x1f\xbf\xdc}\xbb\xc9@L\xa4\\\x04\xa2\x92\xe229/\xe5\xed\xc3-\xcc\x07\xe5w\x93vop3\x04\xb5\x01\x93q\x0c\x17\xf9\xb9\x94\xb3{\x91\x81\xa8S\xf2\x97R\xae\xd7\xeb|D\xc9]\xa8dL\xc8%\x862\xca\x03N^\xc8\xb1\x89\xbcL\xa5(25>+\xb2\x0c@\xad\x88K\x17\x8a\xbb\xd9\xf5\x1cf\xacC\xe7\x87\xc4\xd7ZS\x8c0\x0f\xee\x85t\xda?\x95\xdc\xc9\xdf#\x9f\xda`\x8b\x9d7K\xe8\xf3Hr/\x1b\xee\x86,\xa8\x07\xaa)\xa7\"R>\xe8\x9eMj0.\xf3\xb37\xf4\xde\x1a=\x14|\x8f\x0d\xfd\xce\xb7.E\x9f\x05@\x95\x14u0\x83\xad\xe2g\xcb\x11v\x91P\x93\xf5\x14 9\xb0\xd8\xb2\xaeaa\x02\xad\xd1Z@.\xc1y\xe2\x95g\xf8\xff4\xc1'%\xc7\xd0\x934\xb0i\xec\xa5\xc5\xfe\xe7R\x14\xc5\xec\x85t\x9b\x10\xc8\x02F\x13\x13q\"(\xe9\xe0\xc3c@\xb0\xc8\xaf\x18z\xcd\xc1E\xf7\xcf\x1e\x1a\x8a\x11+*N\xe5\xc0De\x84Tc\x82\xce\xb5\x80m\xaa\x89S/\xa1\xbe\x031aHJ\xee\x01G\xb8\x0f\xe5\xfc\x15\xae)\x9a\x84=\xd6\x05\xf3\x8a\xba\xef\xc2P\x97v\x0d\xf5\x95}d\x1b\xed\xf8\x89\xb1\xa1\xc2\xa3^bE\x93\xcd\xa4\"\xa6`\xb4\x92\xef\x97\xb0o\xee\x02[\x9b\xe26\xb8\x1f\x08k\xdd\xfa \xb9+:\x8aJ\xbe\x7f\x1e\x0b\x0c\xf7\x93\xb3\xa2\xb1\xeap\xf6\x81u\"\x1c\xcb\xfan\x8f-(dv\xa9o\xde\x92\xba\xa9p\xa1:\xda\xaa\xed\x04.M\xcaiC:\xf7\x98jQ\xc8\xc8\xe8\xe5\xb3ay\xf6\xf6l\x18C\xb7\x1d\xd7\xdd\x1cL\x82sI\xc9=x\xd8\x11\xb9\x1d\xfc\"S\xf2x\xf5\xfe\x04\x00\x00\xff\xffPK\x07\x08\x01\xb4\xa1\xf7\x1a\x02\x00\x00S\x04\x00\x00PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x004\x8a\x86P/\x1c\xa5\x87\xb7#\x00\x00\x04\x8f\x00\x00\x0c\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\x00\x00\x00\x00bitmask-rootUT\x05\x00\x015d\x8b^PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\xb4\x037P\xdf\x04|\xcb\xf7\x01\x00\x00\xea\x03\x00\x00\x16\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81\xfa#\x00\x00se.leap.bitmask.policyUT\x05\x00\x01\xf4\xe8(^PK\x01\x02\x14\x03\x14\x00\x08\x00\x08\x00\xb4\x037P\x01\xb4\xa1\xf7\x1a\x02\x00\x00S\x04\x00\x00\x1b\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x81>&\x00\x00se.leap.bitmask.snap.policyUT\x05\x00\x01\xf4\xe8(^PK\x05\x06\x00\x00\x00\x00\x03\x00\x03\x00\xe2\x00\x00\x00\xaa(\x00\x00\x00\x00" + fs.Register(data) + } + \ No newline at end of file From 75e63cde8c8589637307421ff9508526ca528edd Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 5 Jun 2020 13:04:49 +0200 Subject: [PATCH 024/174] [pkg] go mod tidy Signed-off-by: kali kaneko (leap communications) --- cmd/bitmask-connect/main.go | 65 - cmd/bitmask-vpn/catalog.go | 1047 --------- cmd/bitmask-vpn/main.go | 93 - go.mod | 18 +- go.sum | 103 +- packages/w32/AUTHORS | 19 - packages/w32/LICENSE | 23 - packages/w32/README.md | 33 - packages/w32/advapi32.go | 389 ---- packages/w32/advapi32_constants.go | 300 --- packages/w32/advapi32_typedef.go | 122 - packages/w32/alpc.go | 304 --- packages/w32/alpc_constants.go | 64 - packages/w32/alpc_typedef.go | 181 -- packages/w32/comctl32.go | 109 - packages/w32/comdlg32.go | 38 - packages/w32/constants.go | 2628 ---------------------- packages/w32/create_process.go | 152 -- packages/w32/create_process_constants.go | 9 - packages/w32/create_process_typedef.go | 68 - packages/w32/dwmapi.go | 254 --- packages/w32/fork.go | 174 -- packages/w32/fork_constants.go | 26 - packages/w32/fork_typedef.go | 89 - packages/w32/gdi32.go | 543 ----- packages/w32/gdiplus.go | 175 -- packages/w32/go.mod | 1 - packages/w32/idispatch.go | 43 - packages/w32/istream.go | 31 - packages/w32/iunknown.go | 27 - packages/w32/kernel32.go | 388 ---- packages/w32/ole32.go | 63 - packages/w32/oleaut32.go | 48 - packages/w32/opengl32.go | 72 - packages/w32/psapi.go | 25 - packages/w32/shell32.go | 153 -- packages/w32/typedef.go | 891 -------- packages/w32/user32.go | 1046 --------- packages/w32/utils.go | 201 -- packages/w32/vars.go | 13 - 40 files changed, 3 insertions(+), 10025 deletions(-) delete mode 100644 cmd/bitmask-connect/main.go delete mode 100644 cmd/bitmask-vpn/catalog.go delete mode 100644 cmd/bitmask-vpn/main.go delete mode 100644 packages/w32/AUTHORS delete mode 100644 packages/w32/LICENSE delete mode 100644 packages/w32/README.md delete mode 100644 packages/w32/advapi32.go delete mode 100644 packages/w32/advapi32_constants.go delete mode 100644 packages/w32/advapi32_typedef.go delete mode 100644 packages/w32/alpc.go delete mode 100644 packages/w32/alpc_constants.go delete mode 100644 packages/w32/alpc_typedef.go delete mode 100644 packages/w32/comctl32.go delete mode 100644 packages/w32/comdlg32.go delete mode 100644 packages/w32/constants.go delete mode 100644 packages/w32/create_process.go delete mode 100644 packages/w32/create_process_constants.go delete mode 100644 packages/w32/create_process_typedef.go delete mode 100644 packages/w32/dwmapi.go delete mode 100644 packages/w32/fork.go delete mode 100644 packages/w32/fork_constants.go delete mode 100644 packages/w32/fork_typedef.go delete mode 100644 packages/w32/gdi32.go delete mode 100644 packages/w32/gdiplus.go delete mode 100644 packages/w32/go.mod delete mode 100644 packages/w32/idispatch.go delete mode 100644 packages/w32/istream.go delete mode 100644 packages/w32/iunknown.go delete mode 100644 packages/w32/kernel32.go delete mode 100644 packages/w32/ole32.go delete mode 100644 packages/w32/oleaut32.go delete mode 100644 packages/w32/opengl32.go delete mode 100644 packages/w32/psapi.go delete mode 100644 packages/w32/shell32.go delete mode 100644 packages/w32/typedef.go delete mode 100644 packages/w32/user32.go delete mode 100644 packages/w32/utils.go delete mode 100644 packages/w32/vars.go diff --git a/cmd/bitmask-connect/main.go b/cmd/bitmask-connect/main.go deleted file mode 100644 index 9046d5c1..00000000 --- a/cmd/bitmask-connect/main.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package main - -import ( - "flag" - "fmt" - "log" - "os" - "os/signal" - - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" - "0xacab.org/leap/bitmask-vpn/pkg/config" - "golang.org/x/text/language" - "golang.org/x/text/message" -) - -const ( - logFile = "systray.log" -) - -var version string - -func main() { - displayVersion := flag.Bool("version", false, "Display the version") - flag.Parse() - - if *displayVersion { - fmt.Println(version) - os.Exit(0) - } - start() -} - -func start() { - signalCh := make(chan os.Signal, 1) - signal.Notify(signalCh, os.Interrupt) - - b, err := bitmask.Init(message.NewPrinter(language.English)) - if err != nil { - log.Fatal(err) - } - defer b.Close() - - err = b.StartVPN(config.Provider) - if err != nil { - log.Println(err) - os.Exit(1) - } - - <-signalCh -} diff --git a/cmd/bitmask-vpn/catalog.go b/cmd/bitmask-vpn/catalog.go deleted file mode 100644 index 344b0c77..00000000 --- a/cmd/bitmask-vpn/catalog.go +++ /dev/null @@ -1,1047 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package main - -import ( - "golang.org/x/text/language" - "golang.org/x/text/message" - "golang.org/x/text/message/catalog" -) - -type dictionary struct { - index []uint32 - data string -} - -func (d *dictionary) Lookup(key string) (data string, ok bool) { - p := messageKeyToIndex[key] - start, end := d.index[p], d.index[p+1] - if start == end { - return "", false - } - return d.data[start:end], true -} - -func init() { - dict := map[string]catalog.Dictionary{ - "ar": &dictionary{index: arIndex, data: arData}, - "bn": &dictionary{index: bnIndex, data: bnData}, - "br": &dictionary{index: brIndex, data: brData}, - "ca": &dictionary{index: caIndex, data: caData}, - "de": &dictionary{index: deIndex, data: deData}, - "el": &dictionary{index: elIndex, data: elData}, - "en": &dictionary{index: enIndex, data: enData}, - "en_GB": &dictionary{index: en_GBIndex, data: en_GBData}, - "en_US": &dictionary{index: en_USIndex, data: en_USData}, - "es": &dictionary{index: esIndex, data: esData}, - "es_ES": &dictionary{index: es_ESIndex, data: es_ESData}, - "eu": &dictionary{index: euIndex, data: euData}, - "fa_IR": &dictionary{index: fa_IRIndex, data: fa_IRData}, - "fr": &dictionary{index: frIndex, data: frData}, - "he": &dictionary{index: heIndex, data: heData}, - "hu": &dictionary{index: huIndex, data: huData}, - "it": &dictionary{index: itIndex, data: itData}, - "lt": &dictionary{index: ltIndex, data: ltData}, - "nl": &dictionary{index: nlIndex, data: nlData}, - "pl": &dictionary{index: plIndex, data: plData}, - "pt_BR": &dictionary{index: pt_BRIndex, data: pt_BRData}, - "pt_PT": &dictionary{index: pt_PTIndex, data: pt_PTData}, - "ro": &dictionary{index: roIndex, data: roData}, - "ru": &dictionary{index: ruIndex, data: ruData}, - "sk": &dictionary{index: skIndex, data: skData}, - "sv": &dictionary{index: svIndex, data: svData}, - "tr": &dictionary{index: trIndex, data: trData}, - "ug": &dictionary{index: ugIndex, data: ugData}, - "zh": &dictionary{index: zhIndex, data: zhData}, - "zh_TW": &dictionary{index: zh_TWIndex, data: zh_TWData}, - } - fallback := language.MustParse("en-US") - cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) - if err != nil { - panic(err) - } - message.DefaultCatalog = cat -} - -var messageKeyToIndex = map[string]int{ - "%[1]s is an easy, fast, and secure VPN service from %[2]s. %[1]s does not require a user account, keep logs, or track you in any way.\n\t \nThis service is paid for entirely by donations from users like you. Please donate at %[3]s.\n\t\t\nBy using this application, you agree to the Terms of Service available at %[4]s. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.\n\n\n%[1]v version: %[5]s": 2, - "%s blocking internet": 24, - "%s off": 19, - "%s on": 18, - "About": 3, - "About...": 14, - "An error has ocurred initializing the VPN: %v": 25, - "Can't connect to %s: %v": 7, - "Cancel": 20, - "Checking status...": 9, - "Connecting to %s": 21, - "Could not find a polkit authentication agent. Please run one and try again.": 5, - "Donate": 1, - "Donate...": 13, - "Error starting VPN": 8, - "Help...": 12, - "Initialization error": 4, - "Missing authentication agent": 6, - "Quit": 15, - "Reconnect": 23, - "Route traffic through:": 16, - "Stopping %s": 22, - "The %s service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?": 0, - "Turn off": 11, - "Turn on": 10, - "Use %s %v gateway": 17, -} - -var arIndex = []uint32{ // 27 elements - 0x00000000, 0x00000158, 0x00000165, 0x00000421, - 0x00000433, 0x0000044a, 0x000004be, 0x000004ee, - 0x00000527, 0x00000549, 0x00000572, 0x0000057d, - 0x00000588, 0x0000059c, 0x000005a8, 0x000005bd, - 0x000005c6, 0x000005e6, 0x00000608, 0x00000617, - 0x0000062b, 0x00000637, 0x00000664, 0x0000067c, - 0x00000696, 0x000006b6, 0x000006ec, -} // Size: 132 bytes - -const arData string = "" + // Size: 1772 bytes - "\x02خدمة %[1]s مكلفة التشغيل. لا يوجد حسابات أوفواتير لهذه الخدمة لأننا " + - "لا نريد أن نخزن معلومات شخصية عنك. و لكن اذا أردت لهذه الخدمة أن تستمر،" + - " قم بالتبرع على الأقل ب 5$ كل شهر.\x0a\x09\x0aهل تريد التبرع الآن؟\x02تب" + - "رَّع\x02%[1]s عبارة عن خدمة VPN سهلة وسريعة وآمنة من %[2]s. %[1]s لا يح" + - "تاج إلى حساب مستخدم أويحتفظ بسجلات أويراقبك بأى طريقة.\x0a\x09 \x0aه" + - "ذه الخدمة يتم تغطية تكاليفها بالكامل عن طريق التبرعات من مستخدمين مثلك." + - " من فضلك تبرع على %[3]s.\x0a\x09\x09\x0aباستخدامك لهذا التطبيق، انت تواف" + - "ق على شروط الخدمة المتاحة على %[4]s. هذه الخدمة مقدمة كما هى، بدون أى ض" + - "مانات، و هى موجهة للأشخاص الذين يعملون لجعل هذا العالم مكانا أفضل.\x0a" + - "\x0a\x0a%[1]v version: %[5]s\x02عن الخدمة\x02خطأ فى البدء\x02لم يجد البر" + - "نامج أداة الدخول (polkit). من فضلك شغل واحدة وحاول ثانية.\x02أداة الدخو" + - "ل للحساب مفقودة\x02لا يمكن الاتصال ببرنامج %[1]s: %[2]v\x02حدث خطأ فى ت" + - "شغيل VPN\x02جارى التحقق من الوضع...\x02تشغيل\x02إغلاق\x02المساعدة..." + - "\x02تبرع...\x02عن الخدمة...\x02خروج\x02مرور التواصل عبر:\x02استخدم مدخل " + - "%[1]s %[2]v\x02%[1]s يعمل\x02%[1]s لا يعمل\x02إلغاء \x02جارى الإتصال ببر" + - "نامج %[1]s\x02ينم ايقاف %[1]s\x02إعادة الاتصال\x02%[1]s يحجب الإنترنت" + - "\x02حدث خطأ أثناء بدء اتصال VPN: %[1]v" - -var bnIndex = []uint32{ // 27 elements - 0x00000000, 0x0000026e, 0x00000281, 0x000007a9, - 0x000007c2, 0x000007e5, 0x000008d9, 0x00000927, - 0x0000097a, 0x000009ca, 0x00000a11, 0x00000a25, - 0x00000a39, 0x00000a52, 0x00000a68, 0x00000a84, - 0x00000a91, 0x00000ae2, 0x00000b27, 0x00000b3a, - 0x00000b4d, 0x00000b5d, 0x00000b9d, 0x00000bc0, - 0x00000bdc, 0x00000c24, 0x00000c89, -} // Size: 132 bytes - -const bnData string = "" + // Size: 3209 bytes - "\x02%[1]s পরিষেবা চালানো বেশ ব্যয়বহুল। কারণ আমরা আপনার ব্যক্তিগত তথ্য স" + - "ংরক্ষণ করতে চাই না, এই পরিষেবাটির জন্য কোনো অ্যাকাউন্ট বা বিলিং নেই। ক" + - "িন্তু আপনি যদি পরিষেবা চালিয়ে যেতে চান তবে প্রতি মাসে কমপক্ষে $ 5 দান" + - " করুন।\x0a\x09\x0a আপনি কি এখন দান করতে চান?\x02অনুদান\x02%[1]s ভিপিএন প" + - "রিষেবা %[2]s থেকে সহজ, দ্রুত এবং নিরাপদ । %[1]s ব্যবহারকারীর কোন অ্যাক" + - "াউন্টের প্রয়োজন নেই। লগ রাখা অথবা যে কোনও উপায়ে আপনাকে ট্র্যাক করা হ" + - "য় না। \x0a\x0aএই পরিষেবাটি সম্পূর্ণরূপে আপনার মতো ব্যবহারকারীদের অনুদা" + - "নে পরিচালিত হয়। অনুগ্রহ করে দান করুন %[3]s\x0a\x0a এই অ্যাপ্লিকেশন ব্য" + - "বহার করে, আপনি %[4]s এ উপলব্ধ পরিষেবার শর্তাদির সাথে সম্মত হয়েছেন। এই " + - "পরিষেবাটি যেমনটি প্রদান করা হয়েছে, তাছাড়া কোনও ওয়্যারেন্টি নেই এবং এ" + - "টি এমন লোকদের জন্য তৈরি করা হয়েছে যারা পৃথিবীকে আরও সুন্দর করার জন্য " + - "কাজ করছে।\x0a\x0a\x0a %[1]v সংস্করণ: %[5]s\x02সম্পর্কে\x02সূচনা ত্রুটি" + - "\x02পোলকিট প্রমাণীকরণ এজেন্ট খুঁজে পাওয়া যায়নি. অনুগ্রহ করে একটি চালান" + - " এবং আবার চেষ্টা করুন ।\x02প্রমাণীকরণ এজেন্ট অনুপস্থিত\x02\u00a0%[1]s: %" + - "[2]v সাথে সংযোগ করতে পারবেন না\x02ভিপিএন চালু করতে ত্রুটি হয়েছে\x02অবস্থ" + - "া পরিক্ষা করা হচ্ছে ...\x02চালু কর\x02বন্ধ কর\x02সাহায্য...\x02অনুদান." + - "..\x02সম্পর্কে...\x02বন্ধ\x02ট্রাফিক যে মাধ্যমে চলাচল করবে:\x02%[1]s %[2" + - "]v গেটওয়ে ব্যবহার করুন\x02%[1]s চালু\x02%[1]s বন্ধ\x02বাতিল\x02%[1]s এর" + - " সাথে সংযুক্ত হচ্ছে\x02%[1]s বন্ধ হচ্ছে\x02পুনঃসংযোগ\x02%[1]s ইন্টারনেট " + - "প্রতিরোধ করছে\x02VPN আরম্ভ করার সময় একটি ত্রুটি ঘটেছে: %[1]v" - -var brIndex = []uint32{ // 27 elements - 0x00000000, 0x00000141, 0x00000150, 0x00000379, - 0x00000384, 0x00000396, 0x000003f4, 0x00000413, - 0x0000043b, 0x00000456, 0x00000470, 0x00000479, - 0x00000481, 0x0000048d, 0x0000049f, 0x000004ad, - 0x000004b5, 0x000004cb, 0x000004ea, 0x000004f8, - 0x00000505, 0x0000050d, 0x00000523, 0x00000532, - 0x0000053d, 0x00000559, 0x00000590, -} // Size: 132 bytes - -const brData string = "" + // Size: 1424 bytes - "\x02Servij %[1]s a zo ker-ruz da lakaat da vont en-dro. Dre ma ne fell k" + - "et deomp mirout titour personel ebet war ho penn, n'eus kont ebet faktur" + - "adur ebet evit ar servij-mañ. Met ma fellfe deoc'h e talc'hfe da vont wa" + - "r-raok ar raktres-mañ, roit deomp $5 da vihanañ pep miz.\x0a\x09\x0aHa f" + - "ellout a ra deoc'h reiñ arc'hant bremañ?\x02Reiñ arc'hant\x02%[1]s a zo " + - "ur servij VPN aes, fonnus, ha sur anezhañ graet gant %[2]s. %[1]s na c'h" + - "oulenn ket ur gont implijer, ne vir ket kennebeut war kavlec'hioù, ha ne" + - " heul ket ac'hanoc'h e nep doare.\x0a\x09 \x0aAr servij-mañ a zo paee" + - "t en un doare hollek gant implijerien egiztoc’h. Roit arc'hant mar plij " + - "amañ: %[3]s.\x0a\x09\x09\x0aEn ur implijout an arload-mañ, ec'h asantit " + - "d'an Termenoù Implij hegerz amañ: %[4]s. Ar servij-mañ a vez pourvezet e" + - "vel m'emañ, hep tamm gwarantiz ebet, ha graet evit an dud hag a labour e" + - "vit gwellaat hon flanedenn.\x0a\x0a%[1]v stumm: %[5]s\x02Diwar-benn\x02F" + - "azi deraouekadur\x02N'heller ket kavout ur gwazour anaout polkit. Lakait" + - " unan da vont ha klaskit en-dro mar plij.\x02Mankout a ra ur gwazour ana" + - "out\x02N'heller ket kevreañ ouzh %[1]s: %[2]v\x02Fazi en ur loc'hañ ar V" + - "PN\x02O wiriañ ar statudoù...\x02Enaouiñ\x02Lazhañ\x02Skoazell...\x02Rei" + - "ñ arc'hant...\x02Diwar-benn...\x02Kuitaat\x02Tremenerezh hent dre:\x02I" + - "mplijout %[1]s %[2]v treuzell\x02%[1]s enaouet\x02%[1]s lazhet\x02Nullañ" + - "\x02O kevreañ ouzh %[1]s\x02O paouez %[1]s\x02Adkevreañ\x02%[1]s a stank" + - " ar genrouedad\x02Ur fazi a zo c'hoarvezet en ur zeraouiñ ar VPN: %[1]v" - -var caIndex = []uint32{ // 27 elements - 0x00000000, 0x0000010b, 0x00000115, 0x0000032f, - 0x00000337, 0x0000034f, 0x000003a8, 0x000003c7, - 0x000003ee, 0x00000406, 0x00000424, 0x0000042b, - 0x00000435, 0x0000043e, 0x0000044b, 0x00000456, - 0x0000045f, 0x00000479, 0x000004a4, 0x000004bb, - 0x000004d5, 0x000004e0, 0x000004f3, 0x00000501, - 0x00000513, 0x00000533, 0x00000568, -} // Size: 132 bytes - -const caData string = "" + // Size: 1384 bytes - "\x02El servei %[1]s és car de mantenir. Com que no volem emmagatzemar in" + - "formació personal dels usuaris, no hi ha comptes ni sistema de facturaci" + - "ó en aquest servei. Però si voleu que el servei continuï, podeu donar a" + - "lmenys 5 USD al mes.\x0a\x09\x0aVoleu fer una donació ara?\x02Donacions" + - "\x02%[1]s és un servei de VPN fàcil, ràpid i segur de %[2]s. %[1]s no re" + - "quereix cap compte d'usuari, no manté registres, ni us fa cap mena de se" + - "guiment.\x09 Aquest servei es paga completament mitjançant donacions d'u" + - "suaris com vós. Si us plau, feu una donació fent un ingrès a %[3]s.\x09" + - "\x09Si utilitzeu aquesta aplicació, esteu acceptant els Termes del Serve" + - "i disponibles a %[4]s. Aquest servei es proveeix tal com és, sense cap g" + - "arantia, i està destinat a persones que treballen per fer del món un llo" + - "c millor. \x09Versió de %[1]v: %[5]s \x02Quant a\x02Error d'inicialitzac" + - "ió\x02No s'ha trobat cap agent d'autenticació de polkit. Executeu-ne un " + - "i torneu-ho a provar.\x02Falta un agent d'autenticació\x02No s'ha pogut " + - "connectar a %[1]s: %[2]v\x02Error en iniciar la VPN\x02S'està comprovant" + - " l'estat...\x02Activa\x02Desactiva\x02Ajuda...\x02Donacions...\x02Quant " + - "a...\x02Abandona\x02Encamina el trànsit per:\x02Utilitza la pasarel·la d" + - "e %[1]s de %[2]v \x02%[1]s està connectada\x02%[1]s està desconnectada" + - "\x02Cancel·la\x02Connectant a %[1]s\x02Aturant %[1]s\x02Torna a connecta" + - "r\x02%[1]s està bloquejant internet\x02S'ha produït un error en iniciali" + - "tzar el VPN: %[1]v" - -var deIndex = []uint32{ // 27 elements - 0x00000000, 0x00000134, 0x0000013c, 0x00000352, - 0x00000358, 0x00000370, 0x000003dc, 0x00000400, - 0x00000431, 0x0000044d, 0x00000464, 0x0000046f, - 0x0000047a, 0x00000483, 0x0000048e, 0x00000497, - 0x0000049f, 0x000004b9, 0x000004d4, 0x000004dd, - 0x000004e7, 0x000004f1, 0x00000503, 0x00000512, - 0x00000522, 0x00000549, 0x0000058b, -} // Size: 132 bytes - -const deData string = "" + // Size: 1419 bytes - "\x02Es ist kostspielig %[1]s zu betreiben. Da wir keine persönliche Date" + - "n über Sie speichern, gibt es keine Konten oder Rechnungen für diesen Se" + - "rvice. Wenn Sie uns ermöglichen möchten, dass wir diesen Service weiter " + - "anbieten können, spenden Sie bitte mindestens $5 pro Monat.\x0a\x09\x0aM" + - "öchten Sie jetzt spenden?\x02Spenden\x02%[1]s ist ein einfacher, schnel" + - "ler und sicherer VPN-Service von %[2]s.%[1]s benötigt kein Benutzerkonto" + - ", speichert keine Logdateien oder verfolgt Sie.\x0a\x09\x0aDieser Servic" + - "e wird komplett über Spenden von Benutzern wie Ihnen finanziert. Bitte s" + - "penden Sie unter %[3]s.\x0a\x09\x09\x0aDurch den Gebrauch der Anwendung " + - "stimmen Sie den Nuzungsbedingungen unter %[4]s zu. Dieser Service wird s" + - "o angeboten wie er ist, ohne Gewährlesitung, und ist für Menschen gemach" + - "t die daran arbeiten die Welt zu einem besseren Platz zu machen.\x0a\x0a" + - "\x0a%[1]v Version: %[5]s\x02Über\x02Initialisierungsfehler \x02Es konnte" + - " kein polkit Authentifizierungsmerkmal gefunden werden. Bitte dieses Sta" + - "rten und erneut versuchen.\x02Fehlendes Authentifizierungsmerkmal\x02Kan" + - "n Verbindung zu %[1]s nicht herstellen: %[2]v\x02Fehler beim Starten des" + - " VPN\x02Überprüfe Status ...\x02Anschalten\x02Auschalten\x02Hilfe…\x02Sp" + - "enden…\x02Über…\x02Beenden\x02Leite Datenverkehr über:\x02Benutze %[1]s " + - "%[2]v Portal\x02%[1]s an\x02%[1]s aus\x02Abbrechen\x02Verbinde zu %[1]s" + - "\x02Stoppe %[1]s\u00a0\x02Wiederverbinden\x02%[1]s blockiert die Interne" + - "tverbindung\x02Ein Fehler ist bei der Initialisierung des VPN aufgetrete" + - "n: %[1]v" - -var elIndex = []uint32{ // 27 elements - 0x00000000, 0x000001ee, 0x000001f9, 0x000005f6, - 0x00000605, 0x0000062d, 0x00000679, 0x00000696, - 0x000006db, 0x00000714, 0x0000073b, 0x00000754, - 0x00000771, 0x00000783, 0x00000791, 0x000007a3, - 0x000007b0, 0x000007e8, 0x0000081a, 0x0000083d, - 0x00000864, 0x00000873, 0x00000892, 0x000008bd, - 0x000008d6, 0x00000908, 0x00000973, -} // Size: 132 bytes - -const elData string = "" + // Size: 2419 bytes - "\x02Η υπηρεσία %[1]s είναι δαπανηρή. Επειδή δεν θέλουμε να αποθηκεύσουμε" + - " προσωπικές πληροφορίες σχετικά με εσάς, δεν υπάρχουν λογαριασμοί ή χρεώ" + - "σεις για αυτήν την υπηρεσία. Αλλά αν θέλετε να συνεχιστεί η υπηρεσία, δ" + - "ωρίστε τουλάχιστον $ 5 κάθε μήνα.\x0a\x0aΘέλετε να κάνετε δωρεά τώρα;" + - "\x02Δωρεά\x02Το %[1]s είναι μια εύκολη, γρήγορη και ασφαλής υπηρεσία VPN" + - " από το %[2]s. Το %[1]s δεν απαιτεί λογαριασμό χρήστη, διατηρεί αρχεία κ" + - "αταγραφής ή σας παρακολουθεί με οποιονδήποτε τρόπο.\x0a\u00a0\u00a0" + - "\u00a0\u00a0\x0aΑυτή η υπηρεσία χρηματοδοτείται εξ ολοκλήρου από δωρεές " + - "από χρήστες όπως εσείς. Παρακαλούμε κάντε μία δωρεά στο %[3]s.\x0a\x0aΧ" + - "ρησιμοποιώντας αυτήν την εφαρμογή, συμφωνείτε με τους Όρους Παροχής Υπη" + - "ρεσιών που είναι διαθέσιμοι στο %[4]s. Αυτή η υπηρεσία παρέχεται ως έχε" + - "ι, χωρίς καμία εγγύηση, και προορίζεται για άτομα που δουλεύουν για να " + - "κάνουν τον κόσμο ένα καλύτερο μέρος.\x0a\x0a\x0a%[1]v έκδοση: %[5]s\x02" + - "Σχετικά\x02Σφάλμα αρχικοποίησης\x02Could not find a polkit authenticati" + - "on agent. Please run one and try again.\x02Missing authentication agent" + - "\x02Δεν είναι δυνατή η σύνδεση στο %[1]s: %[2]v\x02Σφάλμα κατά την εκκίν" + - "ηση του VPN\x02Έλεγχος κατάστασης...\x02Ενεργοποίηση\x02Απενεργοποίηση" + - "\x02Βοήθεια...\x02Δωρεά...\x02Σχετικά...\x02Έξοδος\x02Δρομολόγηση κυκλοφ" + - "ορίας μέσω:\x02Χρήση πύλης δικτύου %[1]s %[2]v \x02%[1]s ενεργοποιημένο" + - "\x02%[1]s απενεργοποιημένο\x02Ακύρωση\x02Σύνδεση με το %[1]s\x02Γίνεται " + - "διακοπή του %[1]s\x02Επανασύνδεση\x02 %[1]s μπλοκάρει το διαδίκτυο\x02 " + - "Παρουσιάστηκε ένα σφάλμα κατά την αρχικοποίηση του VPN: %[1]v" - -var enIndex = []uint32{ // 27 elements - 0x00000000, 0x000000fe, 0x00000105, 0x000002d4, - 0x000002da, 0x000002ef, 0x0000033b, 0x00000358, - 0x00000376, 0x00000389, 0x0000039c, 0x000003a4, - 0x000003ad, 0x000003b5, 0x000003bf, 0x000003c8, - 0x000003cd, 0x000003e4, 0x000003fc, 0x00000405, - 0x0000040f, 0x00000416, 0x0000042a, 0x00000439, - 0x00000443, 0x0000045b, 0x0000048c, -} // Size: 132 bytes - -const enData string = "" + // Size: 1164 bytes - "\x02The %[1]s service is expensive to run. Because we don't want to stor" + - "e personal information about you, there are no accounts or billing for t" + - "his service. But if you want the service to continue, donate at least $5" + - " each month.\x0a\x09\x0aDo you want to donate now?\x02Donate\x02%[1]s is" + - " an easy, fast, and secure VPN service from %[2]s. %[1]s does not requir" + - "e a user account, keep logs, or track you in any way.\x0a\x09 \x0aThi" + - "s service is paid for entirely by donations from users like you. Please " + - "donate at %[3]s.\x0a\x09\x09\x0aBy using this application, you agree to " + - "the Terms of Service available at %[4]s. This service is provided as-is," + - " without any warranty, and is intended for people who work to make the w" + - "orld a better place.\x0a\x0a\x0a%[1]v version: %[5]s\x02About\x02Initial" + - "ization error\x02Could not find a polkit authentication agent. Please ru" + - "n one and try again.\x02Missing authentication agent\x02Can't connect to" + - " %[1]s: %[2]v\x02Error starting VPN\x02Checking status...\x02Turn on\x02" + - "Turn off\x02Help...\x02Donate...\x02About...\x02Quit\x02Route traffic th" + - "rough:\x02Use %[1]s %[2]v gateway\x02%[1]s on\x02%[1]s off\x02Cancel\x02" + - "Connecting to %[1]s\x02Stopping %[1]s\x02Reconnect\x02%[1]s blocking int" + - "ernet\x02An error has ocurred initializing the VPN: %[1]v" - -var en_GBIndex = []uint32{ // 27 elements - 0x00000000, 0x000000ff, 0x00000106, 0x000002d5, - 0x000002db, 0x000002f0, 0x0000033c, 0x00000359, - 0x00000377, 0x0000038a, 0x0000039d, 0x000003a5, - 0x000003ae, 0x000003b6, 0x000003c0, 0x000003c9, - 0x000003ce, 0x000003e5, 0x000003fd, 0x00000406, - 0x00000410, 0x00000417, 0x0000042b, 0x0000043a, - 0x00000444, 0x0000045c, 0x0000048d, -} // Size: 132 bytes - -const en_GBData string = "" + // Size: 1165 bytes - "\x02The %[1]s service is expensive to run. Because we don't want to stor" + - "e personal information about you, there are no accounts or billing for t" + - "his service. But if you want the service to continue, donate at least 4£" + - " each month.\x0a\x09\x0aDo you want to donate now?\x02Donate\x02%[1]s is" + - " an easy, fast, and secure VPN service from %[2]s. %[1]s does not requir" + - "e a user account, keep logs, or track you in any way.\x0a\x09 \x0aThi" + - "s service is paid for entirely by donations from users like you. Please " + - "donate at %[3]s.\x0a\x09\x09\x0aBy using this application, you agree to " + - "the Terms of Service available at %[4]s. This service is provided as-is," + - " without any warranty, and is intended for people who work to make the w" + - "orld a better place.\x0a\x0a\x0a%[1]v version: %[5]s\x02About\x02Initial" + - "isation error\x02Could not find a Polkit authentication agent. Please ru" + - "n one and try again.\x02Missing authentication agent\x02Can't connect to" + - " %[1]s: %[2]v\x02Error starting VPN\x02Checking status...\x02Turn on\x02" + - "Turn off\x02Help...\x02Donate...\x02About...\x02Quit\x02Route traffic th" + - "rough:\x02Use %[1]s %[2]v gateway\x02%[1]s on\x02%[1]s off\x02Cancel\x02" + - "Connecting to %[1]s\x02Stopping %[1]s\x02Reconnect\x02%[1]s blocking Int" + - "ernet\x02An error has ocurred initializing the VPN: %[1]v" - -var en_USIndex = []uint32{ // 27 elements - 0x00000000, 0x000000fe, 0x00000105, 0x000002d4, - 0x000002da, 0x000002ef, 0x0000033b, 0x00000358, - 0x00000376, 0x00000389, 0x0000039c, 0x000003a4, - 0x000003ad, 0x000003b5, 0x000003bf, 0x000003c8, - 0x000003cd, 0x000003e4, 0x000003fc, 0x00000405, - 0x0000040f, 0x00000416, 0x0000042a, 0x00000439, - 0x00000443, 0x0000045b, 0x0000048c, -} // Size: 132 bytes - -const en_USData string = "" + // Size: 1164 bytes - "\x02The %[1]s service is expensive to run. Because we don't want to stor" + - "e personal information about you, there are no accounts or billing for t" + - "his service. But if you want the service to continue, donate at least $5" + - " each month.\x0a\x09\x0aDo you want to donate now?\x02Donate\x02%[1]s is" + - " an easy, fast, and secure VPN service from %[2]s. %[1]s does not requir" + - "e a user account, keep logs, or track you in any way.\x0a\x09 \x0aThi" + - "s service is paid for entirely by donations from users like you. Please " + - "donate at %[3]s.\x0a\x09\x09\x0aBy using this application, you agree to " + - "the Terms of Service available at %[4]s. This service is provided as-is," + - " without any warranty, and is intended for people who work to make the w" + - "orld a better place.\x0a\x0a\x0a%[1]v version: %[5]s\x02About\x02Initial" + - "ization error\x02Could not find a polkit authentication agent. Please ru" + - "n one and try again.\x02Missing authentication agent\x02Can't connect to" + - " %[1]s: %[2]v\x02Error starting VPN\x02Checking status...\x02Turn on\x02" + - "Turn off\x02Help...\x02Donate...\x02About...\x02Quit\x02Route traffic th" + - "rough:\x02Use %[1]s %[2]v gateway\x02%[1]s on\x02%[1]s off\x02Cancel\x02" + - "Connecting to %[1]s\x02Stopping %[1]s\x02Reconnect\x02%[1]s blocking int" + - "ernet\x02An error has ocurred initializing the VPN: %[1]v" - -var esIndex = []uint32{ // 27 elements - 0x00000000, 0x0000012a, 0x0000012f, 0x0000033f, - 0x00000349, 0x00000362, 0x000003c9, 0x000003eb, - 0x0000040e, 0x00000426, 0x0000043f, 0x00000448, - 0x0000044f, 0x00000458, 0x00000460, 0x0000046d, - 0x00000474, 0x00000493, 0x000004b3, 0x000004c3, - 0x000004d1, 0x000004da, 0x000004ed, 0x00000504, - 0x00000516, 0x00000530, 0x0000055e, -} // Size: 132 bytes - -const esData string = "" + // Size: 1374 bytes - "\x02El servicio %[1]s es costoso de mantener. Debido a que no queremos a" + - "lmacenar información personal sobre los usuarios, no hay cuentas ni sist" + - "ema de facturación en este servicio. Pero si deseas que el servicio cont" + - "inúe, puedes donar al menos 5 USD al mes.\x0a\x09\x0a¿Quieres realizar l" + - "a donación ahora?\x02Dona\x02%[1]s es un servicio de VPN fácil, rápido, " + - "y seguro de %[2]s. %[1]s no requiere una cuenta de usuario, no mantiene " + - "registros, ni te rastrea de ninguna manera.\x0a\x09 \x0aEste servicio" + - " se paga en su totalidad por donaciones de usuarios como tú. Por favor d" + - "ona ingresando a %[3]s.\x0a\x09\x09\x0aAl usar esta aplicación, acuerdas" + - " con los Términos del Servicio disponibles en %[4]s. Este servicio se pr" + - "ovee como viene, sin garantía alguna, y está destinado a gente que traba" + - "ja para hacer del mundo un lugar mejor.\x0a\x0a\x0aVersión de %[1]v: %[5" + - "]s\x02Acerca de\x02Error de inicialización\x02No se pudo encontrar ningú" + - "n agente de autenticacion de polkit. Por favor lanza uno y prueba de nue" + - "vo.\x02Falta un agente de autenticación\x02No puedo conectar con %[1]s: " + - "%[2]v\x02Error al iniciar la VPN\x02Comprobando el estado...\x02Encender" + - "\x02Apagar\x02Ayuda...\x02Dona...\x02Acerca de...\x02Cerrar\x02Enrutar t" + - "ráfico a través de:\x02Usa la salida de %[1]s de %[2]v\x02%[1]s encendid" + - "a\x02%[1]s apagada\x02Cancelar\x02Conectando a %[1]s\x02Desconectando de" + - " %[1]s\x02Volver a conectar\x02%[1]s bloqueando internet\x02Ha ocurrido " + - "un error al iniciar la VPN: %[1]v" - -var es_ESIndex = []uint32{ // 27 elements - 0x00000000, 0x000000ec, 0x000000f2, 0x00000313, - 0x0000031d, 0x00000336, 0x00000397, 0x000003b6, - 0x000003da, 0x000003ee, 0x00000404, 0x0000040c, - 0x00000417, 0x00000420, 0x00000429, 0x00000436, - 0x0000043c, 0x0000045b, 0x0000047b, 0x0000048a, - 0x0000049c, 0x000004a5, 0x000004b8, 0x000004c9, - 0x000004d4, 0x000004ee, 0x0000051f, -} // Size: 132 bytes - -const es_ESData string = "" + // Size: 1311 bytes - "\x02Correr el servicio %[1]s es caro. Porque no queremos almacenar infor" + - "mación personal acerca tuyo, no hay cuentas o tarifas por este servicio." + - " Pero si quieres que el mismo continúe, dona al menos USD 5 por mes.\x0a" + - "\x09\x0a¿Quieres donar ahora?\x02Donar\x02%[1]s es un servicio de VPN fá" + - "cil, rápido y seguro de %[2]s. %[1]s no requiere una cuenta de usuario, " + - "no mantiene bitácoras, o te rastrea de cualquier manera.\x0a\x09 \x0a" + - "El costo de este servicio está cubierto por completo por donaciones de u" + - "suarios como tú. Por favor dona a %[3]s.\x0a\x09\x09\x0aAl usar esta apl" + - "icación, estás de acuerdo con los Términos del Servicio disponibles en %" + - "[4]s. Este servicio se provee tal cual, sin ninguna garantía, y está apu" + - "ntado a personas que trabajan para hacer del mundo un mejor lugar.\x0a" + - "\x0a\x0aVersión de %[1]v: %[5]s\x02Acerca de\x02Error de inicialización" + - "\x02No se pudo encontrar un agente de autenticación polkit. Por favor co" + - "rre uno e intenta de nuevo.\x02Falta agente de autenticación\x02No se pu" + - "ede conectar a %[1]s: %[2]v\x02Error iniciando VPN\x02Comprobando estado" + - "...\x02Activar\x02Desactivar\x02Ayuda...\x02Donar...\x02Acerca de...\x02" + - "Salir\x02Enrutar tráfico a través de:\x02Usar ruta de salida %[1]s %[2]v" + - "\x02%[1]s activada\x02%[1]s desactivada\x02Cancelar\x02Conectando a %[1]" + - "s\x02Deteniendo %[1]s\x02Reconectar\x02%[1]s bloqueando Internet\x02Ha o" + - "currido un error inicializando la VPN: %[1]v" - -var euIndex = []uint32{ // 27 elements - 0x00000000, 0x000000fd, 0x0000010c, 0x0000033c, - 0x00000347, 0x0000035c, 0x000003b7, 0x000003d7, - 0x000003fb, 0x00000415, 0x0000042b, 0x00000434, - 0x00000440, 0x0000044c, 0x0000045e, 0x0000046c, - 0x00000472, 0x00000494, 0x000004b1, 0x000004c2, - 0x000004d6, 0x000004db, 0x000004f2, 0x00000502, - 0x0000050f, 0x00000529, 0x00000558, -} // Size: 132 bytes - -const euData string = "" + // Size: 1368 bytes - "\x02%[1]s zerbitzua mantentzea garestia da. Zure datu pertsonalak gorde " + - "nahi ez ditugulako, ez dago inolako konturik sortu beharrik edo tarifari" + - "k. Hala ere zerbitzua jarraitzea nahi baduzu, 5$eko dohaintza egin hilab" + - "etero.\x0a\x09\x0aDohaintza egin nahi duzu orain?\x02Dohaintza egin\x02%" + - "[1]s erraza, azkarra eta segurua den VPN zerbitzua da, %[2]s(e)k eskaini" + - "a. %[1]s(e)k ez du erabiltzaile kontu baten beharra, ez ditu datu pribat" + - "uak gordetzen eta zaitu inolako jarraipenik egiten.\x0a\x09 \x0aZerbi" + - "tzua zu bezalako erabiltzaileen dohaintzez mantentzen da. Dohaintza egin" + - " hemen, mesedez: %[3]s.\x0a\x09\x09\x0aAplikazio hau erabilita, %[4]s he" + - "lbideko zerbitzu-baldintzak onartzen dituzu. Zerbitzu hau eskuratu duzun" + - " bezala hornitzen da, inolako bermerik gabe, eta mundu hau leku hobe bat" + - " bihurtzeko lan egiten dutenentzat bideratuta dago.\x0a\x0a\x0a%[1]v ber" + - "tsioa: %[5]s\x02Honi buruz\x02Errorea habiaraztean\x02Ezin da polkit aut" + - "entifikazio agente bat bilatu. Mesedez, exekutatu bat eta berria saiatu." + - "\x02Autentifikazio agentea falta da\x02Ezin da %[1]s(e)ra konektatu: %[2" + - "]v\x02Errorea VPNa habiaraztean\x02Egiaztatzen egoera...\x02Aktibatu\x02" + - "Desaktibatu\x02Laguntza...\x02Dohaintza egin...\x02Honi buruz...\x02Irte" + - "n\x02Bideratu trafikoa honen bitartez:\x02Erabili %[1]s %[2]v atebidea" + - "\x02%[1]s aktibatuta\x02%[1]s desaktibatuta\x02Utzi\x02%[1]s(e)ra konekt" + - "atzen\x02%[1]s gelditzen\x02Birkonektatu\x02%[1]s internet blokeatzen" + - "\x02Errore bat gertatu da VPNa habiaraztean: %[1]v" - -var fa_IRIndex = []uint32{ // 27 elements - 0x00000000, 0x000001ca, 0x000001df, 0x00000578, - 0x0000058e, 0x000005ae, 0x00000638, 0x00000665, - 0x000006a1, 0x000006c5, 0x000006e1, 0x000006f3, - 0x00000707, 0x00000714, 0x00000729, 0x0000073f, - 0x00000748, 0x00000775, 0x000007a7, 0x000007b6, - 0x000007c7, 0x000007d4, 0x000007ea, 0x00000804, - 0x00000818, 0x00000841, 0x00000880, -} // Size: 132 bytes - -const fa_IRData string = "" + // Size: 2176 bytes - "\x02سرویس %[1]s برای اجرا گران است. به این دلیل که ما نمی\u200cخواهیم اط" + - "لاعات شخصی شما را ذخیره کنیم، حساب کاربری یا صورت حساب برای این سرویس و" + - "جود ندارد. ولی اگر مایل هستید که این سرویس ادامه داشته باشد، حداقل ماهی" + - " ۵ دلار به ما کمک کنید\x0a\x09\x0aماید هستید که الان کمک کنید؟\x02حمایت " + - "از ما\x02نرم\u200cافزار %[1]s یک سرویس VPN اسان، سریع و امن از %[2]s اس" + - "ت. نرم\u200cافزار %[1]s نیاز به حساب کاربری ندارد، لاگ فعالیت کاربر یا " + - "فعالیت\u200cهای شما را ذخیره نمی\u200cکند\x0a\x09\x0aهزینه\u200cهای این" + - " سرویس به شکل کامل از کمک\u200cهای مالی کاربرانی مانند شما تأمین می" + - "\u200cشود. لطفاً از طریق آدرس %[3]s به ما کمک مالی کنید.\x0a\x09\x09\x0a" + - "با استفاده از این نرم\u200cافزار، شما با شرایط خدمات که در آدرس %[4]s د" + - "ر دسترس است موافقت می\u200cکنید. یان سرویس به شکلی که هست و بدون هیچگون" + - "ه گارانتی ارائه می\u200cگردد، و برای افرادی است که برای اینکه دنیا جای " + - "بهتری باشد تلاش می\u200cکنند\x0a\x0a\x0a%[1]v نسخه: %[5]s\x02\u202b" + - "\u202bدرباره\u202c\x02خطا در راه اندازی\x02عامل تأیید هویت polkit در دست" + - "رس نیست. لطفاً یکی را اجرا کنید و مجدد امتحان کنید.\x02عامل تأیید هویت " + - "پیدا نشد\x02امکان اتصال به %[1]s وجود ندارد: %[2]v\x02خطا در راه اندازی" + - " VPN\x02چک کردن وضعیت...\x02روشن کردن\x02خاموش کردن\x02راهنما\x02حمایت ا" + - "ز ما\x02\u202b\u202bدرباره\u202c\x02خروج\x02مسیریابی ترافیک از طریق:" + - "\x02از دروازه %[1]s %[2]v استفاده کن\x02%[1]s روشن\x02%[1]s خاموش\x02انص" + - "راف\x02اتصال به %[1]s\x02متوقف کردن %[1]s\x02اتصال مجدد\x02%[1]s مسدود " + - "کردن اینترنت\x02خطایی در راه\u200cاندازی VPN روی داد: %[1]v" - -var frIndex = []uint32{ // 27 elements - 0x00000000, 0x00000154, 0x00000161, 0x000003a6, - 0x000003b0, 0x000003ca, 0x0000042c, 0x00000458, - 0x00000485, 0x000004a1, 0x000004bf, 0x000004c7, - 0x000004d3, 0x000004db, 0x000004eb, 0x000004f8, - 0x00000500, 0x0000051b, 0x0000053f, 0x00000551, - 0x00000567, 0x0000056f, 0x00000582, 0x00000592, - 0x000005a1, 0x000005b7, 0x000005fa, -} // Size: 132 bytes - -const frData string = "" + // Size: 1530 bytes - "\x02L’exploitation du service %[1]s coûte cher. Dans la mesure où ne nou" + - "s voulons enregistrer aucun renseignement personnel à votre sujet, il n’" + - "y ni compte ni facturation pour ce service. Mais si vous souhaitez toute" + - "fois que le service continue, faites un don d’au moins 5\u00a0$ mensuell" + - "ement\x0a\x09\x0aSouhaitez-vous faire un don maintenant\u2009?\x02Faire " + - "un don\x02%[1]s est un service de RPV simple, rapide et sécurisé offert " + - "par %[2]s. %[1]s n’exige pas de compte utilisateur, ne conserve pas de j" + - "ournaux, ni ne vous suit à la trace d’aucune façon.\x0a\x09 \x0aCe se" + - "rvice est entièrement financé par les dons d’utilisateurs comme vous. Ve" + - "uillez faire un don sur %[3]s.\x0a\x09\x09\x0aEn utilisant cette applica" + - "tion, vous acceptez les conditions générales d’utilisation qui se trouve" + - "nt sur %[4]s. Ce service est fourni tel quel, sans aucune garantie et s’" + - "adresse aux personnes qui œuvrent à rendre le monde meilleur.\x0a\x0a" + - "\x0a%[1]v version \u00a0: %[5]s\x02À propos\x02Erreur d’initialisation" + - "\x02Impossible de trouver un agent d’authentification polkit. Veuillez e" + - "n exécuter un et ressayer.\x02L’agent d’authentification est manquant" + - "\x02Impossible de se connecter à %[1]s\u00a0: %[2]v\x02Erreur du démarra" + - "ge du RPV\x02Vérification de l’état…\x02Activer\x02Désactiver\x02Aide…" + - "\x02Faire un don…\x02À propos…\x02Quitter\x02Acheminer le trafic par" + - "\u00a0:\x02Utiliser la passerelle %[1]s %[2]v\x0a\x02%[1]s est activé" + - "\x02%[1]s est désactivé\x02Annuler\x02Connexion à %[1]s\x02Arrêt de %[1]" + - "s\x02Se reconnecter\x02%[1]s bloque Internet\x02Une erreur est survenue " + - "lors de l’initialisation du RPV\u00a0: %[1]v" - -var heIndex = []uint32{ // 27 elements - 0x00000000, 0x00000144, 0x0000014d, 0x000003d5, - 0x000003e0, 0x000003f6, 0x00000458, 0x00000473, - 0x000004a0, 0x000004bc, 0x000004d1, 0x000004da, - 0x000004e1, 0x000004ed, 0x000004f9, 0x00000507, - 0x0000050c, 0x00000528, 0x00000548, 0x00000557, - 0x00000566, 0x0000056d, 0x00000583, 0x00000597, - 0x000005ab, 0x000005c9, 0x000005f9, -} // Size: 132 bytes - -const heData string = "" + // Size: 1529 bytes - "\x02השירות %[1]s הוא יקר לתפעול. מאחר שאיננו רוצים לאחסן מידע אישי לגביך" + - ", אין חשבונות או חיוב עבור שירות זה. אבל אם אתה רוצה שהשירות ימשיך, תרום" + - " לפחות $5 כל חודש.\x0a\x09\x0aהאם אתה רוצה לתרום עכשיו?\x02תרום\x02%[1]s" + - " הוא שירות VPN קל, מהיר ומאובטח מאת %[2]s. %[1]s אינו דורש חשבון משתמש, " + - "אינו שומר יומנים או עוקב אחריך בדרך כלשהי.\x0a\x09 \x0aשירות זה משול" + - "ם לגמרי ע״י תרומות ממשתמשים כמוך. אנא תרום בכתובת %[3]s.\x0a\x09\x09" + - "\x0aע״י שימוש ביישום זה, אתה מסכים אל תנאיי השירות הזמינים בכתובת %[4]s." + - " שירות זה מסופק כפי שהוא, ללא אחריות כלשהי, והוא מיועד לאנשים שפועלים לה" + - "פוך את העולם למקום טוב יותר.\x0a\x0a\x0a%[1]v גרסה: %[5]s\x02אודות\x02ש" + - "גיאת התחלה\x02לא היה ניתן למצוא סוכן אימות Polkit. אנא הרץ אחד ונסה שוב" + - ".\x02סוכן אימות חסר\x02לא ניתן להתחבר אל %[1]s: %[2]v\x02שגיאה בהתחלת VP" + - "N\x02בודק מעמד…\x02הפעל\x02כבה\x02עזרה…\x02תרום…\x02אודות…\x02צא\x02נתב " + - "תעבורה דרך:\x02השתמש בשער %[1]s %[2]v\x02%[1]s פועל\x02%[1]s כבוי\x02בט" + - "ל\x02מתחבר אל %[1]s\x02עוצר את %[1]s\x02התחבר מחדש\x02%[1]s חוסם אינטרנ" + - "ט\x02שגיאה התרחשה בהתחלת VPN: %[1]v" - -var huIndex = []uint32{ // 27 elements - 0x00000000, 0x0000010f, 0x0000011b, 0x00000367, - 0x00000370, 0x00000386, 0x000003e2, 0x00000405, - 0x0000042e, 0x00000448, 0x00000462, 0x0000046f, - 0x0000047c, 0x00000486, 0x00000495, 0x000004a1, - 0x000004ab, 0x000004cf, 0x000004f3, 0x00000505, - 0x00000517, 0x0000051f, 0x00000545, 0x00000568, - 0x0000057a, 0x00000598, 0x000005ca, -} // Size: 132 bytes - -const huData string = "" + // Size: 1482 bytes - "\x02A %[1]s szolgáltatás futtatása drága. Mivel nem szeretnénk Önről ada" + - "tot tárolni, azért nincsen fiók és számlázás ehhez a szolgáltatáshoz. Ha" + - " szeretné, hogy a szolgáltatás folytatodjék, támogasson legalább 5$-ral " + - "havonta.\x0a\x09\x0aSzeretne támogatni most?\x02Támogatás\x02A %[1]s egy" + - " egyszerű, biztonságos VPN szolgáltatás a(z) %[2]s szolgáltatótó. A %[1" + - "]s nem igényel felhasználói fiókot, logot őrizzen, vagy kövesse Önt bárm" + - "iképp.\x0a\x09 \x0aEz a szolgáltatás kizárólag a támogatásokból fizet" + - "ett olyan felhasználók által, mint Ön. Kérjük támogasson a következő lin" + - "ken %[3]s.\x0a\x09\x09\x0aAz alkalmazás használatával elfogadja a Felhas" + - "ználási feltételeket, amik itt elérhetők: %[4]s. Ez a szolgáltatás as-is" + - " biztosított, bármiféle garancia nélkül, azok számára, akik a világot jo" + - "bbá akarják tenni.\x0a\x0a\x0a%[1]v verzió: %[5]s\x02Névjegy\x02Iniciali" + - "zációs hiba\x02Nem található polkit azonosító ügynök. Kérjük futtasson e" + - "gyet és próbálja újra.\x02Hiányzó autentikációs ügynök\x02Sikertelen a c" + - "satlakozás - %[1]s: %[2]v\x02VPN indítása sikertelen\x02Állapot ellenőrz" + - "ése...\x02Bekapcsolás\x02Kikapcsolás\x02Súgó...\x02Támogatás...\x02Névj" + - "egy...\x02Kilépés\x02Forgalom routolás ezen keresztül:\x02A %[1]s %[2]v " + - "átjáró használata\x02%[1]s bekapcsolva\x02%[1]s kikapcsolva\x02Mégsem" + - "\x02Kapcsolódás alkalmazáshoz - %[1]s \x02Alkalmazás leállítása - %[1]s " + - "\x02Újracsatlakozás\x02%[1]s blokkolja az internetet\x02Hiba történt a V" + - "PN inicializálásánál: %[1]v" - -var itIndex = []uint32{ // 27 elements - 0x00000000, 0x0000010a, 0x0000010f, 0x00000310, - 0x0000031d, 0x0000033a, 0x000003a3, 0x000003c5, - 0x000003ed, 0x00000409, 0x00000422, 0x0000042a, - 0x00000431, 0x0000043a, 0x00000442, 0x00000452, - 0x00000457, 0x00000477, 0x00000492, 0x0000049f, - 0x000004ac, 0x000004b4, 0x000004c8, 0x000004d7, - 0x000004e2, 0x0000050c, 0x0000054e, -} // Size: 132 bytes - -const itData string = "" + // Size: 1358 bytes - "\x02Il servizio %[1]s è costoso da mantenere. Poichè non vogliamo immaga" + - "zzinare informazioni personali su di te non ci sono account ne tariffe p" + - "er l'utilizzo del servizio. Se vuoi puoi però aiutarci a mantenere il se" + - "rvizio in funzione donando dai $5 in su ogni mese.\x02Dona\x02%[1]s è un" + - " servizio di VPN facile, veloce e sicuro di %[2]s. %[1]s non richiede un" + - " account utente, non mantiene i log e non ti traccia in nessuna maniera." + - "\x0a\x0aIl servizio è interamente mantenuto da donazioni di utenti come " + - "te. Per favore dona qui: %[3]s.\x0a\x0aUtilizzando questa applicazione, " + - "approvi i Termini di Servizio disponibili qui: %[4]s. Questo servizio è " + - "fornito così com'è, senza nessuna garanzia, ed è destinato alle persone " + - "che lavorano per rendere il mondo un posto migliore.\x0a\x0a\x0a%[1]v ve" + - "rsione: %[5]s\x02Informazioni\x02Errore nell'inizializzazione\x02Non è s" + - "tato possibile trovare un agente di autenticazione polkit. Si prega di a" + - "vviarne uno e riprovare.\x02Agente di autenticazione mancante\x02Impossi" + - "bile connettersi ad %[1]s: %[2]v\x02Errore nell'avvio della VPN\x02Contr" + - "ollando lo stato...\x02Accendi\x02Spegni\x02Aiuto...\x02Dona...\x02Infor" + - "mazioni...\x02Esci\x02Inoltra il traffico attraverso:\x02Usa il gateway " + - "%[1]s %[2]v\x02%[1]s accesa\x02%[1]s spenta\x02Annulla\x02Connettendo a " + - "%[1]s\x02Fermando %[1]s\x02Riconnetti\x02%[1]s sta bloccando l'accesso a" + - "d internet\x02Si è verificato un errore nell'inizializzazione della VPN:" + - " %[1]v" - -var ltIndex = []uint32{ // 27 elements - 0x00000000, 0x0000013d, 0x00000146, 0x00000364, - 0x00000369, 0x0000037c, 0x000003e3, 0x00000408, - 0x00000431, 0x00000449, 0x0000045e, 0x00000467, - 0x00000471, 0x0000047c, 0x00000488, 0x00000490, - 0x00000498, 0x000004b8, 0x000004dd, 0x000004ec, - 0x000004fc, 0x00000507, 0x0000051d, 0x0000052c, - 0x00000542, 0x0000055c, 0x00000583, -} // Size: 132 bytes - -const ltData string = "" + // Size: 1411 bytes - "\x02%[1]s paslaugą brangiai kainuoja išlaikyti. Kadangi nenorime laikyti" + - " jūsų asmeninės informacijos, todėl nėra jokių paskyrų ar apmokestinimo " + - "už šią paslaugą. Tačiau, jei norite, kad paslauga būtų teikiama ir tolia" + - "u, paaukokite kiekvieną mėnesį bent po $5 (JAV dolerius).\x0a\x09\x0aAr " + - "norite paaukoti dabar?\x02Paaukoti\x02%[1]s yra lengva naudoti, greita i" + - "r saugi VPN paslauga iš %[2]s. %[1]s nereikalauja naudotojo paskyros, ne" + - "saugo žurnalų ir jokiu kitu būdu jūsų neseka.\x0a\x09 \x0aŠi paslauga" + - " yra apmokama tik iš, tokių pačių naudotojų kaip jūs, paaukojimų. Prašom" + - "e paaukokite, adresu %[3]s.\x0a\x09\x09\x0aNaudodami šią programą, sutin" + - "kate su Naudojimosi Sąlygomis, kurias galite rasti adresu %[4]s. Ši pasl" + - "auga yra teikiama esamu pavidalu, be jokių garantijų ir yra skirta žmonė" + - "ms, kurie dirba, kad padarytų pasaulį geresnį.\x0a\x0a\x0a%[1]v versija:" + - " %[5]s\x02Apie\x02Inicijavimo klaida\x02Nepavyko rasti politikos rinkini" + - "o tapatybės nustatymo agento. Paleiskite jį ir bandykite dar kartą.\x02T" + - "rūksta tapatybės nustatymo agento\x02Nepavyksta prisijungti prie %[1]s: " + - "%[2]v\x02Klaida paleidžiant VPN\x02Tikrinama būsena...\x02Įjungti\x02Išj" + - "ungti\x02Pagalba...\x02Paaukoti...\x02Apie...\x02Išeiti\x02Nukreipti duo" + - "menų srautą per:\x02Naudoti %[1]s %[2]v tinklų sietuvą\x02%[1]s įjungta" + - "\x02%[1]s išjungta\x02Atsisakyti\x02Jungiamasi prie %[1]s\x02Stabdoma %[" + - "1]s\x02Prisijungti iš naujo\x02%[1]s blokuoja internetą\x02Inicijuojant " + - "VPN, įvyko klaida: %[1]v" - -var nlIndex = []uint32{ // 27 elements - 0x00000000, 0x0000010c, 0x00000114, 0x0000032b, - 0x00000330, 0x00000342, 0x00000391, 0x000003ae, - 0x000003d2, 0x000003f4, 0x0000040a, 0x00000416, - 0x00000423, 0x0000042b, 0x00000436, 0x0000043e, - 0x00000446, 0x0000045a, 0x00000476, 0x00000480, - 0x0000048a, 0x00000494, 0x000004a8, 0x000004be, - 0x000004d0, 0x000004ed, 0x00000537, -} // Size: 132 bytes - -const nlData string = "" + // Size: 1335 bytes - "\x02De %[1]s dienst is kostbaar om te onderhouden. Omdat we geen persoon" + - "lijke informatie over u willen bijhouden, zijn er geen accounts of betal" + - "ingen voor deze dienst. Om deze dienst in leven te houden, overweeg ten " + - "minste €5 per maand te schenken.\x0a\x09\x0aWilt u nu doneren?\x02Donere" + - "n\x02%[1]s is een gemakkelijke, snelle en veilige VPN-dienst van %[2]s. " + - "%[1]s vereist geen gebruikersaccount, houdt geen logboek bij en volgt u " + - "niet op wat voor manier dan ook.\x0a\x09 \x0aDeze dienst wordt volled" + - "ig gefinancierd door donaties van gebruikers zoals u. Gelieve bij te dra" + - "gen op %[3]s.\x0a\x09\x09\x0aDoor deze applicatie te gebruiken, gaat u a" + - "kkoord met onze gebruikersvoorwaarden die beschikbaar zijn op %[4]s. Dez" + - "e dienst wordt geleverd zonder enige garantie en is bedoeld voor mensen " + - "die werken aan een betere wereld. \x0a\x0a\x0a%[1]v versie: %[5]s\x02Ove" + - "r\x02Initialisatiefout\x02Kan geen polkit authenticatieagent vinden. Voe" + - "r er een uit en probeer opnieuw.\x02Authenticatieagent ontbreekt\x02Kan " + - "niet verbinden met %[1]s: %[2]v\x02Fout bij het opstarten van de VPN\x02" + - "Status controleren...\x02Inschakelen\x02Uitschakelen\x02Hulp...\x02Doner" + - "en...\x02Over...\x02Stoppen\x02Route verkeer door:\x02Gebruik %[1]s %[2]" + - "v gateway\x02%[1]s aan\x02%[1]s uit\x02Annuleren\x02Verbinden met %[1]s" + - "\x02%[1]s aan het stoppen\x02Opnieuw verbinden\x02%[1]s blokkeert het in" + - "ternet\x02Er heeft zich een fout voorgedaan bij het initialiseren van de" + - " VPN: %[1]v" - -var plIndex = []uint32{ // 27 elements - 0x00000000, 0x00000112, 0x0000011c, 0x00000331, - 0x00000340, 0x00000353, 0x000003a6, 0x000003c3, - 0x000003e9, 0x00000408, 0x0000041c, 0x00000424, - 0x0000042d, 0x00000436, 0x00000442, 0x00000451, - 0x00000459, 0x00000479, 0x00000491, 0x000004a2, - 0x000004b4, 0x000004bb, 0x000004ce, 0x000004e2, - 0x000004f4, 0x0000050b, 0x0000053c, -} // Size: 132 bytes - -const plData string = "" + // Size: 1340 bytes - "\x02Utrzymywanie %[1]s jest kosztowne. Ponieważ nie chcemy przechowywać " + - "danych osobowych o Tobie, nie ma kont ani rozliczeń za tę usługę. Ale je" + - "śli chcesz, aby usługa była kontynuowana, przekazuj co najmniej 5 USD m" + - "iesięcznie.\x0aCzy chcesz teraz przekazać darowiznę?\x0a\x02Darowizna" + - "\x02%[1]s to łatwy, szybki i bezpieczny VPN od %[2]s. %[1]s nie wymaga k" + - "onta użytkownika, nie przechowuje logów, czy śledzi Cię w jakikolwiek sp" + - "osób.\x0a\x09\x0aTa usługa jest opłacana w całości przez darowizny od ta" + - "kich użytkowników jak Ty. Przekaż darowiznę na %[3]s.\x0a\x09\x09\x0aUży" + - "wając tej aplikacji zgadzasz się na Zasady Użytkowania dostępne na %[4]s" + - ". Usługa jest dostępna taka-jaka-jest bez żadnej gwarancji i jest zamier" + - "zona dla ludzi, którzy pracują nad tym, aby świat stał się lepszym miejs" + - "cem.\x0a\x0a\x0a%[1]v wersja: %[5]s\x02O programie...\x02Błąd inicjowani" + - "a\x02Nie znaleziono agenta autentykacji polkit. Proszę uruchom go i spró" + - "buj ponownie.\x02Brakujący agent autoryzacji\x02Nie można połączyć z %[1" + - "]s: %[2]v\x02Błąd przy uruchamianiu VPN'a\x02Sprawdzanie statusu\x02Włąc" + - "z\x02Wyłącz\x02Pomoc...\x02Wesprzyj...\x02O programie...\x02Zamknij\x02P" + - "rzekieruj ruch sieciowy przez:\x02Użyj bramy %[2]v %[1]s\x02%[1]s włączo" + - "ny\x02%[1]s wyłączony\x02Anuluj\x02Łączenie z %[1]s\x02Zatrzymywanie %[1" + - "]s\x02Połącz ponownie\x02%[1]s blokuje internet\x02Powstał błąd podczas " + - "inicjowania VPN'a: %[1]v" - -var pt_BRIndex = []uint32{ // 27 elements - 0x00000000, 0x00000139, 0x0000014c, 0x0000037a, - 0x00000380, 0x00000398, 0x00000409, 0x00000434, - 0x0000045e, 0x00000474, 0x0000048a, 0x00000490, - 0x00000499, 0x000004a2, 0x000004b8, 0x000004c1, - 0x000004c6, 0x000004dd, 0x000004fb, 0x0000050e, - 0x00000524, 0x0000052d, 0x00000540, 0x0000054e, - 0x00000559, 0x0000057b, 0x000005ad, -} // Size: 132 bytes - -const pt_BRData string = "" + // Size: 1453 bytes - "\x02O serviço %[1]s tem um custo para ser mantido. Como não queremos col" + - "etar as suas informações pessoais, não temos contas de usuário e não cob" + - "ramos por este serviço. Mas se você quiser que este serviço continue, fa" + - "ça uma doação de ao menos $5 dólares por mês.\x0a\x09\x0aVocê quer faze" + - "r uma doação agora? \x02Fazer uma doação\x02 %[1]s é um serviço de VPN f" + - "ácil, rápido e seguro mantido por %[2]s. %[1]s não precisa de uma conta" + - " de usuário, não mantém logs, e não te rastreia de forma alguma. \x0a" + - "\x09\x0aO serviço é financiado inteiramente através de doações de pessoa" + - "s como você. Por favor faça uma doação acessando %[3]s\x0a\x09\x09\x0aAo" + - " usar este aplicativo, você concorda com os Termos de Serviço disponívei" + - "s em %[4]s. Este serviço é provido \x22no estado\x22, sem nenhuma garant" + - "ia, e é direcionado a pessoas que trabalham para tornar o mundo um lugar" + - " melhor.\x0a\x0a\x0a%[1]v versão: %[5]s \x02Sobre\x02Erro na inicializaç" + - "ão\x02Não foi possível encontrar um agente de autenticação polkit. Por " + - "favor, execute um agente e tente novamente.\x02Um agente de autenticação" + - " está faltando\x02Não é possível conectar a %[1]s: %[2]v\x02Erro ao inic" + - "iar a VPN\x02Verificando estado...\x02Ligar\x02Desligar\x02Ajuda...\x02F" + - "azer uma doação...\x02Sobre...\x02Sair\x02Rotear o tráfego por:\x02Usar " + - "o gateway %[2]v de %[1]s\x02%[1]s está ligada\x02%[1]s está desligada" + - "\x02Cancelar\x02Conectando a %[1]s\x02Parando %[1]s\x02Reconectar\x02%[1" + - "]s está bloqueando a Internet\x02Um erro ocorreu na inicialização da VPN" + - ": %[1]v " - -var pt_PTIndex = []uint32{ // 27 elements - 0x00000000, 0x000000fe, 0x00000103, 0x000002d2, - 0x000002d8, 0x000002f0, 0x0000033c, 0x0000035e, - 0x00000385, 0x0000039b, 0x000003b3, 0x000003b9, - 0x000003c2, 0x000003cb, 0x000003d3, 0x000003dc, - 0x000003e1, 0x000003fa, 0x00000412, 0x0000041f, - 0x0000042f, 0x00000438, 0x00000448, 0x00000456, - 0x0000045e, 0x00000480, 0x000004ac, -} // Size: 132 bytes - -const pt_PTData string = "" + // Size: 1196 bytes - "\x02The %[1]s service is expensive to run. Because we don't want to stor" + - "e personal information about you, there are no accounts or billing for t" + - "his service. But if you want the service to continue, donate at least $5" + - " each month.\x0a\x09\x0aDo you want to donate now?\x02Doar\x02%[1]s is a" + - "n easy, fast, and secure VPN service from %[2]s. %[1]s does not require " + - "a user account, keep logs, or track you in any way.\x0a\x09 \x0aThis " + - "service is paid for entirely by donations from users like you. Please do" + - "nate at %[3]s.\x0a\x09\x09\x0aBy using this application, you agree to th" + - "e Terms of Service available at %[4]s. This service is provided as-is, w" + - "ithout any warranty, and is intended for people who work to make the wor" + - "ld a better place.\x0a\x0a\x0a%[1]v version: %[5]s\x02Sobre\x02Erro de i" + - "nicialização\x02Could not find a polkit authentication agent. Please run" + - " one and try again.\x02Agente de autenticação em falta\x02Não é possível" + - " ligar a %[1]s: %[2]v\x02Erro ao iniciar a VPN\x02A verificar o estado.." + - ".\x02Ligar\x02Desligar\x02Ajuda...\x02Doar...\x02Sobre...\x02Sair\x02Enc" + - "aminhar tráfego via:\x02Use %[1]s %[2]v gateway\x02%[1]s ligada\x02%[1]s" + - " desligada\x02Cancelar\x02A ligar a %[1]s\x02A parar %[1]s\x02Religar" + - "\x02%[1]s está a bloquear a Internet\x02Ocorreu um erro ao inicializar a" + - " VPN: %[1]v" - -var roIndex = []uint32{ // 27 elements - 0x00000000, 0x00000117, 0x00000120, 0x00000363, - 0x0000036a, 0x00000382, 0x000003d8, 0x000003fb, - 0x0000041f, 0x00000436, 0x0000044a, 0x00000455, - 0x00000460, 0x0000046a, 0x00000476, 0x00000480, - 0x0000048b, 0x000004a2, 0x000004c4, 0x000004d5, - 0x000004e6, 0x000004ee, 0x00000501, 0x0000050e, - 0x0000051a, 0x0000053f, 0x0000056f, -} // Size: 132 bytes - -const roData string = "" + // Size: 1391 bytes - "\x02Serviciul %[1]s este scump pentru a rula. Deoarece nu dorim să stocă" + - "m informații personale despre dvs., nu există conturi sau facturare pent" + - "ru acest serviciu. Dar dacă doriți ca serviciul să continue, donați cel " + - "puțin 5 USD în fiecare lună.\x0a\x09\x0aVreți să donați acum?\x02Donație" + - "\x02%[1]s este un serviciu VPN ușor, rapid și sigur de la %[2]s. %[1]s n" + - "u necesită un cont de utilizator, nu păstrează jurnalele și nu vă urmăre" + - "ște în niciun fel.\x0a\x09 \x0aAcest serviciu este plătit în întregi" + - "me prin donații de la utilizatori cum sunteți dvs. Vă rugăm să donați la" + - " %[3]s.\x0a\x09\x09\x0aPrin utilizarea acestei aplicații, sunteți de aco" + - "rd cu Termenii și condițiile disponibile la %[4]s. Acest serviciu este o" + - "ferit așa cum este, fără nicio garanție și este destinat persoanelor car" + - "e lucrează pentru a face lumea un loc mai bun.\x0a\x0a\x0a%[1]v versiune" + - "a: %[5]s\x02Despre\x02Eroare de inițializare\x02Nu am găsit un agent de " + - "autentificare polkit. Porniți unul și încercați din nou.\x02Lipsește age" + - "ntul de autentificare\x02Nu se poate conecta la %[1]s: %[2]v\x02Eroare l" + - "a pornirea VPN\x02Verificare stare...\x02Deschidere\x02Închidere\x02Ajut" + - "or...\x02Donație...\x02Despre...\x02Închidere\x02Traficul rutelor prin:" + - "\x02Utilizați gateway-ul %[1]s %[2]v\x02Am deschis %[1]s\x02Am închis %[" + - "1]s\x02Anulare\x02Conectare la %[1]s\x02Oprire %[1]s\x02Reconectare\x02%" + - "[1]s blochează accesul la internet\x02A apărut o eroare la inițializarea" + - " VPN: %[1]v" - -var ruIndex = []uint32{ // 27 elements - 0x00000000, 0x00000203, 0x0000022d, 0x000005ee, - 0x00000606, 0x0000062e, 0x000006de, 0x0000071d, - 0x0000075a, 0x0000077a, 0x0000079d, 0x000007ae, - 0x000007c1, 0x000007d1, 0x000007fe, 0x00000819, - 0x00000824, 0x00000850, 0x0000087e, 0x0000088c, - 0x0000089c, 0x000008ad, 0x000008cd, 0x000008e6, - 0x00000903, 0x00000931, 0x0000097e, -} // Size: 132 bytes - -const ruData string = "" + // Size: 2430 bytes - "\x02Служба %[1]s платная. В связи с тем, что мы не хотим сохранять персо" + - "нальную информацию о Вас, здесь нет регистрации или выставления счёта п" + - "о этой службе. Но, если Вам хочется сохранить работу этой службы, жертв" + - "уйте по крайней мере 5$ каждый месяц. Вы хотите пожертвовать в данный м" + - "омент?\x02Сделать пожертвование\x02%[1]s является простым, быстрым и бе" + - "зопасным VPN сервисом от %[2]s. %[1]s не требует учётной записи пользов" + - "ателя, сохраняет подключения или записывает Ваши переходы в любом случа" + - "е.\x0a\x0aЭтот сервис полностью оплачивается через пожертвования такими" + - " как Вы пользователями. Пожалуйста пожертвуйте в %[3]s.\x0a\x0aПри испол" + - "ьзовании этого приложения Вы соглашаетесь с условиями использования дос" + - "тупными на %[4]s. Эта служба предоставляется такой кака она есть, без в" + - "сяких гарантий и предназначена для людей делающих мир лучшим местом." + - "\x0a\x0a\x0a%[1]v версия: %[5]s\x02О приложении\x02Ошибка инициализации" + - "\x02Не удалось найти агент проверки подлинности polkit. Пожалуйста, запу" + - "стите один и попробуйте снова.\x02Отсутствует агент аутентификации\x02Н" + - "е удается подключиться к %[1]s: %[2]v\x02Ошибка запуска VPN\x02Проверка" + - " статуса...\x02Включить\x02Выключить\x02Помощь...\x02Сделать пожертвован" + - "ие...\x02О приложении...\x02Выход\x02Направить трафик через:\x02Использ" + - "уется шлюз %[1]s %[2]v\x02%[1]s вкл.\x02%[1]s выкл.\x02Отменить\x02Подк" + - "лючение к %[1]s\x02Остановка %[1]s\x02Переподключить\x02%[1]s блокировк" + - "а интернета\x02Произошла ошибка при инициализации VPN: %[1]v" - -var skIndex = []uint32{ // 27 elements - 0x00000000, 0x0000014a, 0x00000154, 0x00000374, - 0x0000037f, 0x00000398, 0x000003f4, 0x0000040a, - 0x00000440, 0x00000458, 0x0000046a, 0x00000473, - 0x0000047c, 0x00000489, 0x00000496, 0x000004a4, - 0x000004ae, 0x000004c4, 0x000004e2, 0x000004ff, - 0x0000051c, 0x00000525, 0x00000547, 0x00000563, - 0x00000573, 0x00000595, 0x000005bc, -} // Size: 132 bytes - -const skData string = "" + // Size: 1468 bytes - "\x02Služby aplikácie %[1]s sú nákladné na správu. Pretože o vás nechceme" + - " zbierať osobné informácie, v tejto službe neexistujú žiadne účty ani po" + - "platky. Ale ak chcete aby naša služba mohla fungovať aj v budúcnosti, pr" + - "osíme vás, aby ste prispievali aspoň sumou 5 $ mesačne.\x0a\x0aChceli by" + - " ste prispieť hneď teraz?\x02Prispieť\x02Aplikácia %[1]s predstavuje jed" + - "noduché, rýchle a bezpečné VPN od poskytovateľa %[2]s. %[1]s nevyžaduje " + - "používateľský účet a nijakým spôsobom vás nesleduje.\x0a\x0aTúto službu " + - "financujú príspevky od používateľov, ako ste vy. Prosím, prispejte na %[" + - "3]s.\x0a\x0aPoužívaním tejto aplikácie vyjadrujete súhlas s podmienkami " + - "používania služby dostupnými na %[4]s. Táto služba je poskytovaná v stav" + - "e ako je, bez akejkoľvek záruky a je určená pre ľudí, ktorý chcú zo svet" + - "a urobiť lepšie miesto.\x0a\x0a\x0a%[1]v, verzia: %[5]s\x02O programe" + - "\x02Chyba pri inicializácii\x02Nebolo možné nájsť overovacieho agenta po" + - "lkit. Prosím, spustite ho a skúste to znova.\x02Chýba agent overenia\x02" + - "Nebolo možné pripojiť sa k aplikácii %[1]s: %[2]v\x02Chyba pri spustení " + - "VPN\x02Kontrola stavu...\x02Zapnúť\x02Vypnúť\x02Pomocník...\x02Prispieť." + - "..\x02O programe...\x02Ukončiť\x02Smerovať prenos cez:\x02Použiť prístup" + - " %[1]s %[2]v\x02Aplikácia %[1]s je zapnutá\x02Aplikácia %[1]s je vypnutá" + - "\x02Zrušiť\x02Pripájanie sa k aplikácii %[1]s\x02Zastavujem aplikáciu %[" + - "1]s\x02Znova pripojiť\x02Aplikácia %[1]s blokuje internet\x02Pri spusten" + - "í VPN nastala chyba: %[1]v" - -var svIndex = []uint32{ // 27 elements - 0x00000000, 0x00000119, 0x00000120, 0x00000340, - 0x00000343, 0x00000356, 0x000003ac, 0x000003c8, - 0x000003eb, 0x00000400, 0x00000417, 0x0000041e, - 0x00000428, 0x00000432, 0x0000043c, 0x00000442, - 0x0000044a, 0x0000045f, 0x0000047b, 0x00000489, - 0x00000497, 0x0000049e, 0x000004b2, 0x000004c0, - 0x000004cc, 0x000004e5, 0x00000512, -} // Size: 132 bytes - -const svData string = "" + // Size: 1298 bytes - "\x02%[1]s-tjänsten är dyr at driva. Då vi inte vill spara någon av din p" + - "ersonliga information, så finns det inga konton eller fakturatjänster fö" + - "r den här tjänsten. Men om du vill att tjänsten ska fortsätta fungera så" + - " donera minst 5 dollar varje månad\x0a\x09\x0aVill du donera nu?\x02Done" + - "ra\x02%[1]s är en enkel, snabb och säker VPN-tjänst från %[2]s. %[1]s kr" + - "äver inte ett användarkonto, behålla loggar, eller spåra dig på något s" + - "ätt.\x0a\x09 \x0aDenna tjänst betalas helt genom donationer från anv" + - "ändare som du. Vänligen donera på %[3]s.\x0a\x09\x09\x0aGenom att använ" + - "da den här applikationen godkänner du användarvillkoren som finns tillgä" + - "ngliga på %[4]s. Denna tjänst tillhandahålls som den är, utan någon gara" + - "nti, och är avsedd för personer som arbetar för att göra världen till en" + - " bättre plats.\x0a\x0a\x0a%[1]v version: %[5]s\x02Om\x02Fel vid initieri" + - "ng\x02Kunde inte hitta polkit authentiseringsagent. Vänligen starta en o" + - "ch försök igen. \x02Saknar authentiseringsagent\x02Kan inte ansluta till" + - " %[1]s: %[2]v\x02Fel vid start av VPN\x02Kontrollerar status...\x02Start" + - "a\x02Stäng av\x02Hjälp...\x02Donera...\x02Om...\x02Avsluta\x02Slussa tra" + - "fik genom:\x02Använd %[1]s %[2]v gateway\x02%[1]s startad\x02%[1]s stopp" + - "ad\x02Avbryt\x02Ansluter till %[1]s\x02Stoppar %[1]s\x02Återanslut\x02%[" + - "1]s blockerar internet\x02Ett fel uppstod vid initiering av VPN: %[1]v" - -var trIndex = []uint32{ // 27 elements - 0x00000000, 0x0000011d, 0x0000012a, 0x00000366, - 0x00000370, 0x00000382, 0x000003e0, 0x00000406, - 0x00000430, 0x00000446, 0x00000458, 0x0000045c, - 0x00000462, 0x0000046d, 0x0000047d, 0x0000048a, - 0x00000494, 0x000004bb, 0x000004d8, 0x000004e5, - 0x000004f3, 0x000004fa, 0x0000051b, 0x0000052e, - 0x0000053e, 0x00000559, 0x00000586, -} // Size: 132 bytes - -const trData string = "" + // Size: 1414 bytes - "\x02%[1]s hizmetini çalıştırmak pahalıdır. Sizin hakkınızda kişisel bilg" + - "i saklamak istemediğimiz için, bu hizmete ilişkin hesaplar veya fatura y" + - "ok. Ancak hizmetin sürmesini istiyorsanız, her ay en azından 5$ bağış ya" + - "pmalısınız.\x0a\x09\x0aŞimdi bağış yapmak ister misiniz?\x02Bağış Yap" + - "\x02%[1]s, %[2]s tarafından sağlanan kolay, hızlı ve güvenli bir VPN hiz" + - "metidir. %[1]s kullanıcı hesabı gerektirmez, kayıt tutmaz veya sizi hiç " + - "bir şekilde izlemez. \x0a\x09\x0aBu hizmetin ücreti sizin gibi kullanıcı" + - "ların bağışlarıyla ödeniyor. Lütfen %[3]s bağlantısıyla bağış yapın.\x0a" + - "\x09\x09\x0aBu uygulamayı kullanarak, %[4]s adresindeki Hizmet Kullanım " + - "Şartlarını kabul etmiş olursunuz. Bu hizmet olduğu gibi, herhangi bir g" + - "aranti olmadan sunulmaktadır ve dünyayı daha iyi bir yer kılmak için çal" + - "ışan insanlara yöneliktir.\x0a\x0a\x0a%[1]v sürüm: %[5]s\x02Hakkında" + - "\x02Başlatma hatası\x02Bir polkit kimlik doğrulama vekili bulunamıyor. B" + - "ir tane çalıştırın ve tekrar deneyin.\x02Kimlik doğrulama vekili bulunam" + - "ıyor\x02%[1]s uygulamasına bağlanamıyor: %[2]v\x02VPN başlatma hatası" + - "\x02Durum denetimi...\x02Aç\x02Kapat\x02Yardım...\x02Bağış yap...\x02Hak" + - "kında...\x02Çıkış\x02Trafiği şunun üzerinden yönlendir:\x02%[1]s %[2]v g" + - "eçidini kullan\x02%[1]s açık\x02%[1]s kapalı\x02İptal\x02%[1]s uygulamas" + - "ına bağlanıyor\x02%[1]s durduruluyor\x02Yeniden bağlan\x02%[1]s interne" + - "ti engelliyor\x02VPN başlatılırken bir hata oluştu: %[1]v" - -var ugIndex = []uint32{ // 27 elements - 0x00000000, 0x0000020e, 0x0000021b, 0x000005fa, - 0x00000609, 0x0000063b, 0x000006ae, 0x000006ec, - 0x00000718, 0x00000742, 0x00000770, 0x00000783, - 0x00000796, 0x000007a7, 0x000007b8, 0x000007cb, - 0x000007d6, 0x00000803, 0x0000083a, 0x0000084b, - 0x0000085c, 0x00000872, 0x000008a4, 0x000008c5, - 0x000008db, 0x00000907, 0x0000095f, -} // Size: 132 bytes - -const ugData string = "" + // Size: 2399 bytes - "\x02بۇ %[1]s خىزمىتىنى ساقلىماق ئاسانغا توختىمىدى. چۈنكى بىز سىزنىڭ شەخ" + - "سىيئۇچۇرلىرىنى ساقلايلى دىمىدۇق، بۇ مۇلازىمەت ھىچقانداق ھېسابات ياكى پۇ" + - "ل تۆلەش ئۇچۇرلىرىنى ساقلىمايدۇ. ئەمما، بۇ مۇلازىمەتنىڭ داۋام قىلىشى ئۈچ" + - "ۈ، ئايدا پەقەتلا 5 دوللار ئىئانە قىلسىڭىزلا بولىدۇ.\x0a\x09\x0aھازىر ئى" + - "ئانە قىلامسىز ؟\x02ئىئانە\x02%[1]s بولسا %[2]s تەرىپىدىن تەممىنلەنگەن " + - "قولايلىق، تېز ۋە بىخەتەر VPNمۇلازىمېتى. %[1]s\u00a0سىزدىن ھېساپ تەلەپ " + - "قلمايدۇ، خاتىرىڭىزنى ساقلىمايدۇ ياكى ھەرقانداق ئۇسۇلدا ئىزىڭىزغا چۈشمەي" + - "دۇ.\x0a\x09\x0aبۇ مۇلازىمەت پۈتۈنلەي سىزگە ئوخشاش ئىشلەتكۈچىلەرنىڭ ئىئا" + - "نىسىگە تايىنىدۇ. بۇ يەردىن ئىئانە قىلغايسىز %[3]s.\x0aبۇنى ئىشلەتكىنىڭ" + - "ىز بۇ يەردىن %[4]s كۆرگىلى بولىدىغان مۇلازىمەت كېلىشىمىمىزگە قوشۇلغىنى" + - "ڭىزنى بىلدۈرىدۇ. بۇ مۇلازىمەت دۇنيانى تېخىمۇ گۈزەل بىر جايغا ئايلاندۈرۈ" + - "شنى مەقسەت قىلغان كىشىلەر تەرىپىدن ئۆز پېتى، ھەرقانداق كاپالەتسىز تەمىن" + - "لەنگەن.\x0a\x0a\x0a%[1]v نىڭ نەشرى: %[5]s\x02ھەققىدە\x02دەسلەپكىلەشتۈرۈ" + - "شتە خاتالق\x02پولكىت ئاگېنتىنى تاپالمىدىم، بىرسىنى ئجرا قىلىپ تەكرار سى" + - "ناڭ.\x02كىملىك توغرۇلاش ئاگېنتى يوقالغان\x02%[1]s: %[2]v غا باغلىنالمىد" + - "ى.\x02VPNى قوشغىتىشتا خاتالىق\x02ھالەت تەكشۈرىلىۋاتىدۇ ...\x02ئېتىۋېتىش" + - "\x02ئېچىۋېتىش\x02ياردەم ...\x02ئىئانە ...\x02ھەققىدە ...\x02چىقىش\x02ئۆت" + - "كەن ئېقىمنى يېتەكلەش\x02ئىشلىتىش %[1]s %[2]v تور قاپقىغىنى\x02تاقاش %[1" + - "]s\x02ئېچىش %[1]s\x02بىكار قىلىش\x02پروگراممىغا ئۇلانماقتا %[1]s\x02%[1]" + - "s توختىتىۋاتىدۇ\x02قايتا ئۇلاش\x02ئىنتېرنېتىنى چەكلەش %[1]s\x02دەسلەپكىل" + - "ەشتۈرۈشتە بىر خاتالىق يۈز بەردى VPN: %[1]v" - -var zhIndex = []uint32{ // 27 elements - 0x00000000, 0x000000fe, 0x00000105, 0x000002d4, - 0x000002db, 0x000002eb, 0x00000337, 0x00000354, - 0x00000372, 0x00000384, 0x00000394, 0x0000039b, - 0x000003a2, 0x000003ac, 0x000003b6, 0x000003c0, - 0x000003c7, 0x000003dd, 0x000003f7, 0x00000404, - 0x00000411, 0x00000418, 0x0000042e, 0x00000441, - 0x0000044e, 0x00000466, 0x0000048c, -} // Size: 132 bytes - -const zhData string = "" + // Size: 1164 bytes - "\x02The %[1]s service is expensive to run. Because we don't want to stor" + - "e personal information about you, there are no accounts or billing for t" + - "his service. But if you want the service to continue, donate at least $5" + - " each month.\x0a\x09\x0aDo you want to donate now?\x02捐赠\x02%[1]s is an " + - "easy, fast, and secure VPN service from %[2]s. %[1]s does not require a " + - "user account, keep logs, or track you in any way.\x0a\x09 \x0aThis se" + - "rvice is paid for entirely by donations from users like you. Please dona" + - "te at %[3]s.\x0a\x09\x09\x0aBy using this application, you agree to the " + - "Terms of Service available at %[4]s. This service is provided as-is, wit" + - "hout any warranty, and is intended for people who work to make the world" + - " a better place.\x0a\x0a\x0a%[1]v version: %[5]s\x02关于\x02初始化失败\x02Could" + - " not find a polkit authentication agent. Please run one and try again." + - "\x02Missing authentication agent\x02无法连接到 %[1]s:%[2]v\x02启动 VPN 失败\x02检查" + - "状态...\x02开启\x02关闭\x02帮助...\x02捐赠...\x02关于...\x02退出\x02将流量路由到:\x02使用 %[" + - "1]s %[2]v 网关\x02%[1]s 开启\x02%[1]s 关闭\x02取消\x02正在连接到 %[1]s\x02正在停止 %[1]s" + - "\x02重新连接\x02%[1]s blocking internet\x02初始化 VPN 时发生错误:%[1]v" - -var zh_TWIndex = []uint32{ // 27 elements - 0x00000000, 0x000000f4, 0x000000fb, 0x000002cc, - 0x000002d3, 0x000002e3, 0x00000331, 0x0000034a, - 0x00000368, 0x00000383, 0x00000399, 0x000003a0, - 0x000003a7, 0x000003b1, 0x000003bb, 0x000003c5, - 0x000003cc, 0x000003e8, 0x00000402, 0x0000040f, - 0x0000041c, 0x00000423, 0x00000439, 0x0000044c, - 0x00000459, 0x00000478, 0x0000049e, -} // Size: 132 bytes - -const zh_TWData string = "" + // Size: 1182 bytes - "\x02%[1]s 服務的運作成本高昂。因為我們不希望儲存您的個人資料,本服務不要求任何帳戶或付款資訊。但如果您希望本服務能繼續運作,請每個月至" + - "少捐獻 5 元。\x0a\x09\x0a您想要現在就捐獻嗎?\x02捐獻\x02由 %[2]s 提供的 %[1]s,是一項簡易、快速且安全的" + - " VPN 服務。%[1]s 不需要使用者帳戶、不保存紀錄,也不會用任何方式追蹤您。\x0a\x09 \x0a本服務的資金完全來自像您一樣的" + - "使用者捐獻。請在 %[3]s 捐獻。\x0a\x09\x09\x0a使用本程式,代表您同意 %[4]s 上的服務條款。本服務是以現狀提供,無" + - "任何擔保,宗旨是為那些努力讓世界變得更美好的人們提供服務。\x0a\x0a\x0a%[1]v 版本: %[5]s\x02關於\x02初始化錯" + - "誤\x02找不到 Polkit 驗證代理程式。請於執行該程式後再試一次。\x02缺少驗證代理程式\x02無法連線到 %[1]s:%[2]v" + - "\x02啟動 VPN 時發生錯誤\x02正在檢查狀態...\x02開啟\x02關閉\x02說明...\x02捐獻...\x02關於...\x02" + - "退出\x02流量將會通過路由:\x02使用 %[1]s %[2]v 閘道\x02%[1]s 開啟\x02%[1]s 關閉\x02取消\x02" + - "正在連線到 %[1]s\x02正在停止 %[1]s\x02重新連線\x02%[1]s 正在封鎖網際網路\x02初始化 VPN 時發生錯誤:%" + - "[1]v" - - // Total table size 50689 bytes (49KiB); checksum: F954280F diff --git a/cmd/bitmask-vpn/main.go b/cmd/bitmask-vpn/main.go deleted file mode 100644 index 0f5759ee..00000000 --- a/cmd/bitmask-vpn/main.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package main - -//go:generate python3 ../../branding/scripts/vendorize.py ../../branding/templates/bitmaskvpn/config.go ../../branding/config/vendor.conf ../../pkg/config/config.go - -import ( - "flag" - "fmt" - "log" - "os" - "path" - "runtime" - - "0xacab.org/leap/bitmask-vpn/pkg/config" - "0xacab.org/leap/bitmask-vpn/pkg/systray" - "github.com/jmshal/go-locale" - "golang.org/x/text/message" -) - -const ( - logFile = "systray.log" -) - -var version string - -func main() { - // on OSX sometimes the systray doesn't work (bitmask-systray#52) - // locking the main thread into an OS thread fixes the problem - runtime.LockOSThread() - - logger, err := config.ConfigureLogger(path.Join(config.Path, logFile)) - if err != nil { - log.Println("Can't configure logger: ", err) - } else { - defer logger.Close() - } - - conf := systray.ParseConfig() - - selectGateway := flag.Bool("select-gateway", false, "Enable gateway selection") - obfs4 := flag.Bool("obfs4", false, "Use obfs4 to obfuscate the traffic is available in the provider") - disableAutostart := flag.Bool("disable-autostart", false, "Disable the autostart for the next run") - startVPN := flag.String("start-vpn", "", "Start the vpn in turned 'on' or 'off'") - versionFlag := flag.Bool("version", false, "Version of the bitmask-systray") - flag.Parse() - if *versionFlag { - fmt.Println(version) - os.Exit(0) - } - if *startVPN != "" { - if *startVPN != "on" && *startVPN != "off" { - fmt.Println("-start-vpn should be 'on' or 'off'") - os.Exit(1) - } - conf.StartVPN = *startVPN == "on" - } - if *selectGateway { - conf.SelectGateway = *selectGateway - } - if *obfs4 { - conf.Obfs4 = *obfs4 - } - if *disableAutostart { - conf.DisableAustostart = *disableAutostart - } - - conf.Version = version - conf.Printer = initPrinter() - systray.Run(conf) -} - -func initPrinter() *message.Printer { - locale, err := go_locale.DetectLocale() - if err != nil { - log.Println("Error detecting the system locale: ", err) - } - - return message.NewPrinter(message.MatchLanguage(locale, "en")) -} diff --git a/go.mod b/go.mod index 97123df8..b89aa45f 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,7 @@ module 0xacab.org/leap/bitmask-vpn go 1.14 require ( - 0xacab.org/leap/go-dialog v0.0.0-20181123042829-0ee8438431a0 0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2 - github.com/AllenDang/w32 v0.0.0-20180428130237-ad0a36d80adc // indirect - github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 // indirect github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264 // indirect github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0 // indirect github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4 // indirect @@ -14,27 +11,14 @@ require ( github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2 github.com/dchest/siphash v1.2.1 // indirect - github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 // indirect - github.com/getlantern/systray v0.0.0-20191102120558-baeca33b8639 - github.com/gotk3/gotk3 v0.0.0-20191027191019-60cba67d4ea4 // indirect github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61 github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 - github.com/mattn/go-gtk v0.0.0-20191030024613-af2e013261f5 // indirect - github.com/mattn/go-pointer v0.0.0-20190911064623-a0a44394634f // indirect github.com/rakyll/statik v0.1.7 github.com/sevlyar/go-daemon v0.1.5 - github.com/skelterjohn/go.wde v0.0.0-20190318181201-adc3f78cdb45 // indirect - github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e - github.com/sqweek/dialog v0.0.0-20190728103509-6254ed5b0d3c // indirect - github.com/stretchr/objx v0.2.0 // indirect - github.com/stretchr/testify v1.4.0 // indirect + github.com/stretchr/testify v1.3.0 // indirect golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 // indirect golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 golang.org/x/text v0.3.2 golang.org/x/tools v0.0.0-20200427153019-a90b7300be7c // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/yaml.v2 v2.2.5 // indirect ) - -replace github.com/AllenDang/w32 => ./packages/w32 diff --git a/go.sum b/go.sum index 01a400cb..b449a895 100644 --- a/go.sum +++ b/go.sum @@ -1,138 +1,51 @@ -0xacab.org/leap/go-dialog v0.0.0-20181123042829-0ee8438431a0 h1:VNfk6egmYevGIKJVGVxpOyQ5rBR1DUQimrpeGxLSNsg= -0xacab.org/leap/go-dialog v0.0.0-20181123042829-0ee8438431a0/go.mod h1:VZeIZ8qdzi4glGby9mBMNBMnvG2dV1A9nBpKy2d0JNA= -0xacab.org/leap/shapeshifter v0.0.0-20190815154545-f602ba600f5d h1:ne5sJ4434UriGrujx5qqJM0mnkwpadNbBA39yZw2q04= -0xacab.org/leap/shapeshifter v0.0.0-20190815154545-f602ba600f5d/go.mod h1:TRHdLzHFv5wZnWXkuqpRzEdMFk9ICgvPXmcSupSfjk8= 0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2 h1:+IGQXhBErpPeZPbeQgmGZXbcCC39kJXwWC377r8cvkw= 0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2/go.mod h1:TRHdLzHFv5wZnWXkuqpRzEdMFk9ICgvPXmcSupSfjk8= -github.com/AllenDang/w32 v0.0.0-20180428130237-ad0a36d80adc h1:w3fW4b1hPf6/cfdQQ/vu9V8eBeQmuLZIaUMj81nIzYQ= -github.com/AllenDang/w32 v0.0.0-20180428130237-ad0a36d80adc/go.mod h1:1rHKulT5eD2DzdKxDXUZRKtBfkTzLmTL42ZmEmOfyrs= -github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ= -github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966/go.mod h1:Mid70uvE93zn9wgF92A/r5ixgnvX8Lh68fxp9KQBaI0= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= -github.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k= github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264 h1:8UbFvUSYrlcEU9W92tohq74kYvtXJo11WLI16TMi904= github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264/go.mod h1:oxwvRzQ4FDp7ysA1En4F/pyOh2Jfef4YTo1YhHUsBOA= github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0 h1:zDYt6FDJwDSX4woVFVK2EMt7fkxU5L5qDNLUjQwA+BQ= github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0/go.mod h1:kB00Ak8Dgn1uZlZHLc/WsUta58Jc+n/ZhCetcPkh42Q= -github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20190827222855-df9bac9654e0 h1:D74XW+2FpWPkGwFlxv79aVGF+iop7jIRI10VYIXYXLw= -github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20190827222855-df9bac9654e0/go.mod h1:u3jvRgYV13oHabVAdXekh3yk9PHfpCKvB8uolQEs4jA= github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4 h1:rav6TvUk8+Dr3AGtCnKP5VH/4yi42IHTkbqmVXZNIi0= github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4/go.mod h1:u3jvRgYV13oHabVAdXekh3yk9PHfpCKvB8uolQEs4jA= github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a h1:fXK2KsfnkBV9Nh+9SKzHchYjuE9s0vI20JG1mbtEAcc= github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a/go.mod h1:oTGdE7/DlWIr23G0IKW3OXK9wZ5Hw1GGiaJFccTvZi4= -github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf/go.mod h1:peYoMncQljjNS6tZwI9WVyQB3qZS6u79/N3mBOcnd3I= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2 h1:E7mgGSu7JSN+ELgOq2Pddy8fVfAbMN8u1jUvpKpHtXg= github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2/go.mod h1:69IHK2p7ZvTuKqxDx3vRWZRyBhLh2rNJN3b6XnjCVhY= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= -github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4= -github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY= -github.com/getlantern/errors v0.0.0-20180829142810-e24b7f4ff7c7 h1:pKm0g6hKvbd09FUAfFdlGBV/1L1e2KnXsapRNR6Z5/E= -github.com/getlantern/errors v0.0.0-20180829142810-e24b7f4ff7c7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A= -github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So= -github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A= -github.com/getlantern/golog v0.0.0-20170508214112-cca714f7feb5 h1:Okd7vkn9CfIgDBj1ST/vtBTCfD/kxIhYD412K+FRKPc= -github.com/getlantern/golog v0.0.0-20170508214112-cca714f7feb5/go.mod h1:Vwx1Cg64gCdIalad44uvQsKZw6LsVczIKZrUBStEjVw= -github.com/getlantern/golog v0.0.0-20190809085441-26e09e6dd330 h1:BQIvwKkAWNoyQFtjk89XRV+GK0fT7Zvl1oHrp9Zhfl0= -github.com/getlantern/golog v0.0.0-20190809085441-26e09e6dd330/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc= -github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 h1:guBYzEaLz0Vfc/jv0czrr2z7qyzTOGC9hiQ0VC+hKjk= -github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc= -github.com/getlantern/hex v0.0.0-20160523043825-083fba3033ad h1:L/UatDVr6opOJnZdZnGwhFXjoIUwO6RHULxPyzb60L4= -github.com/getlantern/hex v0.0.0-20160523043825-083fba3033ad/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o= -github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0= -github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o= -github.com/getlantern/hidden v0.0.0-20160523043807-d52a649ab33a h1:gF6WQx7V8q91bBC4MUWOuKnWjUcDDi27d1zMdB0hPnM= -github.com/getlantern/hidden v0.0.0-20160523043807-d52a649ab33a/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA= -github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc= -github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA= -github.com/getlantern/ops v0.0.0-20170904182230-37353306c908 h1:PiLUBXrdcPfVqAQVqLGCfKVq/5KI3KsRowk2mJ7IuVk= -github.com/getlantern/ops v0.0.0-20170904182230-37353306c908/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA= -github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA= -github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA= -github.com/getlantern/systray v0.0.0-20190626064521-f2fa635d0474 h1:ylLoQ/eTNhtZb15lEjS9lJhIsf7jzidSqee4QWOj0O8= -github.com/getlantern/systray v0.0.0-20190626064521-f2fa635d0474/go.mod h1:7Splj4WBQSps8jODnMgrIV6goKL0N1HR+mhCAEVWlA0= -github.com/getlantern/systray v0.0.0-20190727060347-6f0e5a3c556c h1:okydU7ZqJYYR/N62kzsacryouZc2UBnVgktk3jlrfoU= -github.com/getlantern/systray v0.0.0-20190727060347-6f0e5a3c556c/go.mod h1:7Splj4WBQSps8jODnMgrIV6goKL0N1HR+mhCAEVWlA0= -github.com/getlantern/systray v0.0.0-20191102120558-baeca33b8639 h1:tPGMg3zhSa/Phe6jYE0iY57wCK5dtS2+ejjVfkq0jqE= -github.com/getlantern/systray v0.0.0-20191102120558-baeca33b8639/go.mod h1:7Splj4WBQSps8jODnMgrIV6goKL0N1HR+mhCAEVWlA0= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gotk3/gotk3 v0.0.0-20190108052711-d09d58ef3476 h1:jiDcHh/HCWp8A63RVSCB2q36Nh0WItmjgA89SzUvtoc= -github.com/gotk3/gotk3 v0.0.0-20190108052711-d09d58ef3476/go.mod h1:Eew3QBwAOBTrfFFDmsDE5wZWbcagBL1NUslj1GhRveo= -github.com/gotk3/gotk3 v0.0.0-20190809225113-dc58eba1cccc h1:QtXtC6AdJ57L/rw/YMF41a+6YmLTy92IvxsCjDp4dYE= -github.com/gotk3/gotk3 v0.0.0-20190809225113-dc58eba1cccc/go.mod h1:Eew3QBwAOBTrfFFDmsDE5wZWbcagBL1NUslj1GhRveo= -github.com/gotk3/gotk3 v0.0.0-20191027191019-60cba67d4ea4 h1:XKmosDfDUElDjCNdtc5SpEArZXi3hOStu0HEOO9fm4Q= -github.com/gotk3/gotk3 v0.0.0-20191027191019-60cba67d4ea4/go.mod h1:Eew3QBwAOBTrfFFDmsDE5wZWbcagBL1NUslj1GhRveo= -github.com/jmshal/go-locale v0.0.0-20161107082030-4f541412d67a h1:y9bB+vmwCNXcmu/bW89rBeVcK0PCMQJmemA+ExoP9So= -github.com/jmshal/go-locale v0.0.0-20161107082030-4f541412d67a/go.mod h1:+Ny9b1U6p4zX0L9w+k3hSkz3puupLFP14Mion+rGNF8= github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61 h1:9vsXCXRCUb82jJKv4O+R8Hyo4oPJsOjVwT0pWvHgeyc= github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61/go.mod h1:+Ny9b1U6p4zX0L9w+k3hSkz3puupLFP14Mion+rGNF8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= -github.com/mattn/go-gtk v0.0.0-20180216084204-5a311a1830ab/go.mod h1:PwzwfeB5syFHXORC3MtPylVcjIoTDT/9cvkKpEndGVI= -github.com/mattn/go-gtk v0.0.0-20190405072524-4deadb416788/go.mod h1:PwzwfeB5syFHXORC3MtPylVcjIoTDT/9cvkKpEndGVI= -github.com/mattn/go-gtk v0.0.0-20191030024613-af2e013261f5/go.mod h1:PwzwfeB5syFHXORC3MtPylVcjIoTDT/9cvkKpEndGVI= -github.com/mattn/go-pointer v0.0.0-20171114154726-1d30dc4b6f28/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/mattn/go-pointer v0.0.0-20180825124634-49522c3f3791/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/mattn/go-pointer v0.0.0-20190911064623-a0a44394634f/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso= -github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= -github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw= -github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk= github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE= -github.com/skelterjohn/go.wde v0.0.0-20180104102407-a0324cbf3ffe/go.mod h1:zXxNsJHeUYIqpg890APBNEn9GoCbA4Cdnvuv3mx4fBk= -github.com/skelterjohn/go.wde v0.0.0-20190318181201-adc3f78cdb45/go.mod h1:zXxNsJHeUYIqpg890APBNEn9GoCbA4Cdnvuv3mx4fBk= -github.com/skratchdot/open-golang v0.0.0-20190104022628-a2dfa6d0dab6 h1:cGT4dcuEyBwwu/v6tosyqcDp2yoIo/LwjMGixUvg3nU= -github.com/skratchdot/open-golang v0.0.0-20190104022628-a2dfa6d0dab6/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e h1:VAzdS5Nw68fbf5RZ8RDVlUvPXNU6Z3jtPCK/qvm4FoQ= -github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= -github.com/sqweek/dialog v0.0.0-20190728103509-6254ed5b0d3c h1:nQyaARR8WzWW4/AoxpyPA82gJcvuZUxLxnMqVbmW50A= -github.com/sqweek/dialog v0.0.0-20190728103509-6254ed5b0d3c/go.mod h1:QSrNdZLZB8VoFPGlZ2vDuA2oNaVdhld3g0PZLc7soX8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 h1:PyXRxSVbvzDGuqYXjHndV7xDzJ7w2K8KD9Ef8GB7KOE= golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191105084925-a882066a44e0 h1:QPlSTtPE2k6PZPasQUbzuK3p9JbS+vMXYVto8g/yrsg= -golang.org/x/net v0.0.0-20191105084925-a882066a44e0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= -golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191104094858-e8c54fb511f6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191105142833-ac3223d80179 h1:IqVhUQp5B9ARnZUcfqXy6zP+A+YuPpP7IFo8gFeCOzU= -golang.org/x/sys v0.0.0-20191105142833-ac3223d80179/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 h1:sfkvUWPNGwSV+8/fNqctR5lS2AqCSqYwXdrjCxp/dXo= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= @@ -140,11 +53,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190806143415-35ef2682e516 h1:r360bnWZkNIjtDFjRC/LVCPgL7sVglqb4XuifefgtB8= -golang.org/x/tools v0.0.0-20190806143415-35ef2682e516/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190815235612-5b08f89bfc0c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191104232314-dc038396d1f0 h1:azkp5oIgy7LNGQ64URezZccjePaEGSYIHEgYTn/bfXI= -golang.org/x/tools v0.0.0-20191104232314-dc038396d1f0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200427153019-a90b7300be7c h1:AHNGGbHuSfdUH6gKP3etfnh1v67lhCiCXvgXOCAwL3A= golang.org/x/tools v0.0.0-20200427153019-a90b7300be7c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -152,10 +60,3 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/packages/w32/AUTHORS b/packages/w32/AUTHORS deleted file mode 100644 index 93ec5dba..00000000 --- a/packages/w32/AUTHORS +++ /dev/null @@ -1,19 +0,0 @@ -# This is the official list of 'w32' authors for copyright purposes. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -# Contributors -# ============ - -Allen Dang -Benny Siegert -Bruno Bigras -Daniel Joos -Gerald Rosenberg -Liam Bowen -Michael Henke -Paul Maddox \ No newline at end of file diff --git a/packages/w32/LICENSE b/packages/w32/LICENSE deleted file mode 100644 index 9f36608c..00000000 --- a/packages/w32/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2010-2012 The w32 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/w32/README.md b/packages/w32/README.md deleted file mode 100644 index ed196e76..00000000 --- a/packages/w32/README.md +++ /dev/null @@ -1,33 +0,0 @@ -About w32 -========== - -w32 is a wrapper of windows apis for the Go Programming Language. - -It wraps win32 apis to "Go style" to make them easier to use. - -Setup -===== - -1. Make sure you have a working Go installation and build environment, - see this go-nuts post for details: - http://groups.google.com/group/golang-nuts/msg/5c87630a84f4fd0c - - Updated versions of the Windows Go build are available here: - http://code.google.com/p/gomingw/downloads/list - -2. Create a "gopath" directory if you do not have one yet and set the - GOPATH variable accordingly. For example: - mkdir -p go-externals/src - export GOPATH=${PWD}/go-externals - -3. go get github.com/AllenDang/w32 - -4. go install github.com/AllenDang/w32... - -Contribute -========== - -Contributions in form of design, code, documentation, bug reporting or other -ways you see fit are very welcome. - -Thank You! diff --git a/packages/w32/advapi32.go b/packages/w32/advapi32.go deleted file mode 100644 index 10e1416c..00000000 --- a/packages/w32/advapi32.go +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "errors" - "fmt" - "syscall" - "unsafe" -) - -var ( - modadvapi32 = syscall.NewLazyDLL("advapi32.dll") - - // procRegSetKeyValue = modadvapi32.NewProc("RegSetKeyValueW") - procCloseEventLog = modadvapi32.NewProc("CloseEventLog") - procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle") - procControlService = modadvapi32.NewProc("ControlService") - procControlTrace = modadvapi32.NewProc("ControlTraceW") - procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor") - procOpenEventLog = modadvapi32.NewProc("OpenEventLogW") - procOpenSCManager = modadvapi32.NewProc("OpenSCManagerW") - procOpenService = modadvapi32.NewProc("OpenServiceW") - procReadEventLog = modadvapi32.NewProc("ReadEventLogW") - procRegCloseKey = modadvapi32.NewProc("RegCloseKey") - procRegCreateKeyEx = modadvapi32.NewProc("RegCreateKeyExW") - procRegEnumKeyEx = modadvapi32.NewProc("RegEnumKeyExW") - procRegGetValue = modadvapi32.NewProc("RegGetValueW") - procRegOpenKeyEx = modadvapi32.NewProc("RegOpenKeyExW") - procRegSetValueEx = modadvapi32.NewProc("RegSetValueExW") - procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl") - procStartService = modadvapi32.NewProc("StartServiceW") - procStartTrace = modadvapi32.NewProc("StartTraceW") -) - -var ( - SystemTraceControlGuid = GUID{ - 0x9e814aad, - 0x3204, - 0x11d2, - [8]byte{0x9a, 0x82, 0x00, 0x60, 0x08, 0xa8, 0x69, 0x39}, - } -) - -func RegCreateKey(hKey HKEY, subKey string) HKEY { - var result HKEY - ret, _, _ := procRegCreateKeyEx.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(0), - uintptr(0), - uintptr(0), - uintptr(KEY_ALL_ACCESS), - uintptr(0), - uintptr(unsafe.Pointer(&result)), - uintptr(0)) - _ = ret - return result -} - -func RegOpenKeyEx(hKey HKEY, subKey string, samDesired uint32) HKEY { - var result HKEY - ret, _, _ := procRegOpenKeyEx.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(0), - uintptr(samDesired), - uintptr(unsafe.Pointer(&result))) - - if ret != ERROR_SUCCESS { - panic(fmt.Sprintf("RegOpenKeyEx(%d, %s, %d) failed", hKey, subKey, samDesired)) - } - return result -} - -func RegCloseKey(hKey HKEY) error { - var err error - ret, _, _ := procRegCloseKey.Call( - uintptr(hKey)) - - if ret != ERROR_SUCCESS { - err = errors.New("RegCloseKey failed") - } - return err -} - -func RegGetRaw(hKey HKEY, subKey string, value string) []byte { - var bufLen uint32 - var valptr unsafe.Pointer - if len(value) > 0 { - valptr = unsafe.Pointer(syscall.StringToUTF16Ptr(value)) - } - procRegGetValue.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(valptr), - uintptr(RRF_RT_ANY), - 0, - 0, - uintptr(unsafe.Pointer(&bufLen))) - - if bufLen == 0 { - return nil - } - - buf := make([]byte, bufLen) - ret, _, _ := procRegGetValue.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(valptr), - uintptr(RRF_RT_ANY), - 0, - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&bufLen))) - - if ret != ERROR_SUCCESS { - return nil - } - - return buf -} - -func RegSetBinary(hKey HKEY, subKey string, value []byte) (errno int) { - var lptr, vptr unsafe.Pointer - if len(subKey) > 0 { - lptr = unsafe.Pointer(syscall.StringToUTF16Ptr(subKey)) - } - if len(value) > 0 { - vptr = unsafe.Pointer(&value[0]) - } - ret, _, _ := procRegSetValueEx.Call( - uintptr(hKey), - uintptr(lptr), - uintptr(0), - uintptr(REG_BINARY), - uintptr(vptr), - uintptr(len(value))) - - return int(ret) -} - -func RegGetString(hKey HKEY, subKey string, value string) string { - var bufLen uint32 - procRegGetValue.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(value))), - uintptr(RRF_RT_REG_SZ), - 0, - 0, - uintptr(unsafe.Pointer(&bufLen))) - - if bufLen == 0 { - return "" - } - - buf := make([]uint16, bufLen) - ret, _, _ := procRegGetValue.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(value))), - uintptr(RRF_RT_REG_SZ), - 0, - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&bufLen))) - - if ret != ERROR_SUCCESS { - return "" - } - - return syscall.UTF16ToString(buf) -} - -/* -func RegSetKeyValue(hKey HKEY, subKey string, valueName string, dwType uint32, data uintptr, cbData uint16) (errno int) { - ret, _, _ := procRegSetKeyValue.Call( - uintptr(hKey), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(subKey))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(valueName))), - uintptr(dwType), - data, - uintptr(cbData)) - - return int(ret) -} -*/ - -func RegEnumKeyEx(hKey HKEY, index uint32) string { - var bufLen uint32 = 255 - buf := make([]uint16, bufLen) - procRegEnumKeyEx.Call( - uintptr(hKey), - uintptr(index), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&bufLen)), - 0, - 0, - 0, - 0) - return syscall.UTF16ToString(buf) -} - -func OpenEventLog(servername string, sourcename string) HANDLE { - ret, _, _ := procOpenEventLog.Call( - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(servername))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(sourcename)))) - - return HANDLE(ret) -} - -func ReadEventLog(eventlog HANDLE, readflags, recordoffset uint32, buffer []byte, numberofbytestoread uint32, bytesread, minnumberofbytesneeded *uint32) bool { - ret, _, _ := procReadEventLog.Call( - uintptr(eventlog), - uintptr(readflags), - uintptr(recordoffset), - uintptr(unsafe.Pointer(&buffer[0])), - uintptr(numberofbytestoread), - uintptr(unsafe.Pointer(bytesread)), - uintptr(unsafe.Pointer(minnumberofbytesneeded))) - - return ret != 0 -} - -func CloseEventLog(eventlog HANDLE) bool { - ret, _, _ := procCloseEventLog.Call( - uintptr(eventlog)) - - return ret != 0 -} - -func OpenSCManager(lpMachineName, lpDatabaseName string, dwDesiredAccess uint32) (HANDLE, error) { - var p1, p2 uintptr - if len(lpMachineName) > 0 { - p1 = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpMachineName))) - } - if len(lpDatabaseName) > 0 { - p2 = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpDatabaseName))) - } - ret, _, _ := procOpenSCManager.Call( - p1, - p2, - uintptr(dwDesiredAccess)) - - if ret == 0 { - return 0, syscall.GetLastError() - } - - return HANDLE(ret), nil -} - -func CloseServiceHandle(hSCObject HANDLE) error { - ret, _, _ := procCloseServiceHandle.Call(uintptr(hSCObject)) - if ret == 0 { - return syscall.GetLastError() - } - return nil -} - -func OpenService(hSCManager HANDLE, lpServiceName string, dwDesiredAccess uint32) (HANDLE, error) { - ret, _, _ := procOpenService.Call( - uintptr(hSCManager), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpServiceName))), - uintptr(dwDesiredAccess)) - - if ret == 0 { - return 0, syscall.GetLastError() - } - - return HANDLE(ret), nil -} - -func StartService(hService HANDLE, lpServiceArgVectors []string) error { - l := len(lpServiceArgVectors) - var ret uintptr - if l == 0 { - ret, _, _ = procStartService.Call( - uintptr(hService), - 0, - 0) - } else { - lpArgs := make([]uintptr, l) - for i := 0; i < l; i++ { - lpArgs[i] = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpServiceArgVectors[i]))) - } - - ret, _, _ = procStartService.Call( - uintptr(hService), - uintptr(l), - uintptr(unsafe.Pointer(&lpArgs[0]))) - } - - if ret == 0 { - return syscall.GetLastError() - } - - return nil -} - -func ControlService(hService HANDLE, dwControl uint32, lpServiceStatus *SERVICE_STATUS) bool { - if lpServiceStatus == nil { - panic("ControlService:lpServiceStatus cannot be nil") - } - - ret, _, _ := procControlService.Call( - uintptr(hService), - uintptr(dwControl), - uintptr(unsafe.Pointer(lpServiceStatus))) - - return ret != 0 -} - -func ControlTrace(hTrace TRACEHANDLE, lpSessionName string, props *EVENT_TRACE_PROPERTIES, dwControl uint32) (success bool, e error) { - - ret, _, _ := procControlTrace.Call( - uintptr(unsafe.Pointer(hTrace)), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpSessionName))), - uintptr(unsafe.Pointer(props)), - uintptr(dwControl)) - - if ret == ERROR_SUCCESS { - return true, nil - } - e = errors.New(fmt.Sprintf("error: 0x%x", ret)) - return -} - -func StartTrace(lpSessionName string, props *EVENT_TRACE_PROPERTIES) (hTrace TRACEHANDLE, e error) { - - ret, _, _ := procStartTrace.Call( - uintptr(unsafe.Pointer(&hTrace)), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpSessionName))), - uintptr(unsafe.Pointer(props))) - - if ret == ERROR_SUCCESS { - return - } - e = errors.New(fmt.Sprintf("error: 0x%x", ret)) - return -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa378863(v=vs.85).aspx -func InitializeSecurityDescriptor(rev uint16) (pSecurityDescriptor *SECURITY_DESCRIPTOR, e error) { - - pSecurityDescriptor = &SECURITY_DESCRIPTOR{} - - ret, _, _ := procInitializeSecurityDescriptor.Call( - uintptr(unsafe.Pointer(pSecurityDescriptor)), - uintptr(rev), - ) - - if ret != 0 { - return - } - e = syscall.GetLastError() - return -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa379583(v=vs.85).aspx -func SetSecurityDescriptorDacl(pSecurityDescriptor *SECURITY_DESCRIPTOR, pDacl *ACL) (e error) { - - if pSecurityDescriptor == nil { - return errors.New("null descriptor") - } - - var ret uintptr - if pDacl == nil { - ret, _, _ = procSetSecurityDescriptorDacl.Call( - uintptr(unsafe.Pointer(pSecurityDescriptor)), - uintptr(1), // DaclPresent - uintptr(0), // pDacl - uintptr(0), // DaclDefaulted - ) - } else { - ret, _, _ = procSetSecurityDescriptorDacl.Call( - uintptr(unsafe.Pointer(pSecurityDescriptor)), - uintptr(1), // DaclPresent - uintptr(unsafe.Pointer(pDacl)), - uintptr(0), //DaclDefaulted - ) - } - - if ret != 0 { - return - } - e = syscall.GetLastError() - return -} diff --git a/packages/w32/advapi32_constants.go b/packages/w32/advapi32_constants.go deleted file mode 100644 index fa3c7674..00000000 --- a/packages/w32/advapi32_constants.go +++ /dev/null @@ -1,300 +0,0 @@ -package w32 - -// Registry predefined keys -const ( - HKEY_CLASSES_ROOT HKEY = 0x80000000 - HKEY_CURRENT_USER HKEY = 0x80000001 - HKEY_LOCAL_MACHINE HKEY = 0x80000002 - HKEY_USERS HKEY = 0x80000003 - HKEY_PERFORMANCE_DATA HKEY = 0x80000004 - HKEY_CURRENT_CONFIG HKEY = 0x80000005 - HKEY_DYN_DATA HKEY = 0x80000006 -) - -// Registry Key Security and Access Rights -const ( - KEY_ALL_ACCESS = 0xF003F - KEY_CREATE_SUB_KEY = 0x0004 - KEY_ENUMERATE_SUB_KEYS = 0x0008 - KEY_NOTIFY = 0x0010 - KEY_QUERY_VALUE = 0x0001 - KEY_SET_VALUE = 0x0002 - KEY_READ = 0x20019 - KEY_WRITE = 0x20006 -) - -const ( - NFR_ANSI = 1 - NFR_UNICODE = 2 - NF_QUERY = 3 - NF_REQUERY = 4 -) - -// Registry value types -const ( - RRF_RT_REG_NONE = 0x00000001 - RRF_RT_REG_SZ = 0x00000002 - RRF_RT_REG_EXPAND_SZ = 0x00000004 - RRF_RT_REG_BINARY = 0x00000008 - RRF_RT_REG_DWORD = 0x00000010 - RRF_RT_REG_MULTI_SZ = 0x00000020 - RRF_RT_REG_QWORD = 0x00000040 - RRF_RT_DWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD) - RRF_RT_QWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD) - RRF_RT_ANY = 0x0000ffff - RRF_NOEXPAND = 0x10000000 - RRF_ZEROONFAILURE = 0x20000000 - REG_PROCESS_APPKEY = 0x00000001 - REG_MUI_STRING_TRUNCATE = 0x00000001 -) - -// Service Control Manager object specific access types -const ( - SC_MANAGER_CONNECT = 0x0001 - SC_MANAGER_CREATE_SERVICE = 0x0002 - SC_MANAGER_ENUMERATE_SERVICE = 0x0004 - SC_MANAGER_LOCK = 0x0008 - SC_MANAGER_QUERY_LOCK_STATUS = 0x0010 - SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020 - SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG -) - -// Service Types (Bit Mask) -const ( - SERVICE_KERNEL_DRIVER = 0x00000001 - SERVICE_FILE_SYSTEM_DRIVER = 0x00000002 - SERVICE_ADAPTER = 0x00000004 - SERVICE_RECOGNIZER_DRIVER = 0x00000008 - SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER - SERVICE_WIN32_OWN_PROCESS = 0x00000010 - SERVICE_WIN32_SHARE_PROCESS = 0x00000020 - SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS - SERVICE_INTERACTIVE_PROCESS = 0x00000100 - SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS -) - -// Service State -- for CurrentState -const ( - SERVICE_STOPPED = 0x00000001 - SERVICE_START_PENDING = 0x00000002 - SERVICE_STOP_PENDING = 0x00000003 - SERVICE_RUNNING = 0x00000004 - SERVICE_CONTINUE_PENDING = 0x00000005 - SERVICE_PAUSE_PENDING = 0x00000006 - SERVICE_PAUSED = 0x00000007 -) - -// Controls Accepted (Bit Mask) -const ( - SERVICE_ACCEPT_STOP = 0x00000001 - SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002 - SERVICE_ACCEPT_SHUTDOWN = 0x00000004 - SERVICE_ACCEPT_PARAMCHANGE = 0x00000008 - SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010 - SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020 - SERVICE_ACCEPT_POWEREVENT = 0x00000040 - SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080 - SERVICE_ACCEPT_PRESHUTDOWN = 0x00000100 - SERVICE_ACCEPT_TIMECHANGE = 0x00000200 - SERVICE_ACCEPT_TRIGGEREVENT = 0x00000400 -) - -// Service object specific access type -const ( - SERVICE_QUERY_CONFIG = 0x0001 - SERVICE_CHANGE_CONFIG = 0x0002 - SERVICE_QUERY_STATUS = 0x0004 - SERVICE_ENUMERATE_DEPENDENTS = 0x0008 - SERVICE_START = 0x0010 - SERVICE_STOP = 0x0020 - SERVICE_PAUSE_CONTINUE = 0x0040 - SERVICE_INTERROGATE = 0x0080 - SERVICE_USER_DEFINED_CONTROL = 0x0100 - - SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | - SERVICE_QUERY_CONFIG | - SERVICE_CHANGE_CONFIG | - SERVICE_QUERY_STATUS | - SERVICE_ENUMERATE_DEPENDENTS | - SERVICE_START | - SERVICE_STOP | - SERVICE_PAUSE_CONTINUE | - SERVICE_INTERROGATE | - SERVICE_USER_DEFINED_CONTROL -) - -const ( - KERNEL_LOGGER_NAME = "NT Kernel Logger" -) - -// WNODE flags, for ETW (Event Tracing for Windows) / WMI -const ( - WNODE_FLAG_ALL_DATA = 0x00000001 - WNODE_FLAG_SINGLE_INSTANCE = 0x00000002 - WNODE_FLAG_SINGLE_ITEM = 0x00000004 - WNODE_FLAG_EVENT_ITEM = 0x00000008 - WNODE_FLAG_FIXED_INSTANCE_SIZE = 0x00000010 - WNODE_FLAG_TOO_SMALL = 0x00000020 - WNODE_FLAG_INSTANCES_SAME = 0x00000040 - WNODE_FLAG_STATIC_INSTANCE_NAMES = 0x00000080 - WNODE_FLAG_INTERNAL = 0x00000100 - WNODE_FLAG_USE_TIMESTAMP = 0x00000200 - WNODE_FLAG_PERSIST_EVENT = 0x00000400 - WNODE_FLAG_EVENT_REFERENCE = 0x00002000 - WNODE_FLAG_ANSI_INSTANCENAMES = 0x00004000 - WNODE_FLAG_METHOD_ITEM = 0x00008000 - WNODE_FLAG_PDO_INSTANCE_NAMES = 0x00010000 - WNODE_FLAG_TRACED_GUID = 0x00020000 - WNODE_FLAG_LOG_WNODE = 0x00040000 - WNODE_FLAG_USE_GUID_PTR = 0x00080000 - WNODE_FLAG_USE_MOF_PTR = 0x00100000 - WNODE_FLAG_NO_HEADER = 0x00200000 - WNODE_FLAG_SEVERITY_MASK = 0xff000000 -) - -// ETW flags and types etc -const ( - EVENT_TRACE_TYPE_INFO = 0x00 - EVENT_TRACE_TYPE_START = 0x01 - EVENT_TRACE_TYPE_END = 0x02 - EVENT_TRACE_TYPE_STOP = 0x02 - EVENT_TRACE_TYPE_DC_START = 0x03 - EVENT_TRACE_TYPE_DC_END = 0x04 - EVENT_TRACE_TYPE_EXTENSION = 0x05 - EVENT_TRACE_TYPE_REPLY = 0x06 - EVENT_TRACE_TYPE_DEQUEUE = 0x07 - EVENT_TRACE_TYPE_RESUME = 0x07 - EVENT_TRACE_TYPE_CHECKPOINT = 0x08 - EVENT_TRACE_TYPE_SUSPEND = 0x08 - EVENT_TRACE_TYPE_WINEVT_SEND = 0x09 - EVENT_TRACE_TYPE_WINEVT_RECEIVE = 0XF0 - TRACE_LEVEL_NONE = 0 - TRACE_LEVEL_CRITICAL = 1 - TRACE_LEVEL_FATAL = 1 - TRACE_LEVEL_ERROR = 2 - TRACE_LEVEL_WARNING = 3 - TRACE_LEVEL_INFORMATION = 4 - TRACE_LEVEL_VERBOSE = 5 - TRACE_LEVEL_RESERVED6 = 6 - TRACE_LEVEL_RESERVED7 = 7 - TRACE_LEVEL_RESERVED8 = 8 - TRACE_LEVEL_RESERVED9 = 9 - EVENT_TRACE_TYPE_LOAD = 0x0A - EVENT_TRACE_TYPE_IO_READ = 0x0A - EVENT_TRACE_TYPE_IO_WRITE = 0x0B - EVENT_TRACE_TYPE_IO_READ_INIT = 0x0C - EVENT_TRACE_TYPE_IO_WRITE_INIT = 0x0D - EVENT_TRACE_TYPE_IO_FLUSH = 0x0E - EVENT_TRACE_TYPE_IO_FLUSH_INIT = 0x0F - EVENT_TRACE_TYPE_MM_TF = 0x0A - EVENT_TRACE_TYPE_MM_DZF = 0x0B - EVENT_TRACE_TYPE_MM_COW = 0x0C - EVENT_TRACE_TYPE_MM_GPF = 0x0D - EVENT_TRACE_TYPE_MM_HPF = 0x0E - EVENT_TRACE_TYPE_MM_AV = 0x0F - EVENT_TRACE_TYPE_SEND = 0x0A - EVENT_TRACE_TYPE_RECEIVE = 0x0B - EVENT_TRACE_TYPE_CONNECT = 0x0C - EVENT_TRACE_TYPE_DISCONNECT = 0x0D - EVENT_TRACE_TYPE_RETRANSMIT = 0x0E - EVENT_TRACE_TYPE_ACCEPT = 0x0F - EVENT_TRACE_TYPE_RECONNECT = 0x10 - EVENT_TRACE_TYPE_CONNFAIL = 0x11 - EVENT_TRACE_TYPE_COPY_TCP = 0x12 - EVENT_TRACE_TYPE_COPY_ARP = 0x13 - EVENT_TRACE_TYPE_ACKFULL = 0x14 - EVENT_TRACE_TYPE_ACKPART = 0x15 - EVENT_TRACE_TYPE_ACKDUP = 0x16 - EVENT_TRACE_TYPE_GUIDMAP = 0x0A - EVENT_TRACE_TYPE_CONFIG = 0x0B - EVENT_TRACE_TYPE_SIDINFO = 0x0C - EVENT_TRACE_TYPE_SECURITY = 0x0D - EVENT_TRACE_TYPE_REGCREATE = 0x0A - EVENT_TRACE_TYPE_REGOPEN = 0x0B - EVENT_TRACE_TYPE_REGDELETE = 0x0C - EVENT_TRACE_TYPE_REGQUERY = 0x0D - EVENT_TRACE_TYPE_REGSETVALUE = 0x0E - EVENT_TRACE_TYPE_REGDELETEVALUE = 0x0F - EVENT_TRACE_TYPE_REGQUERYVALUE = 0x10 - EVENT_TRACE_TYPE_REGENUMERATEKEY = 0x11 - EVENT_TRACE_TYPE_REGENUMERATEVALUEKEY = 0x12 - EVENT_TRACE_TYPE_REGQUERYMULTIPLEVALUE = 0x13 - EVENT_TRACE_TYPE_REGSETINFORMATION = 0x14 - EVENT_TRACE_TYPE_REGFLUSH = 0x15 - EVENT_TRACE_TYPE_REGKCBCREATE = 0x16 - EVENT_TRACE_TYPE_REGKCBDELETE = 0x17 - EVENT_TRACE_TYPE_REGKCBRUNDOWNBEGIN = 0x18 - EVENT_TRACE_TYPE_REGKCBRUNDOWNEND = 0x19 - EVENT_TRACE_TYPE_REGVIRTUALIZE = 0x1A - EVENT_TRACE_TYPE_REGCLOSE = 0x1B - EVENT_TRACE_TYPE_REGSETSECURITY = 0x1C - EVENT_TRACE_TYPE_REGQUERYSECURITY = 0x1D - EVENT_TRACE_TYPE_REGCOMMIT = 0x1E - EVENT_TRACE_TYPE_REGPREPARE = 0x1F - EVENT_TRACE_TYPE_REGROLLBACK = 0x20 - EVENT_TRACE_TYPE_REGMOUNTHIVE = 0x21 - EVENT_TRACE_TYPE_CONFIG_CPU = 0x0A - EVENT_TRACE_TYPE_CONFIG_PHYSICALDISK = 0x0B - EVENT_TRACE_TYPE_CONFIG_LOGICALDISK = 0x0C - EVENT_TRACE_TYPE_CONFIG_NIC = 0x0D - EVENT_TRACE_TYPE_CONFIG_VIDEO = 0x0E - EVENT_TRACE_TYPE_CONFIG_SERVICES = 0x0F - EVENT_TRACE_TYPE_CONFIG_POWER = 0x10 - EVENT_TRACE_TYPE_CONFIG_NETINFO = 0x11 - EVENT_TRACE_TYPE_CONFIG_IRQ = 0x15 - EVENT_TRACE_TYPE_CONFIG_PNP = 0x16 - EVENT_TRACE_TYPE_CONFIG_IDECHANNEL = 0x17 - EVENT_TRACE_TYPE_CONFIG_PLATFORM = 0x19 - EVENT_TRACE_FLAG_PROCESS = 0x00000001 - EVENT_TRACE_FLAG_THREAD = 0x00000002 - EVENT_TRACE_FLAG_IMAGE_LOAD = 0x00000004 - EVENT_TRACE_FLAG_DISK_IO = 0x00000100 - EVENT_TRACE_FLAG_DISK_FILE_IO = 0x00000200 - EVENT_TRACE_FLAG_MEMORY_PAGE_FAULTS = 0x00001000 - EVENT_TRACE_FLAG_MEMORY_HARD_FAULTS = 0x00002000 - EVENT_TRACE_FLAG_NETWORK_TCPIP = 0x00010000 - EVENT_TRACE_FLAG_REGISTRY = 0x00020000 - EVENT_TRACE_FLAG_DBGPRINT = 0x00040000 - EVENT_TRACE_FLAG_PROCESS_COUNTERS = 0x00000008 - EVENT_TRACE_FLAG_CSWITCH = 0x00000010 - EVENT_TRACE_FLAG_DPC = 0x00000020 - EVENT_TRACE_FLAG_INTERRUPT = 0x00000040 - EVENT_TRACE_FLAG_SYSTEMCALL = 0x00000080 - EVENT_TRACE_FLAG_DISK_IO_INIT = 0x00000400 - EVENT_TRACE_FLAG_ALPC = 0x00100000 - EVENT_TRACE_FLAG_SPLIT_IO = 0x00200000 - EVENT_TRACE_FLAG_DRIVER = 0x00800000 - EVENT_TRACE_FLAG_PROFILE = 0x01000000 - EVENT_TRACE_FLAG_FILE_IO = 0x02000000 - EVENT_TRACE_FLAG_FILE_IO_INIT = 0x04000000 - EVENT_TRACE_FLAG_DISPATCHER = 0x00000800 - EVENT_TRACE_FLAG_VIRTUAL_ALLOC = 0x00004000 - EVENT_TRACE_FLAG_EXTENSION = 0x80000000 - EVENT_TRACE_FLAG_FORWARD_WMI = 0x40000000 - EVENT_TRACE_FLAG_ENABLE_RESERVE = 0x20000000 - EVENT_TRACE_FILE_MODE_NONE = 0x00000000 - EVENT_TRACE_FILE_MODE_SEQUENTIAL = 0x00000001 - EVENT_TRACE_FILE_MODE_CIRCULAR = 0x00000002 - EVENT_TRACE_FILE_MODE_APPEND = 0x00000004 - EVENT_TRACE_REAL_TIME_MODE = 0x00000100 - EVENT_TRACE_DELAY_OPEN_FILE_MODE = 0x00000200 - EVENT_TRACE_BUFFERING_MODE = 0x00000400 - EVENT_TRACE_PRIVATE_LOGGER_MODE = 0x00000800 - EVENT_TRACE_ADD_HEADER_MODE = 0x00001000 - EVENT_TRACE_USE_GLOBAL_SEQUENCE = 0x00004000 - EVENT_TRACE_USE_LOCAL_SEQUENCE = 0x00008000 - EVENT_TRACE_RELOG_MODE = 0x00010000 - EVENT_TRACE_USE_PAGED_MEMORY = 0x01000000 - EVENT_TRACE_FILE_MODE_NEWFILE = 0x00000008 - EVENT_TRACE_FILE_MODE_PREALLOCATE = 0x00000020 - EVENT_TRACE_NONSTOPPABLE_MODE = 0x00000040 - EVENT_TRACE_SECURE_MODE = 0x00000080 - EVENT_TRACE_USE_KBYTES_FOR_SIZE = 0x00002000 - EVENT_TRACE_PRIVATE_IN_PROC = 0x00020000 - EVENT_TRACE_MODE_RESERVED = 0x00100000 - EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING = 0x10000000 - EVENT_TRACE_CONTROL_QUERY = 0 - EVENT_TRACE_CONTROL_STOP = 1 - EVENT_TRACE_CONTROL_UPDATE = 2 - EVENT_TRACE_CONTROL_FLUSH = 3 -) diff --git a/packages/w32/advapi32_typedef.go b/packages/w32/advapi32_typedef.go deleted file mode 100644 index 3a4308c4..00000000 --- a/packages/w32/advapi32_typedef.go +++ /dev/null @@ -1,122 +0,0 @@ -package w32 - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa374931(v=vs.85).aspx -type ACL struct { - AclRevision byte - Sbz1 byte - AclSize uint16 - AceCount uint16 - Sbz2 uint16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa379561(v=vs.85).aspx - -type SECURITY_DESCRIPTOR_CONTROL uint16 - -type SECURITY_DESCRIPTOR struct { - Revision byte - Sbz1 byte - Control SECURITY_DESCRIPTOR_CONTROL - Owner uintptr - Group uintptr - Sacl *ACL - Dacl *ACL -} - -type SID_IDENTIFIER_AUTHORITY struct { - Value [6]byte -} - -// typedef struct _SID // 4 elements, 0xC bytes (sizeof) -// { -// /*0x000*/ UINT8 Revision; -// /*0x001*/ UINT8 SubAuthorityCount; -// /*0x002*/ struct _SID_IDENTIFIER_AUTHORITY IdentifierAuthority; // 1 elements, 0x6 bytes (sizeof) -// /*0x008*/ ULONG32 SubAuthority[1]; -// }SID, *PSID; -type SID struct { - Revision byte - SubAuthorityCount byte - IdentifierAuthority SID_IDENTIFIER_AUTHORITY - SubAuthority uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa363646.aspx -type EVENTLOGRECORD struct { - Length uint32 - Reserved uint32 - RecordNumber uint32 - TimeGenerated uint32 - TimeWritten uint32 - EventID uint32 - EventType uint16 - NumStrings uint16 - EventCategory uint16 - ReservedFlags uint16 - ClosingRecordNumber uint32 - StringOffset uint32 - UserSidLength uint32 - UserSidOffset uint32 - DataLength uint32 - DataOffset uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms685996.aspx -type SERVICE_STATUS struct { - DwServiceType uint32 - DwCurrentState uint32 - DwControlsAccepted uint32 - DwWin32ExitCode uint32 - DwServiceSpecificExitCode uint32 - DwCheckPoint uint32 - DwWaitHint uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa364160(v=vs.85).aspx -type WNODE_HEADER struct { - BufferSize uint32 - ProviderId uint32 - HistoricalContext uint64 - KernelHandle HANDLE - Guid GUID - ClientContext uint32 - Flags uint32 -} - -// These partially compensate for the anonymous unions we removed, but there -// are no setters. -func (w WNODE_HEADER) TimeStamp() uint64 { - // TODO: Cast to the stupid LARGE_INTEGER struct which is, itself, nasty - // and union-y - return uint64(w.KernelHandle) -} - -func (w WNODE_HEADER) Version() uint32 { - return uint32(w.HistoricalContext >> 32) -} - -func (w WNODE_HEADER) Linkage() uint32 { - return uint32(w.HistoricalContext) -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa363784(v=vs.85).aspx -type EVENT_TRACE_PROPERTIES struct { - Wnode WNODE_HEADER - BufferSize uint32 - MinimumBuffers uint32 - MaximumBuffers uint32 - MaximumFileSize uint32 - LogFileMode uint32 - FlushTimer uint32 - EnableFlags uint32 - AgeLimit int32 - NumberOfBuffers uint32 - FreeBuffers uint32 - EventsLost uint32 - BuffersWritten uint32 - LogBuffersLost uint32 - RealTimeBuffersLost uint32 - LoggerThreadId HANDLE - LogFileNameOffset uint32 - LoggerNameOffset uint32 -} diff --git a/packages/w32/alpc.go b/packages/w32/alpc.go deleted file mode 100644 index 408d47ed..00000000 --- a/packages/w32/alpc.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "fmt" - // "github.com/davecgh/go-spew/spew" - "syscall" - "unsafe" -) - -var ( - modntdll = syscall.NewLazyDLL("ntdll.dll") - - procAlpcGetMessageAttribute = modntdll.NewProc("AlpcGetMessageAttribute") - procNtAlpcAcceptConnectPort = modntdll.NewProc("NtAlpcAcceptConnectPort") - procNtAlpcCancelMessage = modntdll.NewProc("NtAlpcCancelMessage") - procNtAlpcConnectPort = modntdll.NewProc("NtAlpcConnectPort") - procNtAlpcCreatePort = modntdll.NewProc("NtAlpcCreatePort") - procNtAlpcDisconnectPort = modntdll.NewProc("NtAlpcDisconnectPort") - procNtAlpcSendWaitReceivePort = modntdll.NewProc("NtAlpcSendWaitReceivePort") - procRtlCreateUnicodeStringFromAsciiz = modntdll.NewProc("RtlCreateUnicodeStringFromAsciiz") -) - -//func RtlCreateUnicodeStringFromAsciiz(s string) (us UNICODE_STRING, e error) { -// -// cs := C.CString(s) -// defer C.free(unsafe.Pointer(cs)) -// -// ret, _, lastErr := procRtlCreateUnicodeStringFromAsciiz.Call( -// uintptr(unsafe.Pointer(&us)), -// uintptr(unsafe.Pointer(cs)), -// ) -// -// if ret != 1 { // ret is a BOOL ( I think ) -// e = lastErr -// } -// -// return -//} - -//func newUnicodeString(s string) (us UNICODE_STRING, e error) { -// // TODO probably not the most efficient way to do this, but I couldn't -// // work out how to manually initialize the UNICODE_STRING struct in a way -// // that the ALPC subsystem liked. -// us, e = RtlCreateUnicodeStringFromAsciiz(s) -// return -//} - -// (this is a macro) -// VOID InitializeObjectAttributes( -// [out] POBJECT_ATTRIBUTES InitializedAttributes, -// [in] PUNICODE_STRING ObjectName, -// [in] ULONG Attributes, -// [in] HANDLE RootDirectory, -// [in, optional] PSECURITY_DESCRIPTOR SecurityDescriptor -// ) -//func InitializeObjectAttributes( -// name string, -// attributes uint32, -// rootDir HANDLE, -// pSecurityDescriptor *SECURITY_DESCRIPTOR, -//) (oa OBJECT_ATTRIBUTES, e error) { -// -// oa = OBJECT_ATTRIBUTES{ -// RootDirectory: rootDir, -// Attributes: attributes, -// SecurityDescriptor: pSecurityDescriptor, -// } -// oa.Length = uint32(unsafe.Sizeof(oa)) -// -// if len(name) > 0 { -// us, err := newUnicodeString(name) -// if err != nil { -// e = err -// return -// } -// oa.ObjectName = &us -// } -// -// return -//} - -// NTSTATUS -// NtAlpcCreatePort( -// __out PHANDLE PortHandle, -// __in POBJECT_ATTRIBUTES ObjectAttributes, -// __in_opt PALPC_PORT_ATTRIBUTES PortAttributes -// ); -func NtAlpcCreatePort(pObjectAttributes *OBJECT_ATTRIBUTES, pPortAttributes *ALPC_PORT_ATTRIBUTES) (hPort HANDLE, e error) { - - ret, _, _ := procNtAlpcCreatePort.Call( - uintptr(unsafe.Pointer(&hPort)), - uintptr(unsafe.Pointer(pObjectAttributes)), - uintptr(unsafe.Pointer(pPortAttributes)), - ) - - if ret != ERROR_SUCCESS { - return hPort, fmt.Errorf("0x%x", ret) - } - - return -} - -// NTSTATUS -// NtAlpcConnectPort( -// __out PHANDLE PortHandle, -// __in PUNICODE_STRING PortName, -// __in POBJECT_ATTRIBUTES ObjectAttributes, -// __in_opt PALPC_PORT_ATTRIBUTES PortAttributes, -// __in ULONG Flags, -// __in_opt PSID RequiredServerSid, -// __inout PPORT_MESSAGE ConnectionMessage, -// __inout_opt PULONG BufferLength, -// __inout_opt PALPC_MESSAGE_ATTRIBUTES OutMessageAttributes, -// __inout_opt PALPC_MESSAGE_ATTRIBUTES InMessageAttributes, -// __in_opt PLARGE_INTEGER Timeout -// ); -//func NtAlpcConnectPort( -// destPort string, -// pClientObjAttrs *OBJECT_ATTRIBUTES, -// pClientAlpcPortAttrs *ALPC_PORT_ATTRIBUTES, -// flags uint32, -// pRequiredServerSid *SID, -// pConnMsg *AlpcShortMessage, -// pBufLen *uint32, -// pOutMsgAttrs *ALPC_MESSAGE_ATTRIBUTES, -// pInMsgAttrs *ALPC_MESSAGE_ATTRIBUTES, -// timeout *int64, -//) (hPort HANDLE, e error) { -// -// destPortU, e := newUnicodeString(destPort) -// if e != nil { -// return -// } -// -// ret, _, _ := procNtAlpcConnectPort.Call( -// uintptr(unsafe.Pointer(&hPort)), -// uintptr(unsafe.Pointer(&destPortU)), -// uintptr(unsafe.Pointer(pClientObjAttrs)), -// uintptr(unsafe.Pointer(pClientAlpcPortAttrs)), -// uintptr(flags), -// uintptr(unsafe.Pointer(pRequiredServerSid)), -// uintptr(unsafe.Pointer(pConnMsg)), -// uintptr(unsafe.Pointer(pBufLen)), -// uintptr(unsafe.Pointer(pOutMsgAttrs)), -// uintptr(unsafe.Pointer(pInMsgAttrs)), -// uintptr(unsafe.Pointer(timeout)), -// ) -// -// if ret != ERROR_SUCCESS { -// e = fmt.Errorf("0x%x", ret) -// } -// return -//} - -// NTSTATUS -// NtAlpcAcceptConnectPort( -// __out PHANDLE PortHandle, -// __in HANDLE ConnectionPortHandle, -// __in ULONG Flags, -// __in POBJECT_ATTRIBUTES ObjectAttributes, -// __in PALPC_PORT_ATTRIBUTES PortAttributes, -// __in_opt PVOID PortContext, -// __in PPORT_MESSAGE ConnectionRequest, -// __inout_opt PALPC_MESSAGE_ATTRIBUTES ConnectionMessageAttributes, -// __in BOOLEAN AcceptConnection -// ); -func NtAlpcAcceptConnectPort( - hSrvConnPort HANDLE, - flags uint32, - pObjAttr *OBJECT_ATTRIBUTES, - pPortAttr *ALPC_PORT_ATTRIBUTES, - pContext *AlpcPortContext, - pConnReq *AlpcShortMessage, - pConnMsgAttrs *ALPC_MESSAGE_ATTRIBUTES, - accept uintptr, -) (hPort HANDLE, e error) { - - ret, _, _ := procNtAlpcAcceptConnectPort.Call( - uintptr(unsafe.Pointer(&hPort)), - uintptr(hSrvConnPort), - uintptr(flags), - uintptr(unsafe.Pointer(pObjAttr)), - uintptr(unsafe.Pointer(pPortAttr)), - uintptr(unsafe.Pointer(pContext)), - uintptr(unsafe.Pointer(pConnReq)), - uintptr(unsafe.Pointer(pConnMsgAttrs)), - accept, - ) - - if ret != ERROR_SUCCESS { - e = fmt.Errorf("0x%x", ret) - } - return -} - -// NTSTATUS -// NtAlpcSendWaitReceivePort( -// __in HANDLE PortHandle, -// __in ULONG Flags, -// __in_opt PPORT_MESSAGE SendMessage, -// __in_opt PALPC_MESSAGE_ATTRIBUTES SendMessageAttributes, -// __inout_opt PPORT_MESSAGE ReceiveMessage, -// __inout_opt PULONG BufferLength, -// __inout_opt PALPC_MESSAGE_ATTRIBUTES ReceiveMessageAttributes, -// __in_opt PLARGE_INTEGER Timeout -// ); -func NtAlpcSendWaitReceivePort( - hPort HANDLE, - flags uint32, - sendMsg *AlpcShortMessage, // Should actually point to PORT_MESSAGE + payload - sendMsgAttrs *ALPC_MESSAGE_ATTRIBUTES, - recvMsg *AlpcShortMessage, - recvBufLen *uint32, - recvMsgAttrs *ALPC_MESSAGE_ATTRIBUTES, - timeout *int64, // use native int64 -) (e error) { - - ret, _, _ := procNtAlpcSendWaitReceivePort.Call( - uintptr(hPort), - uintptr(flags), - uintptr(unsafe.Pointer(sendMsg)), - uintptr(unsafe.Pointer(sendMsgAttrs)), - uintptr(unsafe.Pointer(recvMsg)), - uintptr(unsafe.Pointer(recvBufLen)), - uintptr(unsafe.Pointer(recvMsgAttrs)), - uintptr(unsafe.Pointer(timeout)), - ) - - if ret != ERROR_SUCCESS { - e = fmt.Errorf("0x%x", ret) - } - return -} - -// NTSYSAPI -// PVOID -// NTAPI -// AlpcGetMessageAttribute( -// __in PALPC_MESSAGE_ATTRIBUTES Buffer, -// __in ULONG AttributeFlag -// ); - -// This basically returns a pointer to the correct struct for whichever -// message attribute you asked for. In Go terms, it returns unsafe.Pointer -// which you should then cast. Example: - -// ptr := AlpcGetMessageAttribute(&recvMsgAttrs, ALPC_MESSAGE_CONTEXT_ATTRIBUTE) -// if ptr != nil { -// context := (*ALPC_CONTEXT_ATTR)(ptr) -// } -func AlpcGetMessageAttribute(buf *ALPC_MESSAGE_ATTRIBUTES, attr uint32) unsafe.Pointer { - - ret, _, _ := procAlpcGetMessageAttribute.Call( - uintptr(unsafe.Pointer(buf)), - uintptr(attr), - ) - return unsafe.Pointer(ret) -} - -// NTSYSCALLAPI -// NTSTATUS -// NTAPI -// NtAlpcCancelMessage( -// __in HANDLE PortHandle, -// __in ULONG Flags, -// __in PALPC_CONTEXT_ATTR MessageContext -// ); -func NtAlpcCancelMessage(hPort HANDLE, flags uint32, pMsgContext *ALPC_CONTEXT_ATTR) (e error) { - - ret, _, _ := procNtAlpcCancelMessage.Call( - uintptr(hPort), - uintptr(flags), - uintptr(unsafe.Pointer(pMsgContext)), - ) - - if ret != ERROR_SUCCESS { - e = fmt.Errorf("0x%x", ret) - } - return -} - -// NTSYSCALLAPI -// NTSTATUS -// NTAPI -// NtAlpcDisconnectPort( -// __in HANDLE PortHandle, -// __in ULONG Flags -// ); -func NtAlpcDisconnectPort(hPort HANDLE, flags uint32) (e error) { - - ret, _, _ := procNtAlpcDisconnectPort.Call( - uintptr(hPort), - uintptr(flags), - ) - - if ret != ERROR_SUCCESS { - e = fmt.Errorf("0x%x", ret) - } - return -} diff --git a/packages/w32/alpc_constants.go b/packages/w32/alpc_constants.go deleted file mode 100644 index 82d9d2ed..00000000 --- a/packages/w32/alpc_constants.go +++ /dev/null @@ -1,64 +0,0 @@ -package w32 - -const ( - ALPC_PORFLG_ALLOW_LPC_REQUESTS = 0x20000 - ALPC_PORFLG_SYSTEM_PROCESS = 0x100000 - ALPC_PORFLG_WAITABLE_PORT = 0x40000 -) - -const ( - ALPC_MSGFLG_REPLY_MESSAGE = 0x1 - ALPC_MSGFLG_LPC_MODE = 0x2 // ? - ALPC_MSGFLG_RELEASE_MESSAGE = 0x10000 // dbg - ALPC_MSGFLG_SYNC_REQUEST = 0x20000 // dbg - ALPC_MSGFLG_WAIT_USER_MODE = 0x100000 - ALPC_MSGFLG_WAIT_ALERTABLE = 0x200000 - ALPC_MSGFLG_WOW64_CALL = 0x80000000 // dbg -) -const ( - ALPC_MESSAGE_SECURITY_ATTRIBUTE = 0x80000000 - ALPC_MESSAGE_VIEW_ATTRIBUTE = 0x40000000 - ALPC_MESSAGE_CONTEXT_ATTRIBUTE = 0x20000000 - ALPC_MESSAGE_HANDLE_ATTRIBUTE = 0x10000000 -) - -const ( - OBJ_INHERIT = 0x00000002 - OBJ_PERMANENT = 0x00000010 - OBJ_EXCLUSIVE = 0x00000020 - OBJ_CASE_INSENSITIVE = 0x00000040 - OBJ_OPENIF = 0x00000080 - OBJ_OPENLINK = 0x00000100 - OBJ_KERNEL_HANDLE = 0x00000200 -) - -const ( - LPC_REQUEST = 1 - LPC_REPLY = 2 - LPC_DATAGRAM = 3 - LPC_LOST_REPLY = 4 - LPC_PORT_CLOSED = 5 - LPC_CLIENT_DIED = 6 - LPC_EXCEPTION = 7 - LPC_DEBUG_EVENT = 8 - LPC_ERROR_EVENT = 9 - LPC_CONNECTION_REQUEST = 10 - LPC_CONTINUATION_REQUIRED = 0x2000 -) - -const ( - SecurityAnonymous uint32 = 1 - SecurityIdentification uint32 = 2 - SecurityImpersonation uint32 = 3 - SecurityDelegation uint32 = 4 -) - -const ( - SECURITY_DYNAMIC_TRACKING byte = 1 - SECURITY_STATIC_TRACKING byte = 0 -) - -const ( - ALPC_SYNC_OBJECT_TYPE uint32 = 2 - ALPC_THREAD_OBJECT_TYPE uint32 = 4 -) diff --git a/packages/w32/alpc_typedef.go b/packages/w32/alpc_typedef.go deleted file mode 100644 index 52b35c97..00000000 --- a/packages/w32/alpc_typedef.go +++ /dev/null @@ -1,181 +0,0 @@ -package w32 - -import ( - "errors" -) - -// nt!_ALPC_MESSAGE_ATTRIBUTES -// +0x000 AllocatedAttributes : Uint4B -// +0x004 ValidAttributes : Uint4B -type ALPC_MESSAGE_ATTRIBUTES struct { - AllocatedAttributes uint32 - ValidAttributes uint32 -} - -type ALPC_CONTEXT_ATTR struct { - PortContext *AlpcPortContext - MessageContext uintptr - Sequence uint32 - MessageId uint32 - CallbackId uint32 -} - -type ALPC_HANDLE_ATTR struct { - Flags uint32 - Handle HANDLE - ObjectType uint32 - DesiredAccess uint32 -} - -// nt!_CLIENT_ID -// +0x000 UniqueProcess : Ptr64 Void -// +0x008 UniqueThread : Ptr64 Void -type CLIENT_ID struct { - UniqueProcess uintptr - UniqueThread uintptr -} - -// nt!_UNICODE_STRING -// +0x000 Length : Uint2B -// +0x002 MaximumLength : Uint2B -// +0x008 Buffer : Ptr64 Uint2B -type UNICODE_STRING struct { - Length uint16 - MaximumLength uint16 - _ [4]byte // align to 0x08 - Buffer *uint16 -} - -// nt!_OBJECT_ATTRIBUTES -// +0x000 Length : Uint4B -// +0x008 RootDirectory : Ptr64 Void -// +0x010 ObjectName : Ptr64 _UNICODE_STRING -// +0x018 Attributes : Uint4B -// +0x020 SecurityDescriptor : Ptr64 Void -// +0x028 SecurityQualityOfService : Ptr64 Void -type OBJECT_ATTRIBUTES struct { - Length uint32 - _ [4]byte // align to 0x08 - RootDirectory HANDLE - ObjectName *UNICODE_STRING - Attributes uint32 - _ [4]byte // align to 0x20 - SecurityDescriptor *SECURITY_DESCRIPTOR - SecurityQualityOfService *SECURITY_QUALITY_OF_SERVICE -} - -// cf: http://j00ru.vexillium.org/?p=502 for legacy RPC -// nt!_PORT_MESSAGE -// +0x000 u1 : -// +0x004 u2 : -// +0x008 ClientId : _CLIENT_ID -// +0x008 DoNotUseThisField : Float -// +0x018 MessageId : Uint4B -// +0x020 ClientViewSize : Uint8B -// +0x020 CallbackId : Uint4B -type PORT_MESSAGE struct { - DataLength uint16 // These are the two unnamed unions - TotalLength uint16 // without Length and ZeroInit - Type uint16 - DataInfoOffset uint16 - ClientId CLIENT_ID - MessageId uint32 - _ [4]byte // align up to 0x20 - ClientViewSize uint64 -} - -func (pm PORT_MESSAGE) CallbackId() uint32 { - return uint32(pm.ClientViewSize >> 32) -} - -func (pm PORT_MESSAGE) DoNotUseThisField() float64 { - panic("WE TOLD YOU NOT TO USE THIS FIELD") -} - -const PORT_MESSAGE_SIZE = 0x28 - -// http://www.nirsoft.net/kernel_struct/vista/SECURITY_QUALITY_OF_SERVICE.html -type SECURITY_QUALITY_OF_SERVICE struct { - Length uint32 - ImpersonationLevel uint32 - ContextTrackingMode byte - EffectiveOnly byte - _ [2]byte // align to 12 bytes -} - -const SECURITY_QOS_SIZE = 12 - -// nt!_ALPC_PORT_ATTRIBUTES -// +0x000 Flags : Uint4B -// +0x004 SecurityQos : _SECURITY_QUALITY_OF_SERVICE -// +0x010 MaxMessageLength : Uint8B -// +0x018 MemoryBandwidth : Uint8B -// +0x020 MaxPoolUsage : Uint8B -// +0x028 MaxSectionSize : Uint8B -// +0x030 MaxViewSize : Uint8B -// +0x038 MaxTotalSectionSize : Uint8B -// +0x040 DupObjectTypes : Uint4B -// +0x044 Reserved : Uint4B -type ALPC_PORT_ATTRIBUTES struct { - Flags uint32 - SecurityQos SECURITY_QUALITY_OF_SERVICE - MaxMessageLength uint64 // must be filled out - MemoryBandwidth uint64 - MaxPoolUsage uint64 - MaxSectionSize uint64 - MaxViewSize uint64 - MaxTotalSectionSize uint64 - DupObjectTypes uint32 - Reserved uint32 -} - -const SHORT_MESSAGE_MAX_SIZE uint16 = 65535 // MAX_USHORT -const SHORT_MESSAGE_MAX_PAYLOAD uint16 = SHORT_MESSAGE_MAX_SIZE - PORT_MESSAGE_SIZE - -// LPC uses the first 4 bytes of the payload as an LPC Command, but this is -// NOT represented here, to allow the use of raw ALPC. For legacy LPC, callers -// must include the command as part of their payload. -type AlpcShortMessage struct { - PORT_MESSAGE - Data [SHORT_MESSAGE_MAX_PAYLOAD]byte -} - -func NewAlpcShortMessage() AlpcShortMessage { - sm := AlpcShortMessage{} - sm.TotalLength = SHORT_MESSAGE_MAX_SIZE - return sm -} - -func (sm *AlpcShortMessage) SetData(d []byte) (e error) { - - copy(sm.Data[:], d) - if len(d) > int(SHORT_MESSAGE_MAX_PAYLOAD) { - e = errors.New("data too big - truncated") - sm.DataLength = SHORT_MESSAGE_MAX_PAYLOAD - sm.TotalLength = SHORT_MESSAGE_MAX_SIZE - return - } - sm.TotalLength = uint16(PORT_MESSAGE_SIZE + len(d)) - sm.DataLength = uint16(len(d)) - return - -} - -// TODO - is this still useful? -func (sm *AlpcShortMessage) GetData() []byte { - if int(sm.DataLength) > int(SHORT_MESSAGE_MAX_PAYLOAD) { - return sm.Data[:] // truncate - } - return sm.Data[:sm.DataLength] -} - -func (sm *AlpcShortMessage) Reset() { - // zero the PORT_MESSAGE header - sm.PORT_MESSAGE = PORT_MESSAGE{} - sm.TotalLength = SHORT_MESSAGE_MAX_SIZE - sm.DataLength = 0 -} - -type AlpcPortContext struct { - Handle HANDLE -} diff --git a/packages/w32/comctl32.go b/packages/w32/comctl32.go deleted file mode 100644 index 4f4e6b53..00000000 --- a/packages/w32/comctl32.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modcomctl32 = syscall.NewLazyDLL("comctl32.dll") - - procInitCommonControlsEx = modcomctl32.NewProc("InitCommonControlsEx") - procImageList_Create = modcomctl32.NewProc("ImageList_Create") - procImageList_Destroy = modcomctl32.NewProc("ImageList_Destroy") - procImageList_GetImageCount = modcomctl32.NewProc("ImageList_GetImageCount") - procImageList_SetImageCount = modcomctl32.NewProc("ImageList_SetImageCount") - procImageList_Add = modcomctl32.NewProc("ImageList_Add") - procImageList_ReplaceIcon = modcomctl32.NewProc("ImageList_ReplaceIcon") - procImageList_Remove = modcomctl32.NewProc("ImageList_Remove") - procTrackMouseEvent = modcomctl32.NewProc("_TrackMouseEvent") -) - -func InitCommonControlsEx(lpInitCtrls *INITCOMMONCONTROLSEX) bool { - ret, _, _ := procInitCommonControlsEx.Call( - uintptr(unsafe.Pointer(lpInitCtrls))) - - return ret != 0 -} - -func ImageList_Create(cx, cy int, flags uint, cInitial, cGrow int) HIMAGELIST { - ret, _, _ := procImageList_Create.Call( - uintptr(cx), - uintptr(cy), - uintptr(flags), - uintptr(cInitial), - uintptr(cGrow)) - - if ret == 0 { - panic("Create image list failed") - } - - return HIMAGELIST(ret) -} - -func ImageList_Destroy(himl HIMAGELIST) bool { - ret, _, _ := procImageList_Destroy.Call( - uintptr(himl)) - - return ret != 0 -} - -func ImageList_GetImageCount(himl HIMAGELIST) int { - ret, _, _ := procImageList_GetImageCount.Call( - uintptr(himl)) - - return int(ret) -} - -func ImageList_SetImageCount(himl HIMAGELIST, uNewCount uint) bool { - ret, _, _ := procImageList_SetImageCount.Call( - uintptr(himl), - uintptr(uNewCount)) - - return ret != 0 -} - -func ImageList_Add(himl HIMAGELIST, hbmImage, hbmMask HBITMAP) int { - ret, _, _ := procImageList_Add.Call( - uintptr(himl), - uintptr(hbmImage), - uintptr(hbmMask)) - - return int(ret) -} - -func ImageList_ReplaceIcon(himl HIMAGELIST, i int, hicon HICON) int { - ret, _, _ := procImageList_ReplaceIcon.Call( - uintptr(himl), - uintptr(i), - uintptr(hicon)) - - return int(ret) -} - -func ImageList_AddIcon(himl HIMAGELIST, hicon HICON) int { - return ImageList_ReplaceIcon(himl, -1, hicon) -} - -func ImageList_Remove(himl HIMAGELIST, i int) bool { - ret, _, _ := procImageList_Remove.Call( - uintptr(himl), - uintptr(i)) - - return ret != 0 -} - -func ImageList_RemoveAll(himl HIMAGELIST) bool { - return ImageList_Remove(himl, -1) -} - -func TrackMouseEvent(tme *TRACKMOUSEEVENT) bool { - ret, _, _ := procTrackMouseEvent.Call( - uintptr(unsafe.Pointer(tme))) - - return ret != 0 -} diff --git a/packages/w32/comdlg32.go b/packages/w32/comdlg32.go deleted file mode 100644 index 37bc9858..00000000 --- a/packages/w32/comdlg32.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modcomdlg32 = syscall.NewLazyDLL("comdlg32.dll") - - procGetSaveFileName = modcomdlg32.NewProc("GetSaveFileNameW") - procGetOpenFileName = modcomdlg32.NewProc("GetOpenFileNameW") - procCommDlgExtendedError = modcomdlg32.NewProc("CommDlgExtendedError") -) - -func GetOpenFileName(ofn *OPENFILENAME) bool { - ret, _, _ := procGetOpenFileName.Call( - uintptr(unsafe.Pointer(ofn))) - - return ret != 0 -} - -func GetSaveFileName(ofn *OPENFILENAME) bool { - ret, _, _ := procGetSaveFileName.Call( - uintptr(unsafe.Pointer(ofn))) - - return ret != 0 -} - -func CommDlgExtendedError() uint { - ret, _, _ := procCommDlgExtendedError.Call() - - return uint(ret) -} diff --git a/packages/w32/constants.go b/packages/w32/constants.go deleted file mode 100644 index 1775ca83..00000000 --- a/packages/w32/constants.go +++ /dev/null @@ -1,2628 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -const ( - FALSE = 0 - TRUE = 1 -) - -const ( - NO_ERROR = 0 - ERROR_SUCCESS = 0 - ERROR_FILE_NOT_FOUND = 2 - ERROR_PATH_NOT_FOUND = 3 - ERROR_ACCESS_DENIED = 5 - ERROR_INVALID_HANDLE = 6 - ERROR_BAD_FORMAT = 11 - ERROR_INVALID_NAME = 123 - ERROR_MORE_DATA = 234 - ERROR_NO_MORE_ITEMS = 259 - ERROR_INVALID_SERVICE_CONTROL = 1052 - ERROR_SERVICE_REQUEST_TIMEOUT = 1053 - ERROR_SERVICE_NO_THREAD = 1054 - ERROR_SERVICE_DATABASE_LOCKED = 1055 - ERROR_SERVICE_ALREADY_RUNNING = 1056 - ERROR_SERVICE_DISABLED = 1058 - ERROR_SERVICE_DOES_NOT_EXIST = 1060 - ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061 - ERROR_SERVICE_NOT_ACTIVE = 1062 - ERROR_DATABASE_DOES_NOT_EXIST = 1065 - ERROR_SERVICE_DEPENDENCY_FAIL = 1068 - ERROR_SERVICE_LOGON_FAILED = 1069 - ERROR_SERVICE_MARKED_FOR_DELETE = 1072 - ERROR_SERVICE_DEPENDENCY_DELETED = 1075 -) - -const ( - SE_ERR_FNF = 2 - SE_ERR_PNF = 3 - SE_ERR_ACCESSDENIED = 5 - SE_ERR_OOM = 8 - SE_ERR_DLLNOTFOUND = 32 - SE_ERR_SHARE = 26 - SE_ERR_ASSOCINCOMPLETE = 27 - SE_ERR_DDETIMEOUT = 28 - SE_ERR_DDEFAIL = 29 - SE_ERR_DDEBUSY = 30 - SE_ERR_NOASSOC = 31 -) - -const ( - CW_USEDEFAULT = ^0x7fffffff -) - -// ShowWindow constants -const ( - SW_HIDE = 0 - SW_NORMAL = 1 - SW_SHOWNORMAL = 1 - SW_SHOWMINIMIZED = 2 - SW_MAXIMIZE = 3 - SW_SHOWMAXIMIZED = 3 - SW_SHOWNOACTIVATE = 4 - SW_SHOW = 5 - SW_MINIMIZE = 6 - SW_SHOWMINNOACTIVE = 7 - SW_SHOWNA = 8 - SW_RESTORE = 9 - SW_SHOWDEFAULT = 10 - SW_FORCEMINIMIZE = 11 -) - -// Window class styles -const ( - CS_VREDRAW = 0x00000001 - CS_HREDRAW = 0x00000002 - CS_KEYCVTWINDOW = 0x00000004 - CS_DBLCLKS = 0x00000008 - CS_OWNDC = 0x00000020 - CS_CLASSDC = 0x00000040 - CS_PARENTDC = 0x00000080 - CS_NOKEYCVT = 0x00000100 - CS_NOCLOSE = 0x00000200 - CS_SAVEBITS = 0x00000800 - CS_BYTEALIGNCLIENT = 0x00001000 - CS_BYTEALIGNWINDOW = 0x00002000 - CS_GLOBALCLASS = 0x00004000 - CS_IME = 0x00010000 - CS_DROPSHADOW = 0x00020000 -) - -// Predefined cursor constants -const ( - IDC_ARROW = 32512 - IDC_IBEAM = 32513 - IDC_WAIT = 32514 - IDC_CROSS = 32515 - IDC_UPARROW = 32516 - IDC_SIZENWSE = 32642 - IDC_SIZENESW = 32643 - IDC_SIZEWE = 32644 - IDC_SIZENS = 32645 - IDC_SIZEALL = 32646 - IDC_NO = 32648 - IDC_HAND = 32649 - IDC_APPSTARTING = 32650 - IDC_HELP = 32651 - IDC_ICON = 32641 - IDC_SIZE = 32640 -) - -// Predefined icon constants -const ( - IDI_APPLICATION = 32512 - IDI_HAND = 32513 - IDI_QUESTION = 32514 - IDI_EXCLAMATION = 32515 - IDI_ASTERISK = 32516 - IDI_WINLOGO = 32517 - IDI_WARNING = IDI_EXCLAMATION - IDI_ERROR = IDI_HAND - IDI_INFORMATION = IDI_ASTERISK -) - -// Button style constants -const ( - BS_3STATE = 5 - BS_AUTO3STATE = 6 - BS_AUTOCHECKBOX = 3 - BS_AUTORADIOBUTTON = 9 - BS_BITMAP = 128 - BS_BOTTOM = 0X800 - BS_CENTER = 0X300 - BS_CHECKBOX = 2 - BS_DEFPUSHBUTTON = 1 - BS_GROUPBOX = 7 - BS_ICON = 64 - BS_LEFT = 256 - BS_LEFTTEXT = 32 - BS_MULTILINE = 0X2000 - BS_NOTIFY = 0X4000 - BS_OWNERDRAW = 0XB - BS_PUSHBUTTON = 0 - BS_PUSHLIKE = 4096 - BS_RADIOBUTTON = 4 - BS_RIGHT = 512 - BS_RIGHTBUTTON = 32 - BS_TEXT = 0 - BS_TOP = 0X400 - BS_USERBUTTON = 8 - BS_VCENTER = 0XC00 - BS_FLAT = 0X8000 -) - -// Button state constants -const ( - BST_CHECKED = 1 - BST_INDETERMINATE = 2 - BST_UNCHECKED = 0 - BST_FOCUS = 8 - BST_PUSHED = 4 -) - -// Predefined brushes constants -const ( - COLOR_3DDKSHADOW = 21 - COLOR_3DFACE = 15 - COLOR_3DHILIGHT = 20 - COLOR_3DHIGHLIGHT = 20 - COLOR_3DLIGHT = 22 - COLOR_BTNHILIGHT = 20 - COLOR_3DSHADOW = 16 - COLOR_ACTIVEBORDER = 10 - COLOR_ACTIVECAPTION = 2 - COLOR_APPWORKSPACE = 12 - COLOR_BACKGROUND = 1 - COLOR_DESKTOP = 1 - COLOR_BTNFACE = 15 - COLOR_BTNHIGHLIGHT = 20 - COLOR_BTNSHADOW = 16 - COLOR_BTNTEXT = 18 - COLOR_CAPTIONTEXT = 9 - COLOR_GRAYTEXT = 17 - COLOR_HIGHLIGHT = 13 - COLOR_HIGHLIGHTTEXT = 14 - COLOR_INACTIVEBORDER = 11 - COLOR_INACTIVECAPTION = 3 - COLOR_INACTIVECAPTIONTEXT = 19 - COLOR_INFOBK = 24 - COLOR_INFOTEXT = 23 - COLOR_MENU = 4 - COLOR_MENUTEXT = 7 - COLOR_SCROLLBAR = 0 - COLOR_WINDOW = 5 - COLOR_WINDOWFRAME = 6 - COLOR_WINDOWTEXT = 8 - COLOR_HOTLIGHT = 26 - COLOR_GRADIENTACTIVECAPTION = 27 - COLOR_GRADIENTINACTIVECAPTION = 28 -) - -// Button message constants -const ( - BM_CLICK = 245 - BM_GETCHECK = 240 - BM_GETIMAGE = 246 - BM_GETSTATE = 242 - BM_SETCHECK = 241 - BM_SETIMAGE = 247 - BM_SETSTATE = 243 - BM_SETSTYLE = 244 -) - -// Button notifications -const ( - BN_CLICKED = 0 - BN_PAINT = 1 - BN_HILITE = 2 - BN_PUSHED = BN_HILITE - BN_UNHILITE = 3 - BN_UNPUSHED = BN_UNHILITE - BN_DISABLE = 4 - BN_DOUBLECLICKED = 5 - BN_DBLCLK = BN_DOUBLECLICKED - BN_SETFOCUS = 6 - BN_KILLFOCUS = 7 -) - -// GetWindowLong and GetWindowLongPtr constants -const ( - GWL_EXSTYLE = -20 - GWL_STYLE = -16 - GWL_WNDPROC = -4 - GWLP_WNDPROC = -4 - GWL_HINSTANCE = -6 - GWLP_HINSTANCE = -6 - GWL_HWNDPARENT = -8 - GWLP_HWNDPARENT = -8 - GWL_ID = -12 - GWLP_ID = -12 - GWL_USERDATA = -21 - GWLP_USERDATA = -21 -) - -// Window style constants -const ( - WS_OVERLAPPED = 0X00000000 - WS_POPUP = 0X80000000 - WS_CHILD = 0X40000000 - WS_MINIMIZE = 0X20000000 - WS_VISIBLE = 0X10000000 - WS_DISABLED = 0X08000000 - WS_CLIPSIBLINGS = 0X04000000 - WS_CLIPCHILDREN = 0X02000000 - WS_MAXIMIZE = 0X01000000 - WS_CAPTION = 0X00C00000 - WS_BORDER = 0X00800000 - WS_DLGFRAME = 0X00400000 - WS_VSCROLL = 0X00200000 - WS_HSCROLL = 0X00100000 - WS_SYSMENU = 0X00080000 - WS_THICKFRAME = 0X00040000 - WS_GROUP = 0X00020000 - WS_TABSTOP = 0X00010000 - WS_MINIMIZEBOX = 0X00020000 - WS_MAXIMIZEBOX = 0X00010000 - WS_TILED = 0X00000000 - WS_ICONIC = 0X20000000 - WS_SIZEBOX = 0X00040000 - WS_OVERLAPPEDWINDOW = 0X00000000 | 0X00C00000 | 0X00080000 | 0X00040000 | 0X00020000 | 0X00010000 - WS_POPUPWINDOW = 0X80000000 | 0X00800000 | 0X00080000 - WS_CHILDWINDOW = 0X40000000 -) - -// Extended window style constants -const ( - WS_EX_DLGMODALFRAME = 0X00000001 - WS_EX_NOPARENTNOTIFY = 0X00000004 - WS_EX_TOPMOST = 0X00000008 - WS_EX_ACCEPTFILES = 0X00000010 - WS_EX_TRANSPARENT = 0X00000020 - WS_EX_MDICHILD = 0X00000040 - WS_EX_TOOLWINDOW = 0X00000080 - WS_EX_WINDOWEDGE = 0X00000100 - WS_EX_CLIENTEDGE = 0X00000200 - WS_EX_CONTEXTHELP = 0X00000400 - WS_EX_RIGHT = 0X00001000 - WS_EX_LEFT = 0X00000000 - WS_EX_RTLREADING = 0X00002000 - WS_EX_LTRREADING = 0X00000000 - WS_EX_LEFTSCROLLBAR = 0X00004000 - WS_EX_RIGHTSCROLLBAR = 0X00000000 - WS_EX_CONTROLPARENT = 0X00010000 - WS_EX_STATICEDGE = 0X00020000 - WS_EX_APPWINDOW = 0X00040000 - WS_EX_OVERLAPPEDWINDOW = 0X00000100 | 0X00000200 - WS_EX_PALETTEWINDOW = 0X00000100 | 0X00000080 | 0X00000008 - WS_EX_LAYERED = 0X00080000 - WS_EX_NOINHERITLAYOUT = 0X00100000 - WS_EX_LAYOUTRTL = 0X00400000 - WS_EX_NOACTIVATE = 0X08000000 -) - -// Window message constants -const ( - WM_APP = 32768 - WM_ACTIVATE = 6 - WM_ACTIVATEAPP = 28 - WM_AFXFIRST = 864 - WM_AFXLAST = 895 - WM_ASKCBFORMATNAME = 780 - WM_CANCELJOURNAL = 75 - WM_CANCELMODE = 31 - WM_CAPTURECHANGED = 533 - WM_CHANGECBCHAIN = 781 - WM_CHAR = 258 - WM_CHARTOITEM = 47 - WM_CHILDACTIVATE = 34 - WM_CLEAR = 771 - WM_CLOSE = 16 - WM_COMMAND = 273 - WM_COMMNOTIFY = 68 /* OBSOLETE */ - WM_COMPACTING = 65 - WM_COMPAREITEM = 57 - WM_CONTEXTMENU = 123 - WM_COPY = 769 - WM_COPYDATA = 74 - WM_CREATE = 1 - WM_CTLCOLORBTN = 309 - WM_CTLCOLORDLG = 310 - WM_CTLCOLOREDIT = 307 - WM_CTLCOLORLISTBOX = 308 - WM_CTLCOLORMSGBOX = 306 - WM_CTLCOLORSCROLLBAR = 311 - WM_CTLCOLORSTATIC = 312 - WM_CUT = 768 - WM_DEADCHAR = 259 - WM_DELETEITEM = 45 - WM_DESTROY = 2 - WM_DESTROYCLIPBOARD = 775 - WM_DEVICECHANGE = 537 - WM_DEVMODECHANGE = 27 - WM_DISPLAYCHANGE = 126 - WM_DRAWCLIPBOARD = 776 - WM_DRAWITEM = 43 - WM_DROPFILES = 563 - WM_ENABLE = 10 - WM_ENDSESSION = 22 - WM_ENTERIDLE = 289 - WM_ENTERMENULOOP = 529 - WM_ENTERSIZEMOVE = 561 - WM_ERASEBKGND = 20 - WM_EXITMENULOOP = 530 - WM_EXITSIZEMOVE = 562 - WM_FONTCHANGE = 29 - WM_GETDLGCODE = 135 - WM_GETFONT = 49 - WM_GETHOTKEY = 51 - WM_GETICON = 127 - WM_GETMINMAXINFO = 36 - WM_GETTEXT = 13 - WM_GETTEXTLENGTH = 14 - WM_HANDHELDFIRST = 856 - WM_HANDHELDLAST = 863 - WM_HELP = 83 - WM_HOTKEY = 786 - WM_HSCROLL = 276 - WM_HSCROLLCLIPBOARD = 782 - WM_ICONERASEBKGND = 39 - WM_INITDIALOG = 272 - WM_INITMENU = 278 - WM_INITMENUPOPUP = 279 - WM_INPUT = 0X00FF - WM_INPUTLANGCHANGE = 81 - WM_INPUTLANGCHANGEREQUEST = 80 - WM_KEYDOWN = 256 - WM_KEYUP = 257 - WM_KILLFOCUS = 8 - WM_MDIACTIVATE = 546 - WM_MDICASCADE = 551 - WM_MDICREATE = 544 - WM_MDIDESTROY = 545 - WM_MDIGETACTIVE = 553 - WM_MDIICONARRANGE = 552 - WM_MDIMAXIMIZE = 549 - WM_MDINEXT = 548 - WM_MDIREFRESHMENU = 564 - WM_MDIRESTORE = 547 - WM_MDISETMENU = 560 - WM_MDITILE = 550 - WM_MEASUREITEM = 44 - WM_GETOBJECT = 0X003D - WM_CHANGEUISTATE = 0X0127 - WM_UPDATEUISTATE = 0X0128 - WM_QUERYUISTATE = 0X0129 - WM_UNINITMENUPOPUP = 0X0125 - WM_MENURBUTTONUP = 290 - WM_MENUCOMMAND = 0X0126 - WM_MENUGETOBJECT = 0X0124 - WM_MENUDRAG = 0X0123 - WM_APPCOMMAND = 0X0319 - WM_MENUCHAR = 288 - WM_MENUSELECT = 287 - WM_MOVE = 3 - WM_MOVING = 534 - WM_NCACTIVATE = 134 - WM_NCCALCSIZE = 131 - WM_NCCREATE = 129 - WM_NCDESTROY = 130 - WM_NCHITTEST = 132 - WM_NCLBUTTONDBLCLK = 163 - WM_NCLBUTTONDOWN = 161 - WM_NCLBUTTONUP = 162 - WM_NCMBUTTONDBLCLK = 169 - WM_NCMBUTTONDOWN = 167 - WM_NCMBUTTONUP = 168 - WM_NCXBUTTONDOWN = 171 - WM_NCXBUTTONUP = 172 - WM_NCXBUTTONDBLCLK = 173 - WM_NCMOUSEHOVER = 0X02A0 - WM_NCMOUSELEAVE = 0X02A2 - WM_NCMOUSEMOVE = 160 - WM_NCPAINT = 133 - WM_NCRBUTTONDBLCLK = 166 - WM_NCRBUTTONDOWN = 164 - WM_NCRBUTTONUP = 165 - WM_NEXTDLGCTL = 40 - WM_NEXTMENU = 531 - WM_NOTIFY = 78 - WM_NOTIFYFORMAT = 85 - WM_NULL = 0 - WM_PAINT = 15 - WM_PAINTCLIPBOARD = 777 - WM_PAINTICON = 38 - WM_PALETTECHANGED = 785 - WM_PALETTEISCHANGING = 784 - WM_PARENTNOTIFY = 528 - WM_PASTE = 770 - WM_PENWINFIRST = 896 - WM_PENWINLAST = 911 - WM_POWER = 72 - WM_POWERBROADCAST = 536 - WM_PRINT = 791 - WM_PRINTCLIENT = 792 - WM_QUERYDRAGICON = 55 - WM_QUERYENDSESSION = 17 - WM_QUERYNEWPALETTE = 783 - WM_QUERYOPEN = 19 - WM_QUEUESYNC = 35 - WM_QUIT = 18 - WM_RENDERALLFORMATS = 774 - WM_RENDERFORMAT = 773 - WM_SETCURSOR = 32 - WM_SETFOCUS = 7 - WM_SETFONT = 48 - WM_SETHOTKEY = 50 - WM_SETICON = 128 - WM_SETREDRAW = 11 - WM_SETTEXT = 12 - WM_SETTINGCHANGE = 26 - WM_SHOWWINDOW = 24 - WM_SIZE = 5 - WM_SIZECLIPBOARD = 779 - WM_SIZING = 532 - WM_SPOOLERSTATUS = 42 - WM_STYLECHANGED = 125 - WM_STYLECHANGING = 124 - WM_SYSCHAR = 262 - WM_SYSCOLORCHANGE = 21 - WM_SYSCOMMAND = 274 - WM_SYSDEADCHAR = 263 - WM_SYSKEYDOWN = 260 - WM_SYSKEYUP = 261 - WM_TCARD = 82 - WM_THEMECHANGED = 794 - WM_TIMECHANGE = 30 - WM_TIMER = 275 - WM_UNDO = 772 - WM_USER = 1024 - WM_USERCHANGED = 84 - WM_VKEYTOITEM = 46 - WM_VSCROLL = 277 - WM_VSCROLLCLIPBOARD = 778 - WM_WINDOWPOSCHANGED = 71 - WM_WINDOWPOSCHANGING = 70 - WM_WININICHANGE = 26 - WM_KEYFIRST = 256 - WM_KEYLAST = 264 - WM_SYNCPAINT = 136 - WM_MOUSEACTIVATE = 33 - WM_MOUSEMOVE = 512 - WM_LBUTTONDOWN = 513 - WM_LBUTTONUP = 514 - WM_LBUTTONDBLCLK = 515 - WM_RBUTTONDOWN = 516 - WM_RBUTTONUP = 517 - WM_RBUTTONDBLCLK = 518 - WM_MBUTTONDOWN = 519 - WM_MBUTTONUP = 520 - WM_MBUTTONDBLCLK = 521 - WM_MOUSEWHEEL = 522 - WM_XBUTTONDOWN = 523 - WM_XBUTTONUP = 524 - WM_XBUTTONDBLCLK = 525 - WM_MOUSEHWHEEL = 526 - WM_MOUSEFIRST = 512 - WM_MOUSELAST = 526 - WM_MOUSEHOVER = 0X2A1 - WM_MOUSELEAVE = 0X2A3 - WM_CLIPBOARDUPDATE = 0x031D -) - -// WM_ACTIVATE -const ( - WA_INACTIVE = 0 - WA_ACTIVE = 1 - WA_CLICKACTIVE = 2 -) - -const LF_FACESIZE = 32 - -// Font weight constants -const ( - FW_DONTCARE = 0 - FW_THIN = 100 - FW_EXTRALIGHT = 200 - FW_ULTRALIGHT = FW_EXTRALIGHT - FW_LIGHT = 300 - FW_NORMAL = 400 - FW_REGULAR = 400 - FW_MEDIUM = 500 - FW_SEMIBOLD = 600 - FW_DEMIBOLD = FW_SEMIBOLD - FW_BOLD = 700 - FW_EXTRABOLD = 800 - FW_ULTRABOLD = FW_EXTRABOLD - FW_HEAVY = 900 - FW_BLACK = FW_HEAVY -) - -// Charset constants -const ( - ANSI_CHARSET = 0 - DEFAULT_CHARSET = 1 - SYMBOL_CHARSET = 2 - SHIFTJIS_CHARSET = 128 - HANGEUL_CHARSET = 129 - HANGUL_CHARSET = 129 - GB2312_CHARSET = 134 - CHINESEBIG5_CHARSET = 136 - GREEK_CHARSET = 161 - TURKISH_CHARSET = 162 - HEBREW_CHARSET = 177 - ARABIC_CHARSET = 178 - BALTIC_CHARSET = 186 - RUSSIAN_CHARSET = 204 - THAI_CHARSET = 222 - EASTEUROPE_CHARSET = 238 - OEM_CHARSET = 255 - JOHAB_CHARSET = 130 - VIETNAMESE_CHARSET = 163 - MAC_CHARSET = 77 -) - -// Font output precision constants -const ( - OUT_DEFAULT_PRECIS = 0 - OUT_STRING_PRECIS = 1 - OUT_CHARACTER_PRECIS = 2 - OUT_STROKE_PRECIS = 3 - OUT_TT_PRECIS = 4 - OUT_DEVICE_PRECIS = 5 - OUT_RASTER_PRECIS = 6 - OUT_TT_ONLY_PRECIS = 7 - OUT_OUTLINE_PRECIS = 8 - OUT_PS_ONLY_PRECIS = 10 -) - -// Font clipping precision constants -const ( - CLIP_DEFAULT_PRECIS = 0 - CLIP_CHARACTER_PRECIS = 1 - CLIP_STROKE_PRECIS = 2 - CLIP_MASK = 15 - CLIP_LH_ANGLES = 16 - CLIP_TT_ALWAYS = 32 - CLIP_EMBEDDED = 128 -) - -// Font output quality constants -const ( - DEFAULT_QUALITY = 0 - DRAFT_QUALITY = 1 - PROOF_QUALITY = 2 - NONANTIALIASED_QUALITY = 3 - ANTIALIASED_QUALITY = 4 - CLEARTYPE_QUALITY = 5 -) - -// Font pitch constants -const ( - DEFAULT_PITCH = 0 - FIXED_PITCH = 1 - VARIABLE_PITCH = 2 -) - -// Font family constants -const ( - FF_DECORATIVE = 80 - FF_DONTCARE = 0 - FF_MODERN = 48 - FF_ROMAN = 16 - FF_SCRIPT = 64 - FF_SWISS = 32 -) - -// DeviceCapabilities capabilities -const ( - DC_FIELDS = 1 - DC_PAPERS = 2 - DC_PAPERSIZE = 3 - DC_MINEXTENT = 4 - DC_MAXEXTENT = 5 - DC_BINS = 6 - DC_DUPLEX = 7 - DC_SIZE = 8 - DC_EXTRA = 9 - DC_VERSION = 10 - DC_DRIVER = 11 - DC_BINNAMES = 12 - DC_ENUMRESOLUTIONS = 13 - DC_FILEDEPENDENCIES = 14 - DC_TRUETYPE = 15 - DC_PAPERNAMES = 16 - DC_ORIENTATION = 17 - DC_COPIES = 18 - DC_BINADJUST = 19 - DC_EMF_COMPLIANT = 20 - DC_DATATYPE_PRODUCED = 21 - DC_COLLATE = 22 - DC_MANUFACTURER = 23 - DC_MODEL = 24 - DC_PERSONALITY = 25 - DC_PRINTRATE = 26 - DC_PRINTRATEUNIT = 27 - DC_PRINTERMEM = 28 - DC_MEDIAREADY = 29 - DC_STAPLE = 30 - DC_PRINTRATEPPM = 31 - DC_COLORDEVICE = 32 - DC_NUP = 33 - DC_MEDIATYPENAMES = 34 - DC_MEDIATYPES = 35 -) - -// GetDeviceCaps index constants -const ( - DRIVERVERSION = 0 - TECHNOLOGY = 2 - HORZSIZE = 4 - VERTSIZE = 6 - HORZRES = 8 - VERTRES = 10 - LOGPIXELSX = 88 - LOGPIXELSY = 90 - BITSPIXEL = 12 - PLANES = 14 - NUMBRUSHES = 16 - NUMPENS = 18 - NUMFONTS = 22 - NUMCOLORS = 24 - NUMMARKERS = 20 - ASPECTX = 40 - ASPECTY = 42 - ASPECTXY = 44 - PDEVICESIZE = 26 - CLIPCAPS = 36 - SIZEPALETTE = 104 - NUMRESERVED = 106 - COLORRES = 108 - PHYSICALWIDTH = 110 - PHYSICALHEIGHT = 111 - PHYSICALOFFSETX = 112 - PHYSICALOFFSETY = 113 - SCALINGFACTORX = 114 - SCALINGFACTORY = 115 - VREFRESH = 116 - DESKTOPHORZRES = 118 - DESKTOPVERTRES = 117 - BLTALIGNMENT = 119 - SHADEBLENDCAPS = 120 - COLORMGMTCAPS = 121 - RASTERCAPS = 38 - CURVECAPS = 28 - LINECAPS = 30 - POLYGONALCAPS = 32 - TEXTCAPS = 34 -) - -// GetDeviceCaps TECHNOLOGY constants -const ( - DT_PLOTTER = 0 - DT_RASDISPLAY = 1 - DT_RASPRINTER = 2 - DT_RASCAMERA = 3 - DT_CHARSTREAM = 4 - DT_METAFILE = 5 - DT_DISPFILE = 6 -) - -// GetDeviceCaps SHADEBLENDCAPS constants -const ( - SB_NONE = 0x00 - SB_CONST_ALPHA = 0x01 - SB_PIXEL_ALPHA = 0x02 - SB_PREMULT_ALPHA = 0x04 - SB_GRAD_RECT = 0x10 - SB_GRAD_TRI = 0x20 -) - -// GetDeviceCaps COLORMGMTCAPS constants -const ( - CM_NONE = 0x00 - CM_DEVICE_ICM = 0x01 - CM_GAMMA_RAMP = 0x02 - CM_CMYK_COLOR = 0x04 -) - -// GetDeviceCaps RASTERCAPS constants -const ( - RC_BANDING = 2 - RC_BITBLT = 1 - RC_BITMAP64 = 8 - RC_DI_BITMAP = 128 - RC_DIBTODEV = 512 - RC_FLOODFILL = 4096 - RC_GDI20_OUTPUT = 16 - RC_PALETTE = 256 - RC_SCALING = 4 - RC_STRETCHBLT = 2048 - RC_STRETCHDIB = 8192 - RC_DEVBITS = 0x8000 - RC_OP_DX_OUTPUT = 0x4000 -) - -// GetDeviceCaps CURVECAPS constants -const ( - CC_NONE = 0 - CC_CIRCLES = 1 - CC_PIE = 2 - CC_CHORD = 4 - CC_ELLIPSES = 8 - CC_WIDE = 16 - CC_STYLED = 32 - CC_WIDESTYLED = 64 - CC_INTERIORS = 128 - CC_ROUNDRECT = 256 -) - -// GetDeviceCaps LINECAPS constants -const ( - LC_NONE = 0 - LC_POLYLINE = 2 - LC_MARKER = 4 - LC_POLYMARKER = 8 - LC_WIDE = 16 - LC_STYLED = 32 - LC_WIDESTYLED = 64 - LC_INTERIORS = 128 -) - -// GetDeviceCaps POLYGONALCAPS constants -const ( - PC_NONE = 0 - PC_POLYGON = 1 - PC_POLYPOLYGON = 256 - PC_PATHS = 512 - PC_RECTANGLE = 2 - PC_WINDPOLYGON = 4 - PC_SCANLINE = 8 - PC_TRAPEZOID = 4 - PC_WIDE = 16 - PC_STYLED = 32 - PC_WIDESTYLED = 64 - PC_INTERIORS = 128 -) - -// GetDeviceCaps TEXTCAPS constants -const ( - TC_OP_CHARACTER = 1 - TC_OP_STROKE = 2 - TC_CP_STROKE = 4 - TC_CR_90 = 8 - TC_CR_ANY = 16 - TC_SF_X_YINDEP = 32 - TC_SA_DOUBLE = 64 - TC_SA_INTEGER = 128 - TC_SA_CONTIN = 256 - TC_EA_DOUBLE = 512 - TC_IA_ABLE = 1024 - TC_UA_ABLE = 2048 - TC_SO_ABLE = 4096 - TC_RA_ABLE = 8192 - TC_VA_ABLE = 16384 - TC_RESERVED = 32768 - TC_SCROLLBLT = 65536 -) - -// Static control styles -const ( - SS_BITMAP = 14 - SS_BLACKFRAME = 7 - SS_BLACKRECT = 4 - SS_CENTER = 1 - SS_CENTERIMAGE = 512 - SS_EDITCONTROL = 0x2000 - SS_ENHMETAFILE = 15 - SS_ETCHEDFRAME = 18 - SS_ETCHEDHORZ = 16 - SS_ETCHEDVERT = 17 - SS_GRAYFRAME = 8 - SS_GRAYRECT = 5 - SS_ICON = 3 - SS_LEFT = 0 - SS_LEFTNOWORDWRAP = 0xc - SS_NOPREFIX = 128 - SS_NOTIFY = 256 - SS_OWNERDRAW = 0xd - SS_REALSIZECONTROL = 0x040 - SS_REALSIZEIMAGE = 0x800 - SS_RIGHT = 2 - SS_RIGHTJUST = 0x400 - SS_SIMPLE = 11 - SS_SUNKEN = 4096 - SS_WHITEFRAME = 9 - SS_WHITERECT = 6 - SS_USERITEM = 10 - SS_TYPEMASK = 0x0000001F - SS_ENDELLIPSIS = 0x00004000 - SS_PATHELLIPSIS = 0x00008000 - SS_WORDELLIPSIS = 0x0000C000 - SS_ELLIPSISMASK = 0x0000C000 -) - -// Edit styles -const ( - ES_LEFT = 0x0000 - ES_CENTER = 0x0001 - ES_RIGHT = 0x0002 - ES_MULTILINE = 0x0004 - ES_UPPERCASE = 0x0008 - ES_LOWERCASE = 0x0010 - ES_PASSWORD = 0x0020 - ES_AUTOVSCROLL = 0x0040 - ES_AUTOHSCROLL = 0x0080 - ES_NOHIDESEL = 0x0100 - ES_OEMCONVERT = 0x0400 - ES_READONLY = 0x0800 - ES_WANTRETURN = 0x1000 - ES_NUMBER = 0x2000 -) - -// Edit notifications -const ( - EN_SETFOCUS = 0x0100 - EN_KILLFOCUS = 0x0200 - EN_CHANGE = 0x0300 - EN_UPDATE = 0x0400 - EN_ERRSPACE = 0x0500 - EN_MAXTEXT = 0x0501 - EN_HSCROLL = 0x0601 - EN_VSCROLL = 0x0602 - EN_ALIGN_LTR_EC = 0x0700 - EN_ALIGN_RTL_EC = 0x0701 -) - -// Edit messages -const ( - EM_GETSEL = 0x00B0 - EM_SETSEL = 0x00B1 - EM_GETRECT = 0x00B2 - EM_SETRECT = 0x00B3 - EM_SETRECTNP = 0x00B4 - EM_SCROLL = 0x00B5 - EM_LINESCROLL = 0x00B6 - EM_SCROLLCARET = 0x00B7 - EM_GETMODIFY = 0x00B8 - EM_SETMODIFY = 0x00B9 - EM_GETLINECOUNT = 0x00BA - EM_LINEINDEX = 0x00BB - EM_SETHANDLE = 0x00BC - EM_GETHANDLE = 0x00BD - EM_GETTHUMB = 0x00BE - EM_LINELENGTH = 0x00C1 - EM_REPLACESEL = 0x00C2 - EM_GETLINE = 0x00C4 - EM_LIMITTEXT = 0x00C5 - EM_CANUNDO = 0x00C6 - EM_UNDO = 0x00C7 - EM_FMTLINES = 0x00C8 - EM_LINEFROMCHAR = 0x00C9 - EM_SETTABSTOPS = 0x00CB - EM_SETPASSWORDCHAR = 0x00CC - EM_EMPTYUNDOBUFFER = 0x00CD - EM_GETFIRSTVISIBLELINE = 0x00CE - EM_SETREADONLY = 0x00CF - EM_SETWORDBREAKPROC = 0x00D0 - EM_GETWORDBREAKPROC = 0x00D1 - EM_GETPASSWORDCHAR = 0x00D2 - EM_SETMARGINS = 0x00D3 - EM_GETMARGINS = 0x00D4 - EM_SETLIMITTEXT = EM_LIMITTEXT - EM_GETLIMITTEXT = 0x00D5 - EM_POSFROMCHAR = 0x00D6 - EM_CHARFROMPOS = 0x00D7 - EM_SETIMESTATUS = 0x00D8 - EM_GETIMESTATUS = 0x00D9 - EM_SETCUEBANNER = 0x1501 - EM_GETCUEBANNER = 0x1502 -) - -const ( - CCM_FIRST = 0x2000 - CCM_LAST = CCM_FIRST + 0x200 - CCM_SETBKCOLOR = 8193 - CCM_SETCOLORSCHEME = 8194 - CCM_GETCOLORSCHEME = 8195 - CCM_GETDROPTARGET = 8196 - CCM_SETUNICODEFORMAT = 8197 - CCM_GETUNICODEFORMAT = 8198 - CCM_SETVERSION = 0x2007 - CCM_GETVERSION = 0x2008 - CCM_SETNOTIFYWINDOW = 0x2009 - CCM_SETWINDOWTHEME = 0x200b - CCM_DPISCALE = 0x200c -) - -// Common controls styles -const ( - CCS_TOP = 1 - CCS_NOMOVEY = 2 - CCS_BOTTOM = 3 - CCS_NORESIZE = 4 - CCS_NOPARENTALIGN = 8 - CCS_ADJUSTABLE = 32 - CCS_NODIVIDER = 64 - CCS_VERT = 128 - CCS_LEFT = 129 - CCS_NOMOVEX = 130 - CCS_RIGHT = 131 -) - -// ProgressBar messages -const ( - PROGRESS_CLASS = "msctls_progress32" - PBM_SETPOS = WM_USER + 2 - PBM_DELTAPOS = WM_USER + 3 - PBM_SETSTEP = WM_USER + 4 - PBM_STEPIT = WM_USER + 5 - PBM_SETRANGE32 = 1030 - PBM_GETRANGE = 1031 - PBM_GETPOS = 1032 - PBM_SETBARCOLOR = 1033 - PBM_SETBKCOLOR = CCM_SETBKCOLOR - PBS_SMOOTH = 1 - PBS_VERTICAL = 4 -) - -// GetOpenFileName and GetSaveFileName extended flags -const ( - OFN_EX_NOPLACESBAR = 0x00000001 -) - -// GetOpenFileName and GetSaveFileName flags -const ( - OFN_ALLOWMULTISELECT = 0x00000200 - OFN_CREATEPROMPT = 0x00002000 - OFN_DONTADDTORECENT = 0x02000000 - OFN_ENABLEHOOK = 0x00000020 - OFN_ENABLEINCLUDENOTIFY = 0x00400000 - OFN_ENABLESIZING = 0x00800000 - OFN_ENABLETEMPLATE = 0x00000040 - OFN_ENABLETEMPLATEHANDLE = 0x00000080 - OFN_EXPLORER = 0x00080000 - OFN_EXTENSIONDIFFERENT = 0x00000400 - OFN_FILEMUSTEXIST = 0x00001000 - OFN_FORCESHOWHIDDEN = 0x10000000 - OFN_HIDEREADONLY = 0x00000004 - OFN_LONGNAMES = 0x00200000 - OFN_NOCHANGEDIR = 0x00000008 - OFN_NODEREFERENCELINKS = 0x00100000 - OFN_NOLONGNAMES = 0x00040000 - OFN_NONETWORKBUTTON = 0x00020000 - OFN_NOREADONLYRETURN = 0x00008000 - OFN_NOTESTFILECREATE = 0x00010000 - OFN_NOVALIDATE = 0x00000100 - OFN_OVERWRITEPROMPT = 0x00000002 - OFN_PATHMUSTEXIST = 0x00000800 - OFN_READONLY = 0x00000001 - OFN_SHAREAWARE = 0x00004000 - OFN_SHOWHELP = 0x00000010 -) - -//SHBrowseForFolder flags -const ( - BIF_RETURNONLYFSDIRS = 0x00000001 - BIF_DONTGOBELOWDOMAIN = 0x00000002 - BIF_STATUSTEXT = 0x00000004 - BIF_RETURNFSANCESTORS = 0x00000008 - BIF_EDITBOX = 0x00000010 - BIF_VALIDATE = 0x00000020 - BIF_NEWDIALOGSTYLE = 0x00000040 - BIF_BROWSEINCLUDEURLS = 0x00000080 - BIF_USENEWUI = BIF_EDITBOX | BIF_NEWDIALOGSTYLE - BIF_UAHINT = 0x00000100 - BIF_NONEWFOLDERBUTTON = 0x00000200 - BIF_NOTRANSLATETARGETS = 0x00000400 - BIF_BROWSEFORCOMPUTER = 0x00001000 - BIF_BROWSEFORPRINTER = 0x00002000 - BIF_BROWSEINCLUDEFILES = 0x00004000 - BIF_SHAREABLE = 0x00008000 - BIF_BROWSEFILEJUNCTIONS = 0x00010000 -) - -//MessageBox flags -const ( - MB_OK = 0x00000000 - MB_OKCANCEL = 0x00000001 - MB_ABORTRETRYIGNORE = 0x00000002 - MB_YESNOCANCEL = 0x00000003 - MB_YESNO = 0x00000004 - MB_RETRYCANCEL = 0x00000005 - MB_CANCELTRYCONTINUE = 0x00000006 - MB_ICONHAND = 0x00000010 - MB_ICONQUESTION = 0x00000020 - MB_ICONEXCLAMATION = 0x00000030 - MB_ICONASTERISK = 0x00000040 - MB_USERICON = 0x00000080 - MB_ICONWARNING = MB_ICONEXCLAMATION - MB_ICONERROR = MB_ICONHAND - MB_ICONINFORMATION = MB_ICONASTERISK - MB_ICONSTOP = MB_ICONHAND - MB_DEFBUTTON1 = 0x00000000 - MB_DEFBUTTON2 = 0x00000100 - MB_DEFBUTTON3 = 0x00000200 - MB_DEFBUTTON4 = 0x00000300 -) - -//COM -const ( - E_INVALIDARG = 0x80070057 - E_OUTOFMEMORY = 0x8007000E - E_UNEXPECTED = 0x8000FFFF -) - -const ( - S_OK = 0 - S_FALSE = 0x0001 - RPC_E_CHANGED_MODE = 0x80010106 -) - -// GetSystemMetrics constants -const ( - SM_CXSCREEN = 0 - SM_CYSCREEN = 1 - SM_CXVSCROLL = 2 - SM_CYHSCROLL = 3 - SM_CYCAPTION = 4 - SM_CXBORDER = 5 - SM_CYBORDER = 6 - SM_CXDLGFRAME = 7 - SM_CYDLGFRAME = 8 - SM_CYVTHUMB = 9 - SM_CXHTHUMB = 10 - SM_CXICON = 11 - SM_CYICON = 12 - SM_CXCURSOR = 13 - SM_CYCURSOR = 14 - SM_CYMENU = 15 - SM_CXFULLSCREEN = 16 - SM_CYFULLSCREEN = 17 - SM_CYKANJIWINDOW = 18 - SM_MOUSEPRESENT = 19 - SM_CYVSCROLL = 20 - SM_CXHSCROLL = 21 - SM_DEBUG = 22 - SM_SWAPBUTTON = 23 - SM_RESERVED1 = 24 - SM_RESERVED2 = 25 - SM_RESERVED3 = 26 - SM_RESERVED4 = 27 - SM_CXMIN = 28 - SM_CYMIN = 29 - SM_CXSIZE = 30 - SM_CYSIZE = 31 - SM_CXFRAME = 32 - SM_CYFRAME = 33 - SM_CXMINTRACK = 34 - SM_CYMINTRACK = 35 - SM_CXDOUBLECLK = 36 - SM_CYDOUBLECLK = 37 - SM_CXICONSPACING = 38 - SM_CYICONSPACING = 39 - SM_MENUDROPALIGNMENT = 40 - SM_PENWINDOWS = 41 - SM_DBCSENABLED = 42 - SM_CMOUSEBUTTONS = 43 - SM_CXFIXEDFRAME = SM_CXDLGFRAME - SM_CYFIXEDFRAME = SM_CYDLGFRAME - SM_CXSIZEFRAME = SM_CXFRAME - SM_CYSIZEFRAME = SM_CYFRAME - SM_SECURE = 44 - SM_CXEDGE = 45 - SM_CYEDGE = 46 - SM_CXMINSPACING = 47 - SM_CYMINSPACING = 48 - SM_CXSMICON = 49 - SM_CYSMICON = 50 - SM_CYSMCAPTION = 51 - SM_CXSMSIZE = 52 - SM_CYSMSIZE = 53 - SM_CXMENUSIZE = 54 - SM_CYMENUSIZE = 55 - SM_ARRANGE = 56 - SM_CXMINIMIZED = 57 - SM_CYMINIMIZED = 58 - SM_CXMAXTRACK = 59 - SM_CYMAXTRACK = 60 - SM_CXMAXIMIZED = 61 - SM_CYMAXIMIZED = 62 - SM_NETWORK = 63 - SM_CLEANBOOT = 67 - SM_CXDRAG = 68 - SM_CYDRAG = 69 - SM_SHOWSOUNDS = 70 - SM_CXMENUCHECK = 71 - SM_CYMENUCHECK = 72 - SM_SLOWMACHINE = 73 - SM_MIDEASTENABLED = 74 - SM_MOUSEWHEELPRESENT = 75 - SM_XVIRTUALSCREEN = 76 - SM_YVIRTUALSCREEN = 77 - SM_CXVIRTUALSCREEN = 78 - SM_CYVIRTUALSCREEN = 79 - SM_CMONITORS = 80 - SM_SAMEDISPLAYFORMAT = 81 - SM_IMMENABLED = 82 - SM_CXFOCUSBORDER = 83 - SM_CYFOCUSBORDER = 84 - SM_TABLETPC = 86 - SM_MEDIACENTER = 87 - SM_STARTER = 88 - SM_SERVERR2 = 89 - SM_CMETRICS = 91 - SM_REMOTESESSION = 0x1000 - SM_SHUTTINGDOWN = 0x2000 - SM_REMOTECONTROL = 0x2001 - SM_CARETBLINKINGENABLED = 0x2002 -) - -const ( - CLSCTX_INPROC_SERVER = 1 - CLSCTX_INPROC_HANDLER = 2 - CLSCTX_LOCAL_SERVER = 4 - CLSCTX_INPROC_SERVER16 = 8 - CLSCTX_REMOTE_SERVER = 16 - CLSCTX_ALL = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER - CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER - CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER -) - -const ( - COINIT_APARTMENTTHREADED = 0x2 - COINIT_MULTITHREADED = 0x0 - COINIT_DISABLE_OLE1DDE = 0x4 - COINIT_SPEED_OVER_MEMORY = 0x8 -) - -const ( - DISPATCH_METHOD = 1 - DISPATCH_PROPERTYGET = 2 - DISPATCH_PROPERTYPUT = 4 - DISPATCH_PROPERTYPUTREF = 8 -) - -const ( - CC_FASTCALL = iota - CC_CDECL - CC_MSCPASCAL - CC_PASCAL = CC_MSCPASCAL - CC_MACPASCAL - CC_STDCALL - CC_FPFASTCALL - CC_SYSCALL - CC_MPWCDECL - CC_MPWPASCAL - CC_MAX = CC_MPWPASCAL -) - -const ( - VT_EMPTY = 0x0 - VT_NULL = 0x1 - VT_I2 = 0x2 - VT_I4 = 0x3 - VT_R4 = 0x4 - VT_R8 = 0x5 - VT_CY = 0x6 - VT_DATE = 0x7 - VT_BSTR = 0x8 - VT_DISPATCH = 0x9 - VT_ERROR = 0xa - VT_BOOL = 0xb - VT_VARIANT = 0xc - VT_UNKNOWN = 0xd - VT_DECIMAL = 0xe - VT_I1 = 0x10 - VT_UI1 = 0x11 - VT_UI2 = 0x12 - VT_UI4 = 0x13 - VT_I8 = 0x14 - VT_UI8 = 0x15 - VT_INT = 0x16 - VT_UINT = 0x17 - VT_VOID = 0x18 - VT_HRESULT = 0x19 - VT_PTR = 0x1a - VT_SAFEARRAY = 0x1b - VT_CARRAY = 0x1c - VT_USERDEFINED = 0x1d - VT_LPSTR = 0x1e - VT_LPWSTR = 0x1f - VT_RECORD = 0x24 - VT_INT_PTR = 0x25 - VT_UINT_PTR = 0x26 - VT_FILETIME = 0x40 - VT_BLOB = 0x41 - VT_STREAM = 0x42 - VT_STORAGE = 0x43 - VT_STREAMED_OBJECT = 0x44 - VT_STORED_OBJECT = 0x45 - VT_BLOB_OBJECT = 0x46 - VT_CF = 0x47 - VT_CLSID = 0x48 - VT_BSTR_BLOB = 0xfff - VT_VECTOR = 0x1000 - VT_ARRAY = 0x2000 - VT_BYREF = 0x4000 - VT_RESERVED = 0x8000 - VT_ILLEGAL = 0xffff - VT_ILLEGALMASKED = 0xfff - VT_TYPEMASK = 0xfff -) - -const ( - DISPID_UNKNOWN = -1 - DISPID_VALUE = 0 - DISPID_PROPERTYPUT = -3 - DISPID_NEWENUM = -4 - DISPID_EVALUATE = -5 - DISPID_CONSTRUCTOR = -6 - DISPID_DESTRUCTOR = -7 - DISPID_COLLECT = -8 -) - -const ( - MONITOR_DEFAULTTONULL = 0x00000000 - MONITOR_DEFAULTTOPRIMARY = 0x00000001 - MONITOR_DEFAULTTONEAREST = 0x00000002 - - MONITORINFOF_PRIMARY = 0x00000001 -) - -const ( - CCHDEVICENAME = 32 - CCHFORMNAME = 32 -) - -const ( - IDOK = 1 - IDCANCEL = 2 - IDABORT = 3 - IDRETRY = 4 - IDIGNORE = 5 - IDYES = 6 - IDNO = 7 - IDCLOSE = 8 - IDHELP = 9 - IDTRYAGAIN = 10 - IDCONTINUE = 11 - IDTIMEOUT = 32000 -) - -// Generic WM_NOTIFY notification codes -const ( - NM_FIRST = 0 - NM_OUTOFMEMORY = NM_FIRST - 1 - NM_CLICK = NM_FIRST - 2 - NM_DBLCLK = NM_FIRST - 3 - NM_RETURN = NM_FIRST - 4 - NM_RCLICK = NM_FIRST - 5 - NM_RDBLCLK = NM_FIRST - 6 - NM_SETFOCUS = NM_FIRST - 7 - NM_KILLFOCUS = NM_FIRST - 8 - NM_CUSTOMDRAW = NM_FIRST - 12 - NM_HOVER = NM_FIRST - 13 - NM_NCHITTEST = NM_FIRST - 14 - NM_KEYDOWN = NM_FIRST - 15 - NM_RELEASEDCAPTURE = NM_FIRST - 16 - NM_SETCURSOR = NM_FIRST - 17 - NM_CHAR = NM_FIRST - 18 - NM_TOOLTIPSCREATED = NM_FIRST - 19 - NM_LAST = NM_FIRST - 99 -) - -// ListView messages -const ( - LVM_FIRST = 0x1000 - LVM_GETITEMCOUNT = LVM_FIRST + 4 - LVM_SETIMAGELIST = LVM_FIRST + 3 - LVM_GETIMAGELIST = LVM_FIRST + 2 - LVM_GETITEM = LVM_FIRST + 75 - LVM_SETITEM = LVM_FIRST + 76 - LVM_INSERTITEM = LVM_FIRST + 77 - LVM_DELETEITEM = LVM_FIRST + 8 - LVM_DELETEALLITEMS = LVM_FIRST + 9 - LVM_GETCALLBACKMASK = LVM_FIRST + 10 - LVM_SETCALLBACKMASK = LVM_FIRST + 11 - LVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT - LVM_GETNEXTITEM = LVM_FIRST + 12 - LVM_FINDITEM = LVM_FIRST + 83 - LVM_GETITEMRECT = LVM_FIRST + 14 - LVM_GETSTRINGWIDTH = LVM_FIRST + 87 - LVM_HITTEST = LVM_FIRST + 18 - LVM_ENSUREVISIBLE = LVM_FIRST + 19 - LVM_SCROLL = LVM_FIRST + 20 - LVM_REDRAWITEMS = LVM_FIRST + 21 - LVM_ARRANGE = LVM_FIRST + 22 - LVM_EDITLABEL = LVM_FIRST + 118 - LVM_GETEDITCONTROL = LVM_FIRST + 24 - LVM_GETCOLUMN = LVM_FIRST + 95 - LVM_SETCOLUMN = LVM_FIRST + 96 - LVM_INSERTCOLUMN = LVM_FIRST + 97 - LVM_DELETECOLUMN = LVM_FIRST + 28 - LVM_GETCOLUMNWIDTH = LVM_FIRST + 29 - LVM_SETCOLUMNWIDTH = LVM_FIRST + 30 - LVM_GETHEADER = LVM_FIRST + 31 - LVM_CREATEDRAGIMAGE = LVM_FIRST + 33 - LVM_GETVIEWRECT = LVM_FIRST + 34 - LVM_GETTEXTCOLOR = LVM_FIRST + 35 - LVM_SETTEXTCOLOR = LVM_FIRST + 36 - LVM_GETTEXTBKCOLOR = LVM_FIRST + 37 - LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 - LVM_GETTOPINDEX = LVM_FIRST + 39 - LVM_GETCOUNTPERPAGE = LVM_FIRST + 40 - LVM_GETORIGIN = LVM_FIRST + 41 - LVM_UPDATE = LVM_FIRST + 42 - LVM_SETITEMSTATE = LVM_FIRST + 43 - LVM_GETITEMSTATE = LVM_FIRST + 44 - LVM_GETITEMTEXT = LVM_FIRST + 115 - LVM_SETITEMTEXT = LVM_FIRST + 116 - LVM_SETITEMCOUNT = LVM_FIRST + 47 - LVM_SORTITEMS = LVM_FIRST + 48 - LVM_SETITEMPOSITION32 = LVM_FIRST + 49 - LVM_GETSELECTEDCOUNT = LVM_FIRST + 50 - LVM_GETITEMSPACING = LVM_FIRST + 51 - LVM_GETISEARCHSTRING = LVM_FIRST + 117 - LVM_SETICONSPACING = LVM_FIRST + 53 - LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 - LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 - LVM_GETSUBITEMRECT = LVM_FIRST + 56 - LVM_SUBITEMHITTEST = LVM_FIRST + 57 - LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58 - LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59 - LVM_SETHOTITEM = LVM_FIRST + 60 - LVM_GETHOTITEM = LVM_FIRST + 61 - LVM_SETHOTCURSOR = LVM_FIRST + 62 - LVM_GETHOTCURSOR = LVM_FIRST + 63 - LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64 - LVM_SETWORKAREAS = LVM_FIRST + 65 - LVM_GETWORKAREAS = LVM_FIRST + 70 - LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73 - LVM_GETSELECTIONMARK = LVM_FIRST + 66 - LVM_SETSELECTIONMARK = LVM_FIRST + 67 - LVM_SETHOVERTIME = LVM_FIRST + 71 - LVM_GETHOVERTIME = LVM_FIRST + 72 - LVM_SETTOOLTIPS = LVM_FIRST + 74 - LVM_GETTOOLTIPS = LVM_FIRST + 78 - LVM_SORTITEMSEX = LVM_FIRST + 81 - LVM_SETBKIMAGE = LVM_FIRST + 138 - LVM_GETBKIMAGE = LVM_FIRST + 139 - LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140 - LVM_SETVIEW = LVM_FIRST + 142 - LVM_GETVIEW = LVM_FIRST + 143 - LVM_INSERTGROUP = LVM_FIRST + 145 - LVM_SETGROUPINFO = LVM_FIRST + 147 - LVM_GETGROUPINFO = LVM_FIRST + 149 - LVM_REMOVEGROUP = LVM_FIRST + 150 - LVM_MOVEGROUP = LVM_FIRST + 151 - LVM_GETGROUPCOUNT = LVM_FIRST + 152 - LVM_GETGROUPINFOBYINDEX = LVM_FIRST + 153 - LVM_MOVEITEMTOGROUP = LVM_FIRST + 154 - LVM_GETGROUPRECT = LVM_FIRST + 98 - LVM_SETGROUPMETRICS = LVM_FIRST + 155 - LVM_GETGROUPMETRICS = LVM_FIRST + 156 - LVM_ENABLEGROUPVIEW = LVM_FIRST + 157 - LVM_SORTGROUPS = LVM_FIRST + 158 - LVM_INSERTGROUPSORTED = LVM_FIRST + 159 - LVM_REMOVEALLGROUPS = LVM_FIRST + 160 - LVM_HASGROUP = LVM_FIRST + 161 - LVM_GETGROUPSTATE = LVM_FIRST + 92 - LVM_GETFOCUSEDGROUP = LVM_FIRST + 93 - LVM_SETTILEVIEWINFO = LVM_FIRST + 162 - LVM_GETTILEVIEWINFO = LVM_FIRST + 163 - LVM_SETTILEINFO = LVM_FIRST + 164 - LVM_GETTILEINFO = LVM_FIRST + 165 - LVM_SETINSERTMARK = LVM_FIRST + 166 - LVM_GETINSERTMARK = LVM_FIRST + 167 - LVM_INSERTMARKHITTEST = LVM_FIRST + 168 - LVM_GETINSERTMARKRECT = LVM_FIRST + 169 - LVM_SETINSERTMARKCOLOR = LVM_FIRST + 170 - LVM_GETINSERTMARKCOLOR = LVM_FIRST + 171 - LVM_SETINFOTIP = LVM_FIRST + 173 - LVM_GETSELECTEDCOLUMN = LVM_FIRST + 174 - LVM_ISGROUPVIEWENABLED = LVM_FIRST + 175 - LVM_GETOUTLINECOLOR = LVM_FIRST + 176 - LVM_SETOUTLINECOLOR = LVM_FIRST + 177 - LVM_CANCELEDITLABEL = LVM_FIRST + 179 - LVM_MAPINDEXTOID = LVM_FIRST + 180 - LVM_MAPIDTOINDEX = LVM_FIRST + 181 - LVM_ISITEMVISIBLE = LVM_FIRST + 182 - LVM_GETNEXTITEMINDEX = LVM_FIRST + 211 -) - -// ListView notifications -const ( - LVN_FIRST = -100 - - LVN_ITEMCHANGING = LVN_FIRST - 0 - LVN_ITEMCHANGED = LVN_FIRST - 1 - LVN_INSERTITEM = LVN_FIRST - 2 - LVN_DELETEITEM = LVN_FIRST - 3 - LVN_DELETEALLITEMS = LVN_FIRST - 4 - LVN_BEGINLABELEDITA = LVN_FIRST - 5 - LVN_BEGINLABELEDITW = LVN_FIRST - 75 - LVN_ENDLABELEDITA = LVN_FIRST - 6 - LVN_ENDLABELEDITW = LVN_FIRST - 76 - LVN_COLUMNCLICK = LVN_FIRST - 8 - LVN_BEGINDRAG = LVN_FIRST - 9 - LVN_BEGINRDRAG = LVN_FIRST - 11 - LVN_ODCACHEHINT = LVN_FIRST - 13 - LVN_ODFINDITEMA = LVN_FIRST - 52 - LVN_ODFINDITEMW = LVN_FIRST - 79 - LVN_ITEMACTIVATE = LVN_FIRST - 14 - LVN_ODSTATECHANGED = LVN_FIRST - 15 - LVN_HOTTRACK = LVN_FIRST - 21 - LVN_GETDISPINFO = LVN_FIRST - 77 - LVN_SETDISPINFO = LVN_FIRST - 78 - LVN_KEYDOWN = LVN_FIRST - 55 - LVN_MARQUEEBEGIN = LVN_FIRST - 56 - LVN_GETINFOTIP = LVN_FIRST - 58 - LVN_INCREMENTALSEARCH = LVN_FIRST - 63 - LVN_BEGINSCROLL = LVN_FIRST - 80 - LVN_ENDSCROLL = LVN_FIRST - 81 -) - -// ListView LVNI constants -const ( - LVNI_ALL = 0 - LVNI_FOCUSED = 1 - LVNI_SELECTED = 2 - LVNI_CUT = 4 - LVNI_DROPHILITED = 8 - LVNI_ABOVE = 256 - LVNI_BELOW = 512 - LVNI_TOLEFT = 1024 - LVNI_TORIGHT = 2048 -) - -// ListView styles -const ( - LVS_ICON = 0x0000 - LVS_REPORT = 0x0001 - LVS_SMALLICON = 0x0002 - LVS_LIST = 0x0003 - LVS_TYPEMASK = 0x0003 - LVS_SINGLESEL = 0x0004 - LVS_SHOWSELALWAYS = 0x0008 - LVS_SORTASCENDING = 0x0010 - LVS_SORTDESCENDING = 0x0020 - LVS_SHAREIMAGELISTS = 0x0040 - LVS_NOLABELWRAP = 0x0080 - LVS_AUTOARRANGE = 0x0100 - LVS_EDITLABELS = 0x0200 - LVS_OWNERDATA = 0x1000 - LVS_NOSCROLL = 0x2000 - LVS_TYPESTYLEMASK = 0xfc00 - LVS_ALIGNTOP = 0x0000 - LVS_ALIGNLEFT = 0x0800 - LVS_ALIGNMASK = 0x0c00 - LVS_OWNERDRAWFIXED = 0x0400 - LVS_NOCOLUMNHEADER = 0x4000 - LVS_NOSORTHEADER = 0x8000 -) - -// ListView extended styles -const ( - LVS_EX_GRIDLINES = 0x00000001 - LVS_EX_SUBITEMIMAGES = 0x00000002 - LVS_EX_CHECKBOXES = 0x00000004 - LVS_EX_TRACKSELECT = 0x00000008 - LVS_EX_HEADERDRAGDROP = 0x00000010 - LVS_EX_FULLROWSELECT = 0x00000020 - LVS_EX_ONECLICKACTIVATE = 0x00000040 - LVS_EX_TWOCLICKACTIVATE = 0x00000080 - LVS_EX_FLATSB = 0x00000100 - LVS_EX_REGIONAL = 0x00000200 - LVS_EX_INFOTIP = 0x00000400 - LVS_EX_UNDERLINEHOT = 0x00000800 - LVS_EX_UNDERLINECOLD = 0x00001000 - LVS_EX_MULTIWORKAREAS = 0x00002000 - LVS_EX_LABELTIP = 0x00004000 - LVS_EX_BORDERSELECT = 0x00008000 - LVS_EX_DOUBLEBUFFER = 0x00010000 - LVS_EX_HIDELABELS = 0x00020000 - LVS_EX_SINGLEROW = 0x00040000 - LVS_EX_SNAPTOGRID = 0x00080000 - LVS_EX_SIMPLESELECT = 0x00100000 -) - -// ListView column flags -const ( - LVCF_FMT = 0x0001 - LVCF_WIDTH = 0x0002 - LVCF_TEXT = 0x0004 - LVCF_SUBITEM = 0x0008 - LVCF_IMAGE = 0x0010 - LVCF_ORDER = 0x0020 -) - -// ListView column format constants -const ( - LVCFMT_LEFT = 0x0000 - LVCFMT_RIGHT = 0x0001 - LVCFMT_CENTER = 0x0002 - LVCFMT_JUSTIFYMASK = 0x0003 - LVCFMT_IMAGE = 0x0800 - LVCFMT_BITMAP_ON_RIGHT = 0x1000 - LVCFMT_COL_HAS_IMAGES = 0x8000 -) - -// ListView item flags -const ( - LVIF_TEXT = 0x00000001 - LVIF_IMAGE = 0x00000002 - LVIF_PARAM = 0x00000004 - LVIF_STATE = 0x00000008 - LVIF_INDENT = 0x00000010 - LVIF_NORECOMPUTE = 0x00000800 - LVIF_GROUPID = 0x00000100 - LVIF_COLUMNS = 0x00000200 -) - -// ListView item states -const ( - LVIS_FOCUSED = 1 - LVIS_SELECTED = 2 - LVIS_CUT = 4 - LVIS_DROPHILITED = 8 - LVIS_OVERLAYMASK = 0xF00 - LVIS_STATEIMAGEMASK = 0xF000 -) - -// ListView hit test constants -const ( - LVHT_NOWHERE = 0x00000001 - LVHT_ONITEMICON = 0x00000002 - LVHT_ONITEMLABEL = 0x00000004 - LVHT_ONITEMSTATEICON = 0x00000008 - LVHT_ONITEM = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON - - LVHT_ABOVE = 0x00000008 - LVHT_BELOW = 0x00000010 - LVHT_TORIGHT = 0x00000020 - LVHT_TOLEFT = 0x00000040 -) - -// ListView image list types -const ( - LVSIL_NORMAL = 0 - LVSIL_SMALL = 1 - LVSIL_STATE = 2 - LVSIL_GROUPHEADER = 3 -) - -// InitCommonControlsEx flags -const ( - ICC_LISTVIEW_CLASSES = 1 - ICC_TREEVIEW_CLASSES = 2 - ICC_BAR_CLASSES = 4 - ICC_TAB_CLASSES = 8 - ICC_UPDOWN_CLASS = 16 - ICC_PROGRESS_CLASS = 32 - ICC_HOTKEY_CLASS = 64 - ICC_ANIMATE_CLASS = 128 - ICC_WIN95_CLASSES = 255 - ICC_DATE_CLASSES = 256 - ICC_USEREX_CLASSES = 512 - ICC_COOL_CLASSES = 1024 - ICC_INTERNET_CLASSES = 2048 - ICC_PAGESCROLLER_CLASS = 4096 - ICC_NATIVEFNTCTL_CLASS = 8192 - INFOTIPSIZE = 1024 - ICC_STANDARD_CLASSES = 0x00004000 - ICC_LINK_CLASS = 0x00008000 -) - -// Dialog Codes -const ( - DLGC_WANTARROWS = 0x0001 - DLGC_WANTTAB = 0x0002 - DLGC_WANTALLKEYS = 0x0004 - DLGC_WANTMESSAGE = 0x0004 - DLGC_HASSETSEL = 0x0008 - DLGC_DEFPUSHBUTTON = 0x0010 - DLGC_UNDEFPUSHBUTTON = 0x0020 - DLGC_RADIOBUTTON = 0x0040 - DLGC_WANTCHARS = 0x0080 - DLGC_STATIC = 0x0100 - DLGC_BUTTON = 0x2000 -) - -// Get/SetWindowWord/Long offsets for use with WC_DIALOG windows -const ( - DWL_MSGRESULT = 0 - DWL_DLGPROC = 4 - DWL_USER = 8 -) - -// PeekMessage wRemoveMsg value -const ( - PM_NOREMOVE = 0x000 - PM_REMOVE = 0x001 - PM_NOYIELD = 0x002 -) - -// ImageList flags -const ( - ILC_MASK = 0x00000001 - ILC_COLOR = 0x00000000 - ILC_COLORDDB = 0x000000FE - ILC_COLOR4 = 0x00000004 - ILC_COLOR8 = 0x00000008 - ILC_COLOR16 = 0x00000010 - ILC_COLOR24 = 0x00000018 - ILC_COLOR32 = 0x00000020 - ILC_PALETTE = 0x00000800 - ILC_MIRROR = 0x00002000 - ILC_PERITEMMIRROR = 0x00008000 - ILC_ORIGINALSIZE = 0x00010000 - ILC_HIGHQUALITYSCALE = 0x00020000 -) - -// Keystroke Message Flags -const ( - KF_EXTENDED = 0x0100 - KF_DLGMODE = 0x0800 - KF_MENUMODE = 0x1000 - KF_ALTDOWN = 0x2000 - KF_REPEAT = 0x4000 - KF_UP = 0x8000 -) - -// Virtual-Key Codes -const ( - VK_LBUTTON = 0x01 - VK_RBUTTON = 0x02 - VK_CANCEL = 0x03 - VK_MBUTTON = 0x04 - VK_XBUTTON1 = 0x05 - VK_XBUTTON2 = 0x06 - VK_BACK = 0x08 - VK_TAB = 0x09 - VK_CLEAR = 0x0C - VK_RETURN = 0x0D - VK_SHIFT = 0x10 - VK_CONTROL = 0x11 - VK_MENU = 0x12 - VK_PAUSE = 0x13 - VK_CAPITAL = 0x14 - VK_KANA = 0x15 - VK_HANGEUL = 0x15 - VK_HANGUL = 0x15 - VK_JUNJA = 0x17 - VK_FINAL = 0x18 - VK_HANJA = 0x19 - VK_KANJI = 0x19 - VK_ESCAPE = 0x1B - VK_CONVERT = 0x1C - VK_NONCONVERT = 0x1D - VK_ACCEPT = 0x1E - VK_MODECHANGE = 0x1F - VK_SPACE = 0x20 - VK_PRIOR = 0x21 - VK_NEXT = 0x22 - VK_END = 0x23 - VK_HOME = 0x24 - VK_LEFT = 0x25 - VK_UP = 0x26 - VK_RIGHT = 0x27 - VK_DOWN = 0x28 - VK_SELECT = 0x29 - VK_PRINT = 0x2A - VK_EXECUTE = 0x2B - VK_SNAPSHOT = 0x2C - VK_INSERT = 0x2D - VK_DELETE = 0x2E - VK_HELP = 0x2F - VK_LWIN = 0x5B - VK_RWIN = 0x5C - VK_APPS = 0x5D - VK_SLEEP = 0x5F - VK_NUMPAD0 = 0x60 - VK_NUMPAD1 = 0x61 - VK_NUMPAD2 = 0x62 - VK_NUMPAD3 = 0x63 - VK_NUMPAD4 = 0x64 - VK_NUMPAD5 = 0x65 - VK_NUMPAD6 = 0x66 - VK_NUMPAD7 = 0x67 - VK_NUMPAD8 = 0x68 - VK_NUMPAD9 = 0x69 - VK_MULTIPLY = 0x6A - VK_ADD = 0x6B - VK_SEPARATOR = 0x6C - VK_SUBTRACT = 0x6D - VK_DECIMAL = 0x6E - VK_DIVIDE = 0x6F - VK_F1 = 0x70 - VK_F2 = 0x71 - VK_F3 = 0x72 - VK_F4 = 0x73 - VK_F5 = 0x74 - VK_F6 = 0x75 - VK_F7 = 0x76 - VK_F8 = 0x77 - VK_F9 = 0x78 - VK_F10 = 0x79 - VK_F11 = 0x7A - VK_F12 = 0x7B - VK_F13 = 0x7C - VK_F14 = 0x7D - VK_F15 = 0x7E - VK_F16 = 0x7F - VK_F17 = 0x80 - VK_F18 = 0x81 - VK_F19 = 0x82 - VK_F20 = 0x83 - VK_F21 = 0x84 - VK_F22 = 0x85 - VK_F23 = 0x86 - VK_F24 = 0x87 - VK_NUMLOCK = 0x90 - VK_SCROLL = 0x91 - VK_OEM_NEC_EQUAL = 0x92 - VK_OEM_FJ_JISHO = 0x92 - VK_OEM_FJ_MASSHOU = 0x93 - VK_OEM_FJ_TOUROKU = 0x94 - VK_OEM_FJ_LOYA = 0x95 - VK_OEM_FJ_ROYA = 0x96 - VK_LSHIFT = 0xA0 - VK_RSHIFT = 0xA1 - VK_LCONTROL = 0xA2 - VK_RCONTROL = 0xA3 - VK_LMENU = 0xA4 - VK_RMENU = 0xA5 - VK_BROWSER_BACK = 0xA6 - VK_BROWSER_FORWARD = 0xA7 - VK_BROWSER_REFRESH = 0xA8 - VK_BROWSER_STOP = 0xA9 - VK_BROWSER_SEARCH = 0xAA - VK_BROWSER_FAVORITES = 0xAB - VK_BROWSER_HOME = 0xAC - VK_VOLUME_MUTE = 0xAD - VK_VOLUME_DOWN = 0xAE - VK_VOLUME_UP = 0xAF - VK_MEDIA_NEXT_TRACK = 0xB0 - VK_MEDIA_PREV_TRACK = 0xB1 - VK_MEDIA_STOP = 0xB2 - VK_MEDIA_PLAY_PAUSE = 0xB3 - VK_LAUNCH_MAIL = 0xB4 - VK_LAUNCH_MEDIA_SELECT = 0xB5 - VK_LAUNCH_APP1 = 0xB6 - VK_LAUNCH_APP2 = 0xB7 - VK_OEM_1 = 0xBA - VK_OEM_PLUS = 0xBB - VK_OEM_COMMA = 0xBC - VK_OEM_MINUS = 0xBD - VK_OEM_PERIOD = 0xBE - VK_OEM_2 = 0xBF - VK_OEM_3 = 0xC0 - VK_OEM_4 = 0xDB - VK_OEM_5 = 0xDC - VK_OEM_6 = 0xDD - VK_OEM_7 = 0xDE - VK_OEM_8 = 0xDF - VK_OEM_AX = 0xE1 - VK_OEM_102 = 0xE2 - VK_ICO_HELP = 0xE3 - VK_ICO_00 = 0xE4 - VK_PROCESSKEY = 0xE5 - VK_ICO_CLEAR = 0xE6 - VK_PACKET = 0xE7 - VK_OEM_RESET = 0xE9 - VK_OEM_JUMP = 0xEA - VK_OEM_PA1 = 0xEB - VK_OEM_PA2 = 0xEC - VK_OEM_PA3 = 0xED - VK_OEM_WSCTRL = 0xEE - VK_OEM_CUSEL = 0xEF - VK_OEM_ATTN = 0xF0 - VK_OEM_FINISH = 0xF1 - VK_OEM_COPY = 0xF2 - VK_OEM_AUTO = 0xF3 - VK_OEM_ENLW = 0xF4 - VK_OEM_BACKTAB = 0xF5 - VK_ATTN = 0xF6 - VK_CRSEL = 0xF7 - VK_EXSEL = 0xF8 - VK_EREOF = 0xF9 - VK_PLAY = 0xFA - VK_ZOOM = 0xFB - VK_NONAME = 0xFC - VK_PA1 = 0xFD - VK_OEM_CLEAR = 0xFE -) - -// Registry Value Types -const ( - REG_NONE = 0 - REG_SZ = 1 - REG_EXPAND_SZ = 2 - REG_BINARY = 3 - REG_DWORD = 4 - REG_DWORD_LITTLE_ENDIAN = 4 - REG_DWORD_BIG_ENDIAN = 5 - REG_LINK = 6 - REG_MULTI_SZ = 7 - REG_RESOURCE_LIST = 8 - REG_FULL_RESOURCE_DESCRIPTOR = 9 - REG_RESOURCE_REQUIREMENTS_LIST = 10 - REG_QWORD = 11 - REG_QWORD_LITTLE_ENDIAN = 11 -) - -// Tooltip styles -const ( - TTS_ALWAYSTIP = 0x01 - TTS_NOPREFIX = 0x02 - TTS_NOANIMATE = 0x10 - TTS_NOFADE = 0x20 - TTS_BALLOON = 0x40 - TTS_CLOSE = 0x80 - TTS_USEVISUALSTYLE = 0x100 -) - -// Tooltip messages -const ( - TTM_ACTIVATE = (WM_USER + 1) - TTM_SETDELAYTIME = (WM_USER + 3) - TTM_ADDTOOL = (WM_USER + 50) - TTM_DELTOOL = (WM_USER + 51) - TTM_NEWTOOLRECT = (WM_USER + 52) - TTM_RELAYEVENT = (WM_USER + 7) - TTM_GETTOOLINFO = (WM_USER + 53) - TTM_SETTOOLINFO = (WM_USER + 54) - TTM_HITTEST = (WM_USER + 55) - TTM_GETTEXT = (WM_USER + 56) - TTM_UPDATETIPTEXT = (WM_USER + 57) - TTM_GETTOOLCOUNT = (WM_USER + 13) - TTM_ENUMTOOLS = (WM_USER + 58) - TTM_GETCURRENTTOOL = (WM_USER + 59) - TTM_WINDOWFROMPOINT = (WM_USER + 16) - TTM_TRACKACTIVATE = (WM_USER + 17) - TTM_TRACKPOSITION = (WM_USER + 18) - TTM_SETTIPBKCOLOR = (WM_USER + 19) - TTM_SETTIPTEXTCOLOR = (WM_USER + 20) - TTM_GETDELAYTIME = (WM_USER + 21) - TTM_GETTIPBKCOLOR = (WM_USER + 22) - TTM_GETTIPTEXTCOLOR = (WM_USER + 23) - TTM_SETMAXTIPWIDTH = (WM_USER + 24) - TTM_GETMAXTIPWIDTH = (WM_USER + 25) - TTM_SETMARGIN = (WM_USER + 26) - TTM_GETMARGIN = (WM_USER + 27) - TTM_POP = (WM_USER + 28) - TTM_UPDATE = (WM_USER + 29) - TTM_GETBUBBLESIZE = (WM_USER + 30) - TTM_ADJUSTRECT = (WM_USER + 31) - TTM_SETTITLE = (WM_USER + 33) - TTM_POPUP = (WM_USER + 34) - TTM_GETTITLE = (WM_USER + 35) -) - -// Tooltip icons -const ( - TTI_NONE = 0 - TTI_INFO = 1 - TTI_WARNING = 2 - TTI_ERROR = 3 - TTI_INFO_LARGE = 4 - TTI_WARNING_LARGE = 5 - TTI_ERROR_LARGE = 6 -) - -// Tooltip notifications -const ( - TTN_FIRST = -520 - TTN_LAST = -549 - TTN_GETDISPINFO = (TTN_FIRST - 10) - TTN_SHOW = (TTN_FIRST - 1) - TTN_POP = (TTN_FIRST - 2) - TTN_LINKCLICK = (TTN_FIRST - 3) - TTN_NEEDTEXT = TTN_GETDISPINFO -) - -const ( - TTF_IDISHWND = 0x0001 - TTF_CENTERTIP = 0x0002 - TTF_RTLREADING = 0x0004 - TTF_SUBCLASS = 0x0010 - TTF_TRACK = 0x0020 - TTF_ABSOLUTE = 0x0080 - TTF_TRANSPARENT = 0x0100 - TTF_PARSELINKS = 0x1000 - TTF_DI_SETITEM = 0x8000 -) - -const ( - SWP_NOSIZE = 0x0001 - SWP_NOMOVE = 0x0002 - SWP_NOZORDER = 0x0004 - SWP_NOREDRAW = 0x0008 - SWP_NOACTIVATE = 0x0010 - SWP_FRAMECHANGED = 0x0020 - SWP_SHOWWINDOW = 0x0040 - SWP_HIDEWINDOW = 0x0080 - SWP_NOCOPYBITS = 0x0100 - SWP_NOOWNERZORDER = 0x0200 - SWP_NOSENDCHANGING = 0x0400 - SWP_DRAWFRAME = SWP_FRAMECHANGED - SWP_NOREPOSITION = SWP_NOOWNERZORDER - SWP_DEFERERASE = 0x2000 - SWP_ASYNCWINDOWPOS = 0x4000 -) - -// Predefined window handles -const ( - HWND_BROADCAST = HWND(0xFFFF) - HWND_BOTTOM = HWND(1) - HWND_NOTOPMOST = ^HWND(1) // -2 - HWND_TOP = HWND(0) - HWND_TOPMOST = ^HWND(0) // -1 - HWND_DESKTOP = HWND(0) - HWND_MESSAGE = ^HWND(2) // -3 -) - -// Pen types -const ( - PS_COSMETIC = 0x00000000 - PS_GEOMETRIC = 0x00010000 - PS_TYPE_MASK = 0x000F0000 -) - -// Pen styles -const ( - PS_SOLID = 0 - PS_DASH = 1 - PS_DOT = 2 - PS_DASHDOT = 3 - PS_DASHDOTDOT = 4 - PS_NULL = 5 - PS_INSIDEFRAME = 6 - PS_USERSTYLE = 7 - PS_ALTERNATE = 8 - PS_STYLE_MASK = 0x0000000F -) - -// Pen cap types -const ( - PS_ENDCAP_ROUND = 0x00000000 - PS_ENDCAP_SQUARE = 0x00000100 - PS_ENDCAP_FLAT = 0x00000200 - PS_ENDCAP_MASK = 0x00000F00 -) - -// Pen join types -const ( - PS_JOIN_ROUND = 0x00000000 - PS_JOIN_BEVEL = 0x00001000 - PS_JOIN_MITER = 0x00002000 - PS_JOIN_MASK = 0x0000F000 -) - -// Hatch styles -const ( - HS_HORIZONTAL = 0 - HS_VERTICAL = 1 - HS_FDIAGONAL = 2 - HS_BDIAGONAL = 3 - HS_CROSS = 4 - HS_DIAGCROSS = 5 -) - -// Stock Logical Objects -const ( - WHITE_BRUSH = 0 - LTGRAY_BRUSH = 1 - GRAY_BRUSH = 2 - DKGRAY_BRUSH = 3 - BLACK_BRUSH = 4 - NULL_BRUSH = 5 - HOLLOW_BRUSH = NULL_BRUSH - WHITE_PEN = 6 - BLACK_PEN = 7 - NULL_PEN = 8 - OEM_FIXED_FONT = 10 - ANSI_FIXED_FONT = 11 - ANSI_VAR_FONT = 12 - SYSTEM_FONT = 13 - DEVICE_DEFAULT_FONT = 14 - DEFAULT_PALETTE = 15 - SYSTEM_FIXED_FONT = 16 - DEFAULT_GUI_FONT = 17 - DC_BRUSH = 18 - DC_PEN = 19 -) - -// Brush styles -const ( - BS_SOLID = 0 - BS_NULL = 1 - BS_HOLLOW = BS_NULL - BS_HATCHED = 2 - BS_PATTERN = 3 - BS_INDEXED = 4 - BS_DIBPATTERN = 5 - BS_DIBPATTERNPT = 6 - BS_PATTERN8X8 = 7 - BS_DIBPATTERN8X8 = 8 - BS_MONOPATTERN = 9 -) - -// TRACKMOUSEEVENT flags -const ( - TME_HOVER = 0x00000001 - TME_LEAVE = 0x00000002 - TME_NONCLIENT = 0x00000010 - TME_QUERY = 0x40000000 - TME_CANCEL = 0x80000000 - - HOVER_DEFAULT = 0xFFFFFFFF -) - -// WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes -const ( - HTERROR = (-2) - HTTRANSPARENT = (-1) - HTNOWHERE = 0 - HTCLIENT = 1 - HTCAPTION = 2 - HTSYSMENU = 3 - HTGROWBOX = 4 - HTSIZE = HTGROWBOX - HTMENU = 5 - HTHSCROLL = 6 - HTVSCROLL = 7 - HTMINBUTTON = 8 - HTMAXBUTTON = 9 - HTLEFT = 10 - HTRIGHT = 11 - HTTOP = 12 - HTTOPLEFT = 13 - HTTOPRIGHT = 14 - HTBOTTOM = 15 - HTBOTTOMLEFT = 16 - HTBOTTOMRIGHT = 17 - HTBORDER = 18 - HTREDUCE = HTMINBUTTON - HTZOOM = HTMAXBUTTON - HTSIZEFIRST = HTLEFT - HTSIZELAST = HTBOTTOMRIGHT - HTOBJECT = 19 - HTCLOSE = 20 - HTHELP = 21 -) - -// DrawText[Ex] format flags -const ( - DT_TOP = 0x00000000 - DT_LEFT = 0x00000000 - DT_CENTER = 0x00000001 - DT_RIGHT = 0x00000002 - DT_VCENTER = 0x00000004 - DT_BOTTOM = 0x00000008 - DT_WORDBREAK = 0x00000010 - DT_SINGLELINE = 0x00000020 - DT_EXPANDTABS = 0x00000040 - DT_TABSTOP = 0x00000080 - DT_NOCLIP = 0x00000100 - DT_EXTERNALLEADING = 0x00000200 - DT_CALCRECT = 0x00000400 - DT_NOPREFIX = 0x00000800 - DT_INTERNAL = 0x00001000 - DT_EDITCONTROL = 0x00002000 - DT_PATH_ELLIPSIS = 0x00004000 - DT_END_ELLIPSIS = 0x00008000 - DT_MODIFYSTRING = 0x00010000 - DT_RTLREADING = 0x00020000 - DT_WORD_ELLIPSIS = 0x00040000 - DT_NOFULLWIDTHCHARBREAK = 0x00080000 - DT_HIDEPREFIX = 0x00100000 - DT_PREFIXONLY = 0x00200000 -) - -const CLR_INVALID = 0xFFFFFFFF - -// Background Modes -const ( - TRANSPARENT = 1 - OPAQUE = 2 - BKMODE_LAST = 2 -) - -// Global Memory Flags -const ( - GMEM_FIXED = 0x0000 - GMEM_MOVEABLE = 0x0002 - GMEM_NOCOMPACT = 0x0010 - GMEM_NODISCARD = 0x0020 - GMEM_ZEROINIT = 0x0040 - GMEM_MODIFY = 0x0080 - GMEM_DISCARDABLE = 0x0100 - GMEM_NOT_BANKED = 0x1000 - GMEM_SHARE = 0x2000 - GMEM_DDESHARE = 0x2000 - GMEM_NOTIFY = 0x4000 - GMEM_LOWER = GMEM_NOT_BANKED - GMEM_VALID_FLAGS = 0x7F72 - GMEM_INVALID_HANDLE = 0x8000 - GHND = (GMEM_MOVEABLE | GMEM_ZEROINIT) - GPTR = (GMEM_FIXED | GMEM_ZEROINIT) -) - -// Ternary raster operations -const ( - SRCCOPY = 0x00CC0020 - SRCPAINT = 0x00EE0086 - SRCAND = 0x008800C6 - SRCINVERT = 0x00660046 - SRCERASE = 0x00440328 - NOTSRCCOPY = 0x00330008 - NOTSRCERASE = 0x001100A6 - MERGECOPY = 0x00C000CA - MERGEPAINT = 0x00BB0226 - PATCOPY = 0x00F00021 - PATPAINT = 0x00FB0A09 - PATINVERT = 0x005A0049 - DSTINVERT = 0x00550009 - BLACKNESS = 0x00000042 - WHITENESS = 0x00FF0062 - NOMIRRORBITMAP = 0x80000000 - CAPTUREBLT = 0x40000000 -) - -// Clipboard formats -const ( - CF_TEXT = 1 - CF_BITMAP = 2 - CF_METAFILEPICT = 3 - CF_SYLK = 4 - CF_DIF = 5 - CF_TIFF = 6 - CF_OEMTEXT = 7 - CF_DIB = 8 - CF_PALETTE = 9 - CF_PENDATA = 10 - CF_RIFF = 11 - CF_WAVE = 12 - CF_UNICODETEXT = 13 - CF_ENHMETAFILE = 14 - CF_HDROP = 15 - CF_LOCALE = 16 - CF_DIBV5 = 17 - CF_MAX = 18 - CF_OWNERDISPLAY = 0x0080 - CF_DSPTEXT = 0x0081 - CF_DSPBITMAP = 0x0082 - CF_DSPMETAFILEPICT = 0x0083 - CF_DSPENHMETAFILE = 0x008E - CF_PRIVATEFIRST = 0x0200 - CF_PRIVATELAST = 0x02FF - CF_GDIOBJFIRST = 0x0300 - CF_GDIOBJLAST = 0x03FF -) - -// Bitmap compression formats -const ( - BI_RGB = 0 - BI_RLE8 = 1 - BI_RLE4 = 2 - BI_BITFIELDS = 3 - BI_JPEG = 4 - BI_PNG = 5 -) - -// SetDIBitsToDevice fuColorUse -const ( - DIB_PAL_COLORS = 1 - DIB_RGB_COLORS = 0 -) - -const ( - STANDARD_RIGHTS_REQUIRED = 0x000F -) - -// MapVirtualKey maptypes -const ( - MAPVK_VK_TO_CHAR = 2 - MAPVK_VK_TO_VSC = 0 - MAPVK_VSC_TO_VK = 1 - MAPVK_VSC_TO_VK_EX = 3 -) - -// ReadEventLog Flags -const ( - EVENTLOG_SEEK_READ = 0x0002 - EVENTLOG_SEQUENTIAL_READ = 0x0001 - EVENTLOG_FORWARDS_READ = 0x0004 - EVENTLOG_BACKWARDS_READ = 0x0008 -) - -// CreateToolhelp32Snapshot flags -const ( - TH32CS_SNAPHEAPLIST = 0x00000001 - TH32CS_SNAPPROCESS = 0x00000002 - TH32CS_SNAPTHREAD = 0x00000004 - TH32CS_SNAPMODULE = 0x00000008 - TH32CS_SNAPMODULE32 = 0x00000010 - TH32CS_INHERIT = 0x80000000 - TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD -) - -const ( - MAX_MODULE_NAME32 = 255 - MAX_PATH = 260 -) - -const ( - FOREGROUND_BLUE = 0x0001 - FOREGROUND_GREEN = 0x0002 - FOREGROUND_RED = 0x0004 - FOREGROUND_INTENSITY = 0x0008 - BACKGROUND_BLUE = 0x0010 - BACKGROUND_GREEN = 0x0020 - BACKGROUND_RED = 0x0040 - BACKGROUND_INTENSITY = 0x0080 - COMMON_LVB_LEADING_BYTE = 0x0100 - COMMON_LVB_TRAILING_BYTE = 0x0200 - COMMON_LVB_GRID_HORIZONTAL = 0x0400 - COMMON_LVB_GRID_LVERTICAL = 0x0800 - COMMON_LVB_GRID_RVERTICAL = 0x1000 - COMMON_LVB_REVERSE_VIDEO = 0x4000 - COMMON_LVB_UNDERSCORE = 0x8000 -) - -// Flags used by the DWM_BLURBEHIND structure to indicate -// which of its members contain valid information. -const ( - DWM_BB_ENABLE = 0x00000001 // A value for the fEnable member has been specified. - DWM_BB_BLURREGION = 0x00000002 // A value for the hRgnBlur member has been specified. - DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004 // A value for the fTransitionOnMaximized member has been specified. -) - -// Flags used by the DwmEnableComposition function -// to change the state of Desktop Window Manager (DWM) composition. -const ( - DWM_EC_DISABLECOMPOSITION = 0 // Disable composition - DWM_EC_ENABLECOMPOSITION = 1 // Enable composition -) - -// enum-lite implementation for the following constant structure -type DWM_SHOWCONTACT int32 - -const ( - DWMSC_DOWN = 0x00000001 - DWMSC_UP = 0x00000002 - DWMSC_DRAG = 0x00000004 - DWMSC_HOLD = 0x00000008 - DWMSC_PENBARREL = 0x00000010 - DWMSC_NONE = 0x00000000 - DWMSC_ALL = 0xFFFFFFFF -) - -// enum-lite implementation for the following constant structure -type DWM_SOURCE_FRAME_SAMPLING int32 - -// TODO: need to verify this construction -// Flags used by the DwmSetPresentParameters function -// to specify the frame sampling type -const ( - DWM_SOURCE_FRAME_SAMPLING_POINT = iota + 1 - DWM_SOURCE_FRAME_SAMPLING_COVERAGE - DWM_SOURCE_FRAME_SAMPLING_LAST -) - -// Flags used by the DWM_THUMBNAIL_PROPERTIES structure to -// indicate which of its members contain valid information. -const ( - DWM_TNP_RECTDESTINATION = 0x00000001 // A value for the rcDestination member has been specified - DWM_TNP_RECTSOURCE = 0x00000002 // A value for the rcSource member has been specified - DWM_TNP_OPACITY = 0x00000004 // A value for the opacity member has been specified - DWM_TNP_VISIBLE = 0x00000008 // A value for the fVisible member has been specified - DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010 // A value for the fSourceClientAreaOnly member has been specified -) - -// enum-lite implementation for the following constant structure -type DWMFLIP3DWINDOWPOLICY int32 - -// TODO: need to verify this construction -// Flags used by the DwmSetWindowAttribute function -// to specify the Flip3D window policy -const ( - DWMFLIP3D_DEFAULT = iota + 1 - DWMFLIP3D_EXCLUDEBELOW - DWMFLIP3D_EXCLUDEABOVE - DWMFLIP3D_LAST -) - -// enum-lite implementation for the following constant structure -type DWMNCRENDERINGPOLICY int32 - -// TODO: need to verify this construction -// Flags used by the DwmSetWindowAttribute function -// to specify the non-client area rendering policy -const ( - DWMNCRP_USEWINDOWSTYLE = iota + 1 - DWMNCRP_DISABLED - DWMNCRP_ENABLED - DWMNCRP_LAST -) - -// enum-lite implementation for the following constant structure -type DWMTRANSITION_OWNEDWINDOW_TARGET int32 - -const ( - DWMTRANSITION_OWNEDWINDOW_NULL = -1 - DWMTRANSITION_OWNEDWINDOW_REPOSITION = 0 -) - -// enum-lite implementation for the following constant structure -type DWMWINDOWATTRIBUTE int32 - -// TODO: need to verify this construction -// Flags used by the DwmGetWindowAttribute and DwmSetWindowAttribute functions -// to specify window attributes for non-client rendering -const ( - DWMWA_NCRENDERING_ENABLED = iota + 1 - DWMWA_NCRENDERING_POLICY - DWMWA_TRANSITIONS_FORCEDISABLED - DWMWA_ALLOW_NCPAINT - DWMWA_CAPTION_BUTTON_BOUNDS - DWMWA_NONCLIENT_RTL_LAYOUT - DWMWA_FORCE_ICONIC_REPRESENTATION - DWMWA_FLIP3D_POLICY - DWMWA_EXTENDED_FRAME_BOUNDS - DWMWA_HAS_ICONIC_BITMAP - DWMWA_DISALLOW_PEEK - DWMWA_EXCLUDED_FROM_PEEK - DWMWA_CLOAK - DWMWA_CLOAKED - DWMWA_FREEZE_REPRESENTATION - DWMWA_LAST -) - -// enum-lite implementation for the following constant structure -type GESTURE_TYPE int32 - -// TODO: use iota? -// Identifies the gesture type -const ( - GT_PEN_TAP = 0 - GT_PEN_DOUBLETAP = 1 - GT_PEN_RIGHTTAP = 2 - GT_PEN_PRESSANDHOLD = 3 - GT_PEN_PRESSANDHOLDABORT = 4 - GT_TOUCH_TAP = 5 - GT_TOUCH_DOUBLETAP = 6 - GT_TOUCH_RIGHTTAP = 7 - GT_TOUCH_PRESSANDHOLD = 8 - GT_TOUCH_PRESSANDHOLDABORT = 9 - GT_TOUCH_PRESSANDTAP = 10 -) - -// Icons -const ( - ICON_SMALL = 0 - ICON_BIG = 1 - ICON_SMALL2 = 2 -) - -const ( - SIZE_RESTORED = 0 - SIZE_MINIMIZED = 1 - SIZE_MAXIMIZED = 2 - SIZE_MAXSHOW = 3 - SIZE_MAXHIDE = 4 -) - -// XButton values -const ( - XBUTTON1 = 1 - XBUTTON2 = 2 -) - -// Devmode -const ( - DM_SPECVERSION = 0x0401 - - DM_ORIENTATION = 0x00000001 - DM_PAPERSIZE = 0x00000002 - DM_PAPERLENGTH = 0x00000004 - DM_PAPERWIDTH = 0x00000008 - DM_SCALE = 0x00000010 - DM_POSITION = 0x00000020 - DM_NUP = 0x00000040 - DM_DISPLAYORIENTATION = 0x00000080 - DM_COPIES = 0x00000100 - DM_DEFAULTSOURCE = 0x00000200 - DM_PRINTQUALITY = 0x00000400 - DM_COLOR = 0x00000800 - DM_DUPLEX = 0x00001000 - DM_YRESOLUTION = 0x00002000 - DM_TTOPTION = 0x00004000 - DM_COLLATE = 0x00008000 - DM_FORMNAME = 0x00010000 - DM_LOGPIXELS = 0x00020000 - DM_BITSPERPEL = 0x00040000 - DM_PELSWIDTH = 0x00080000 - DM_PELSHEIGHT = 0x00100000 - DM_DISPLAYFLAGS = 0x00200000 - DM_DISPLAYFREQUENCY = 0x00400000 - DM_ICMMETHOD = 0x00800000 - DM_ICMINTENT = 0x01000000 - DM_MEDIATYPE = 0x02000000 - DM_DITHERTYPE = 0x04000000 - DM_PANNINGWIDTH = 0x08000000 - DM_PANNINGHEIGHT = 0x10000000 - DM_DISPLAYFIXEDOUTPUT = 0x20000000 -) - -// ChangeDisplaySettings -const ( - CDS_UPDATEREGISTRY = 0x00000001 - CDS_TEST = 0x00000002 - CDS_FULLSCREEN = 0x00000004 - CDS_GLOBAL = 0x00000008 - CDS_SET_PRIMARY = 0x00000010 - CDS_VIDEOPARAMETERS = 0x00000020 - CDS_RESET = 0x40000000 - CDS_NORESET = 0x10000000 - - DISP_CHANGE_SUCCESSFUL = 0 - DISP_CHANGE_RESTART = 1 - DISP_CHANGE_FAILED = -1 - DISP_CHANGE_BADMODE = -2 - DISP_CHANGE_NOTUPDATED = -3 - DISP_CHANGE_BADFLAGS = -4 - DISP_CHANGE_BADPARAM = -5 - DISP_CHANGE_BADDUALVIEW = -6 -) - -const ( - ENUM_CURRENT_SETTINGS = 0xFFFFFFFF - ENUM_REGISTRY_SETTINGS = 0xFFFFFFFE -) - -// PIXELFORMATDESCRIPTOR -const ( - PFD_TYPE_RGBA = 0 - PFD_TYPE_COLORINDEX = 1 - - PFD_MAIN_PLANE = 0 - PFD_OVERLAY_PLANE = 1 - PFD_UNDERLAY_PLANE = -1 - - PFD_DOUBLEBUFFER = 0x00000001 - PFD_STEREO = 0x00000002 - PFD_DRAW_TO_WINDOW = 0x00000004 - PFD_DRAW_TO_BITMAP = 0x00000008 - PFD_SUPPORT_GDI = 0x00000010 - PFD_SUPPORT_OPENGL = 0x00000020 - PFD_GENERIC_FORMAT = 0x00000040 - PFD_NEED_PALETTE = 0x00000080 - PFD_NEED_SYSTEM_PALETTE = 0x00000100 - PFD_SWAP_EXCHANGE = 0x00000200 - PFD_SWAP_COPY = 0x00000400 - PFD_SWAP_LAYER_BUFFERS = 0x00000800 - PFD_GENERIC_ACCELERATED = 0x00001000 - PFD_SUPPORT_DIRECTDRAW = 0x00002000 - PFD_DIRECT3D_ACCELERATED = 0x00004000 - PFD_SUPPORT_COMPOSITION = 0x00008000 - - PFD_DEPTH_DONTCARE = 0x20000000 - PFD_DOUBLEBUFFER_DONTCARE = 0x40000000 - PFD_STEREO_DONTCARE = 0x80000000 -) - -const ( - INPUT_MOUSE = 0 - INPUT_KEYBOARD = 1 - INPUT_HARDWARE = 2 -) - -const ( - MOUSEEVENTF_ABSOLUTE = 0x8000 - MOUSEEVENTF_HWHEEL = 0x01000 - MOUSEEVENTF_MOVE = 0x0001 - MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000 - MOUSEEVENTF_LEFTDOWN = 0x0002 - MOUSEEVENTF_LEFTUP = 0x0004 - MOUSEEVENTF_RIGHTDOWN = 0x0008 - MOUSEEVENTF_RIGHTUP = 0x0010 - MOUSEEVENTF_MIDDLEDOWN = 0x0020 - MOUSEEVENTF_MIDDLEUP = 0x0040 - MOUSEEVENTF_VIRTUALDESK = 0x4000 - MOUSEEVENTF_WHEEL = 0x0800 - MOUSEEVENTF_XDOWN = 0x0080 - MOUSEEVENTF_XUP = 0x0100 -) - -// Windows Hooks (WH_*) -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx -const ( - WH_CALLWNDPROC = 4 - WH_CALLWNDPROCRET = 12 - WH_CBT = 5 - WH_DEBUG = 9 - WH_FOREGROUNDIDLE = 11 - WH_GETMESSAGE = 3 - WH_JOURNALPLAYBACK = 1 - WH_JOURNALRECORD = 0 - WH_KEYBOARD = 2 - WH_KEYBOARD_LL = 13 - WH_MOUSE = 7 - WH_MOUSE_LL = 14 - WH_MSGFILTER = -1 - WH_SHELL = 10 - WH_SYSMSGFILTER = 6 -) - -const ( - MEM_COMMIT = 0x00001000 - MEM_RESERVE = 0x00002000 - MEM_RESET = 0x00080000 - MEM_RESET_UNDO = 0x1000000 - - MEM_LARGE_PAGES = 0x20000000 - MEM_PHYSICAL = 0x00400000 - MEM_TOP_DOWN = 0x00100000 - - MEM_DECOMMIT = 0x4000 - MEM_RELEASE = 0x8000 -) - -const ( - PROCESS_CREATE_PROCESS = 0x0080 - PROCESS_CREATE_THREAD = 0x0002 - PROCESS_DUP_HANDLE = 0x0040 - PROCESS_QUERY_INFORMATION = 0x0400 - PROCESS_QUERY_LIMITED_INFORMATION = 0x1000 - PROCESS_SET_INFORMATION = 0x0200 - PROCESS_SET_QUOTA = 0x0100 - PROCESS_SUSPEND_RESUME = 0x0800 - PROCESS_TERMINATE = 0x0001 - PROCESS_VM_OPERATION = 0x0008 - PROCESS_VM_READ = 0x0010 - PROCESS_VM_WRITE = 0x0020 - SYNCHRONIZE = 0x00100000 -) - -const ( - PAGE_EXECUTE = 0x10 - PAGE_EXECUTE_READ = 0x20 - PAGE_EXECUTE_READWRITE = 0x40 - PAGE_EXECUTE_WRITECOPY = 0x80 - PAGE_NOACCESS = 0x01 - PAGE_READWRITE = 0x04 - PAGE_WRITECOPY = 0x08 - PAGE_TARGETS_INVALID = 0x40000000 - PAGE_TARGETS_NO_UPDATE = 0x40000000 -) - -// SendMessageTimeout Flags -// https://msdn.microsoft.com/en-us/library/windows/desktop/ms644952(v=vs.85).aspx -const ( - SMTO_ABORTIFHUNG = 0x0002 - SMTO_BLOCK = 0x0001 - SMTO_NORMAL = 0x0000 - SMTO_NOTIMEOUTIFNOTHUNG = 0x0008 - SMTO_ERRORONEXIT = 0x0020 -) - -// RedrawWindow Flags -const ( - RDW_ERASE = 4 - RDW_ALLCHILDREN = 0x80 - RDW_ERASENOW = 0x200 - RDW_FRAME = 0x400 - RDW_INTERNALPAINT = 2 - RDW_INVALIDATE = 1 - RDW_NOCHILDREN = 0x40 - RDW_NOERASE = 0x20 - RDW_NOFRAME = 0x800 - RDW_NOINTERNALPAINT = 0x10 - RDW_UPDATENOW = 0x100 - RDW_VALIDATE = 8 -) diff --git a/packages/w32/create_process.go b/packages/w32/create_process.go deleted file mode 100644 index 9caf9ffc..00000000 --- a/packages/w32/create_process.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") - - procCreateProcessW = kernel32.NewProc("CreateProcessW") - procTerminateProcess = kernel32.NewProc("TerminateProcess") - procGetExitCodeProcess = kernel32.NewProc("GetExitCodeProcess") - procWaitForSingleObject = kernel32.NewProc("WaitForSingleObject") -) - -// WINBASEAPI WINBOOL WINAPI -// CreateProcessW ( -// LPCWSTR lpApplicationName, -// LPWSTR lpCommandLine, -// LPSECURITY_ATTRIBUTES lpProcessAttributes, -// LPSECURITY_ATTRIBUTES lpThreadAttributes -// WINBOOL bInheritHandles -// DWORD dwCreationFlags -// LPVOID lpEnvironment -// LPCWSTR lpCurrentDirectory -// LPSTARTUPINFOW lpStartupInfo -// LPPROCESS_INFORMATION lpProcessInformation -//); -func CreateProcessW( - lpApplicationName, lpCommandLine string, - lpProcessAttributes, lpThreadAttributes *SECURITY_ATTRIBUTES, - bInheritHandles BOOL, - dwCreationFlags uint32, - lpEnvironment unsafe.Pointer, - lpCurrentDirectory string, - lpStartupInfo *STARTUPINFOW, - lpProcessInformation *PROCESS_INFORMATION, -) (e error) { - - var lpAN, lpCL, lpCD *uint16 - if len(lpApplicationName) > 0 { - lpAN, e = syscall.UTF16PtrFromString(lpApplicationName) - if e != nil { - return - } - } - if len(lpCommandLine) > 0 { - lpCL, e = syscall.UTF16PtrFromString(lpCommandLine) - if e != nil { - return - } - } - if len(lpCurrentDirectory) > 0 { - lpCD, e = syscall.UTF16PtrFromString(lpCurrentDirectory) - if e != nil { - return - } - } - - ret, _, lastErr := procCreateProcessW.Call( - uintptr(unsafe.Pointer(lpAN)), - uintptr(unsafe.Pointer(lpCL)), - uintptr(unsafe.Pointer(lpProcessAttributes)), - uintptr(unsafe.Pointer(lpProcessInformation)), - uintptr(bInheritHandles), - uintptr(dwCreationFlags), - uintptr(lpEnvironment), - uintptr(unsafe.Pointer(lpCD)), - uintptr(unsafe.Pointer(lpStartupInfo)), - uintptr(unsafe.Pointer(lpProcessInformation)), - ) - - if ret == 0 { - e = lastErr - } - - return -} - -func CreateProcessQuick(cmd string) (pi PROCESS_INFORMATION, e error) { - si := &STARTUPINFOW{} - e = CreateProcessW( - "", - cmd, - nil, - nil, - 0, - 0, - unsafe.Pointer(nil), - "", - si, - &pi, - ) - return -} - -func TerminateProcess(hProcess HANDLE, exitCode uint32) (e error) { - ret, _, lastErr := procTerminateProcess.Call( - uintptr(hProcess), - uintptr(exitCode), - ) - - if ret == 0 { - e = lastErr - } - - return -} - -func GetExitCodeProcess(hProcess HANDLE) (code uintptr, e error) { - ret, _, lastErr := procGetExitCodeProcess.Call( - uintptr(hProcess), - uintptr(unsafe.Pointer(&code)), - ) - - if ret == 0 { - e = lastErr - } - - return -} - -// DWORD WINAPI WaitForSingleObject( -// _In_ HANDLE hHandle, -// _In_ DWORD dwMilliseconds -// ); - -func WaitForSingleObject(hHandle HANDLE, msecs uint32) (ok bool, e error) { - - ret, _, lastErr := procWaitForSingleObject.Call( - uintptr(hHandle), - uintptr(msecs), - ) - - if ret == WAIT_OBJECT_0 { - ok = true - return - } - - // don't set e for timeouts, or it will be ERROR_SUCCESS which is - // confusing - if ret != WAIT_TIMEOUT { - e = lastErr - } - return - -} diff --git a/packages/w32/create_process_constants.go b/packages/w32/create_process_constants.go deleted file mode 100644 index c37d7e5f..00000000 --- a/packages/w32/create_process_constants.go +++ /dev/null @@ -1,9 +0,0 @@ -package w32 - -const ( - WAIT_ABANDONED = 0x00000080 - WAIT_OBJECT_0 = 0x00000000 - WAIT_TIMEOUT = 0x00000102 - WAIT_FAILED = 0xFFFFFFFF - INFINITE = 0xFFFFFFFF -) diff --git a/packages/w32/create_process_typedef.go b/packages/w32/create_process_typedef.go deleted file mode 100644 index df059729..00000000 --- a/packages/w32/create_process_typedef.go +++ /dev/null @@ -1,68 +0,0 @@ -package w32 - -// typedef struct _PROCESS_INFORMATION { -// HANDLE hProcess; -// HANDLE hThread; -// DWORD dwProcessId; -// DWORD dwThreadId; -// } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION; - -type PROCESS_INFORMATION struct { - Process HANDLE - Thread HANDLE - ProcessId uint32 - ThreadId uint32 -} - -// typedef struct _STARTUPINFOW { -// DWORD cb; -// LPWSTR lpReserved; -// LPWSTR lpDesktop; -// LPWSTR lpTitle; -// DWORD dwX; -// DWORD dwY; -// DWORD dwXSize; -// DWORD dwYSize; -// DWORD dwXCountChars; -// DWORD dwYCountChars; -// DWORD dwFillAttribute; -// DWORD dwFlags; -// WORD wShowWindow; -// WORD cbReserved2; -// LPBYTE lpReserved2; -// HANDLE hStdInput; -// HANDLE hStdOutput; -// HANDLE hStdError; -// } STARTUPINFOW, *LPSTARTUPINFOW; - -type STARTUPINFOW struct { - cb uint32 - _ *uint16 - Desktop *uint16 - Title *uint16 - X uint32 - Y uint32 - XSize uint32 - YSize uint32 - XCountChars uint32 - YCountChars uint32 - FillAttribute uint32 - Flags uint32 - ShowWindow uint16 - _ uint16 - _ *uint8 - StdInput HANDLE - StdOutput HANDLE - StdError HANDLE -} - -// combase!_SECURITY_ATTRIBUTES -// +0x000 nLength : Uint4B -// +0x008 lpSecurityDescriptor : Ptr64 Void -// +0x010 bInheritHandle : Int4B - -type SECURITY_ATTRIBUTES struct { - Length uint32 - SecurityDescriptor uintptr - InheritHandle BOOL -} diff --git a/packages/w32/dwmapi.go b/packages/w32/dwmapi.go deleted file mode 100644 index eb656d18..00000000 --- a/packages/w32/dwmapi.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "fmt" - "syscall" - "unsafe" -) - -// DEFINED IN THE DWM API BUT NOT IMPLEMENTED BY MS: -// DwmAttachMilContent -// DwmDetachMilContent -// DwmEnableComposition -// DwmGetGraphicsStreamClient -// DwmGetGraphicsStreamTransformHint - -var ( - moddwmapi = syscall.NewLazyDLL("dwmapi.dll") - - procDwmDefWindowProc = moddwmapi.NewProc("DwmDefWindowProc") - procDwmEnableBlurBehindWindow = moddwmapi.NewProc("DwmEnableBlurBehindWindow") - procDwmEnableMMCSS = moddwmapi.NewProc("DwmEnableMMCSS") - procDwmExtendFrameIntoClientArea = moddwmapi.NewProc("DwmExtendFrameIntoClientArea") - procDwmFlush = moddwmapi.NewProc("DwmFlush") - procDwmGetColorizationColor = moddwmapi.NewProc("DwmGetColorizationColor") - procDwmGetCompositionTimingInfo = moddwmapi.NewProc("DwmGetCompositionTimingInfo") - procDwmGetTransportAttributes = moddwmapi.NewProc("DwmGetTransportAttributes") - procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") - procDwmInvalidateIconicBitmaps = moddwmapi.NewProc("DwmInvalidateIconicBitmaps") - procDwmIsCompositionEnabled = moddwmapi.NewProc("DwmIsCompositionEnabled") - procDwmModifyPreviousDxFrameDuration = moddwmapi.NewProc("DwmModifyPreviousDxFrameDuration") - procDwmQueryThumbnailSourceSize = moddwmapi.NewProc("DwmQueryThumbnailSourceSize") - procDwmRegisterThumbnail = moddwmapi.NewProc("DwmRegisterThumbnail") - procDwmRenderGesture = moddwmapi.NewProc("DwmRenderGesture") - procDwmSetDxFrameDuration = moddwmapi.NewProc("DwmSetDxFrameDuration") - procDwmSetIconicLivePreviewBitmap = moddwmapi.NewProc("DwmSetIconicLivePreviewBitmap") - procDwmSetIconicThumbnail = moddwmapi.NewProc("DwmSetIconicThumbnail") - procDwmSetPresentParameters = moddwmapi.NewProc("DwmSetPresentParameters") - procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") - procDwmShowContact = moddwmapi.NewProc("DwmShowContact") - procDwmTetherContact = moddwmapi.NewProc("DwmTetherContact") - procDwmTransitionOwnedWindow = moddwmapi.NewProc("DwmTransitionOwnedWindow") - procDwmUnregisterThumbnail = moddwmapi.NewProc("DwmUnregisterThumbnail") - procDwmUpdateThumbnailProperties = moddwmapi.NewProc("DwmUpdateThumbnailProperties") -) - -func DwmDefWindowProc(hWnd HWND, msg uint, wParam, lParam uintptr) (bool, uint) { - var result uint - ret, _, _ := procDwmDefWindowProc.Call( - uintptr(hWnd), - uintptr(msg), - wParam, - lParam, - uintptr(unsafe.Pointer(&result))) - return ret != 0, result -} - -func DwmEnableBlurBehindWindow(hWnd HWND, pBlurBehind *DWM_BLURBEHIND) HRESULT { - ret, _, _ := procDwmEnableBlurBehindWindow.Call( - uintptr(hWnd), - uintptr(unsafe.Pointer(pBlurBehind))) - return HRESULT(ret) -} - -func DwmEnableMMCSS(fEnableMMCSS bool) HRESULT { - ret, _, _ := procDwmEnableMMCSS.Call( - uintptr(BoolToBOOL(fEnableMMCSS))) - return HRESULT(ret) -} - -func DwmExtendFrameIntoClientArea(hWnd HWND, pMarInset *MARGINS) HRESULT { - ret, _, _ := procDwmExtendFrameIntoClientArea.Call( - uintptr(hWnd), - uintptr(unsafe.Pointer(pMarInset))) - return HRESULT(ret) -} - -func DwmFlush() HRESULT { - ret, _, _ := procDwmFlush.Call() - return HRESULT(ret) -} - -func DwmGetColorizationColor(pcrColorization *uint32, pfOpaqueBlend *BOOL) HRESULT { - ret, _, _ := procDwmGetColorizationColor.Call( - uintptr(unsafe.Pointer(pcrColorization)), - uintptr(unsafe.Pointer(pfOpaqueBlend))) - return HRESULT(ret) -} - -func DwmGetCompositionTimingInfo(hWnd HWND, pTimingInfo *DWM_TIMING_INFO) HRESULT { - ret, _, _ := procDwmGetCompositionTimingInfo.Call( - uintptr(hWnd), - uintptr(unsafe.Pointer(pTimingInfo))) - return HRESULT(ret) -} - -func DwmGetTransportAttributes(pfIsRemoting *BOOL, pfIsConnected *BOOL, pDwGeneration *uint32) HRESULT { - ret, _, _ := procDwmGetTransportAttributes.Call( - uintptr(unsafe.Pointer(pfIsRemoting)), - uintptr(unsafe.Pointer(pfIsConnected)), - uintptr(unsafe.Pointer(pDwGeneration))) - return HRESULT(ret) -} - -// TODO: verify handling of variable arguments -func DwmGetWindowAttribute(hWnd HWND, dwAttribute uint32) (pAttribute interface{}, result HRESULT) { - var pvAttribute, pvAttrSize uintptr - switch dwAttribute { - case DWMWA_NCRENDERING_ENABLED: - v := new(BOOL) - pAttribute = v - pvAttribute = uintptr(unsafe.Pointer(v)) - pvAttrSize = unsafe.Sizeof(*v) - case DWMWA_CAPTION_BUTTON_BOUNDS, DWMWA_EXTENDED_FRAME_BOUNDS: - v := new(RECT) - pAttribute = v - pvAttribute = uintptr(unsafe.Pointer(v)) - pvAttrSize = unsafe.Sizeof(*v) - case DWMWA_CLOAKED: - panic(fmt.Sprintf("DwmGetWindowAttribute(%d) is not currently supported.", dwAttribute)) - default: - panic(fmt.Sprintf("DwmGetWindowAttribute(%d) is not valid.", dwAttribute)) - } - - ret, _, _ := procDwmGetWindowAttribute.Call( - uintptr(hWnd), - uintptr(dwAttribute), - pvAttribute, - pvAttrSize) - result = HRESULT(ret) - return -} - -func DwmInvalidateIconicBitmaps(hWnd HWND) HRESULT { - ret, _, _ := procDwmInvalidateIconicBitmaps.Call( - uintptr(hWnd)) - return HRESULT(ret) -} - -func DwmIsCompositionEnabled(pfEnabled *BOOL) HRESULT { - ret, _, _ := procDwmIsCompositionEnabled.Call( - uintptr(unsafe.Pointer(pfEnabled))) - return HRESULT(ret) -} - -func DwmModifyPreviousDxFrameDuration(hWnd HWND, cRefreshes int, fRelative bool) HRESULT { - ret, _, _ := procDwmModifyPreviousDxFrameDuration.Call( - uintptr(hWnd), - uintptr(cRefreshes), - uintptr(BoolToBOOL(fRelative))) - return HRESULT(ret) -} - -func DwmQueryThumbnailSourceSize(hThumbnail HTHUMBNAIL, pSize *SIZE) HRESULT { - ret, _, _ := procDwmQueryThumbnailSourceSize.Call( - uintptr(hThumbnail), - uintptr(unsafe.Pointer(pSize))) - return HRESULT(ret) -} - -func DwmRegisterThumbnail(hWndDestination HWND, hWndSource HWND, phThumbnailId *HTHUMBNAIL) HRESULT { - ret, _, _ := procDwmRegisterThumbnail.Call( - uintptr(hWndDestination), - uintptr(hWndSource), - uintptr(unsafe.Pointer(phThumbnailId))) - return HRESULT(ret) -} - -func DwmRenderGesture(gt GESTURE_TYPE, cContacts uint, pdwPointerID *uint32, pPoints *POINT) { - procDwmRenderGesture.Call( - uintptr(gt), - uintptr(cContacts), - uintptr(unsafe.Pointer(pdwPointerID)), - uintptr(unsafe.Pointer(pPoints))) - return -} - -func DwmSetDxFrameDuration(hWnd HWND, cRefreshes int) HRESULT { - ret, _, _ := procDwmSetDxFrameDuration.Call( - uintptr(hWnd), - uintptr(cRefreshes)) - return HRESULT(ret) -} - -func DwmSetIconicLivePreviewBitmap(hWnd HWND, hbmp HBITMAP, pptClient *POINT, dwSITFlags uint32) HRESULT { - ret, _, _ := procDwmSetIconicLivePreviewBitmap.Call( - uintptr(hWnd), - uintptr(hbmp), - uintptr(unsafe.Pointer(pptClient)), - uintptr(dwSITFlags)) - return HRESULT(ret) -} - -func DwmSetIconicThumbnail(hWnd HWND, hbmp HBITMAP, dwSITFlags uint32) HRESULT { - ret, _, _ := procDwmSetIconicThumbnail.Call( - uintptr(hWnd), - uintptr(hbmp), - uintptr(dwSITFlags)) - return HRESULT(ret) -} - -func DwmSetPresentParameters(hWnd HWND, pPresentParams *DWM_PRESENT_PARAMETERS) HRESULT { - ret, _, _ := procDwmSetPresentParameters.Call( - uintptr(hWnd), - uintptr(unsafe.Pointer(pPresentParams))) - return HRESULT(ret) -} - -func DwmSetWindowAttribute(hWnd HWND, dwAttribute uint32, pvAttribute LPCVOID, cbAttribute uint32) HRESULT { - ret, _, _ := procDwmSetWindowAttribute.Call( - uintptr(hWnd), - uintptr(dwAttribute), - uintptr(pvAttribute), - uintptr(cbAttribute)) - return HRESULT(ret) -} - -func DwmShowContact(dwPointerID uint32, eShowContact DWM_SHOWCONTACT) { - procDwmShowContact.Call( - uintptr(dwPointerID), - uintptr(eShowContact)) - return -} - -func DwmTetherContact(dwPointerID uint32, fEnable bool, ptTether POINT) { - procDwmTetherContact.Call( - uintptr(dwPointerID), - uintptr(BoolToBOOL(fEnable)), - uintptr(unsafe.Pointer(&ptTether))) - return -} - -func DwmTransitionOwnedWindow(hWnd HWND, target DWMTRANSITION_OWNEDWINDOW_TARGET) { - procDwmTransitionOwnedWindow.Call( - uintptr(hWnd), - uintptr(target)) - return -} - -func DwmUnregisterThumbnail(hThumbnailId HTHUMBNAIL) HRESULT { - ret, _, _ := procDwmUnregisterThumbnail.Call( - uintptr(hThumbnailId)) - return HRESULT(ret) -} - -func DwmUpdateThumbnailProperties(hThumbnailId HTHUMBNAIL, ptnProperties *DWM_THUMBNAIL_PROPERTIES) HRESULT { - ret, _, _ := procDwmUpdateThumbnailProperties.Call( - uintptr(hThumbnailId), - uintptr(unsafe.Pointer(ptnProperties))) - return HRESULT(ret) -} diff --git a/packages/w32/fork.go b/packages/w32/fork.go deleted file mode 100644 index b5543b95..00000000 --- a/packages/w32/fork.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -// #include -//import ( -// "C" -//) - -// Based on C code found here https://gist.github.com/juntalis/4366916 -// Original code license: -/* - * fork.c - * Experimental fork() on Windows. Requires NT 6 subsystem or - * newer. - * - * Copyright (c) 2012 William Pitcock - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * This software is provided 'as is' and without any warranty, express or - * implied. In no event shall the authors be liable for any damages arising - * from the use of this software. - */ - -import ( - "fmt" - "syscall" - "unsafe" -) - -var ( - ntdll = syscall.NewLazyDLL("ntdll.dll") - - procRtlCloneUserProcess = ntdll.NewProc("RtlCloneUserProcess") - procAllocConsole = modkernel32.NewProc("AllocConsole") - procOpenProcess = modkernel32.NewProc("OpenProcess") - procOpenThread = modkernel32.NewProc("OpenThread") - procResumeThread = modkernel32.NewProc("ResumeThread") -) - -func OpenProcess(desiredAccess int, inheritHandle bool, processId uintptr) (h HANDLE, e error) { - inherit := uintptr(0) - if inheritHandle { - inherit = 1 - } - - ret, _, lastErr := procOpenProcess.Call( - uintptr(desiredAccess), - inherit, - uintptr(processId), - ) - - if ret == 0 { - e = lastErr - } - - h = HANDLE(ret) - return -} - -func OpenThread(desiredAccess int, inheritHandle bool, threadId uintptr) (h HANDLE, e error) { - inherit := uintptr(0) - if inheritHandle { - inherit = 1 - } - - ret, _, lastErr := procOpenThread.Call( - uintptr(desiredAccess), - inherit, - uintptr(threadId), - ) - - if ret == 0 { - e = lastErr - } - - h = HANDLE(ret) - return -} - -// DWORD WINAPI ResumeThread( -// _In_ HANDLE hThread -// ); -func ResumeThread(ht HANDLE) (e error) { - - ret, _, lastErr := procResumeThread.Call( - uintptr(ht), - ) - if ret == ^uintptr(0) { // -1 - e = lastErr - } - return -} - -// BOOL WINAPI AllocConsole(void); -func AllocConsole() (e error) { - ret, _, lastErr := procAllocConsole.Call() - if ret != ERROR_SUCCESS { - e = lastErr - } - return -} - -// NTSYSAPI -// NTSTATUS -// NTAPI RtlCloneUserProcess ( -// _In_ ULONG ProcessFlags, -// _In_opt_ PSECURITY_DESCRIPTOR ProcessSecurityDescriptor, -// _In_opt_ PSECURITY_DESCRIPTOR ThreadSecurityDescriptor, -// _In_opt_ HANDLE DebugPort, -// _Out_ PRTL_USER_PROCESS_INFORMATION ProcessInformation -// ) - -func RtlCloneUserProcess( - ProcessFlags uint32, - ProcessSecurityDescriptor, ThreadSecurityDescriptor *SECURITY_DESCRIPTOR, // in advapi32_typedef.go - DebugPort HANDLE, - ProcessInformation *RTL_USER_PROCESS_INFORMATION, -) (status uintptr) { - - status, _, _ = procRtlCloneUserProcess.Call( - uintptr(ProcessFlags), - uintptr(unsafe.Pointer(ProcessSecurityDescriptor)), - uintptr(unsafe.Pointer(ThreadSecurityDescriptor)), - uintptr(DebugPort), - uintptr(unsafe.Pointer(ProcessInformation)), - ) - - return -} - -// Fork creates a clone of the current process using the undocumented -// RtlCloneUserProcess call in ntdll, similar to unix fork(). The -// return value in the parent is the child PID. In the child it is 0. -func Fork() (pid uintptr, e error) { - - pi := &RTL_USER_PROCESS_INFORMATION{} - - ret := RtlCloneUserProcess( - RTL_CLONE_PROCESS_FLAGS_CREATE_SUSPENDED|RTL_CLONE_PROCESS_FLAGS_INHERIT_HANDLES, - nil, - nil, - HANDLE(0), - pi, - ) - - switch ret { - case RTL_CLONE_PARENT: - pid = pi.ClientId.UniqueProcess - ht, err := OpenThread(THREAD_ALL_ACCESS, false, pi.ClientId.UniqueThread) - if err != nil { - e = fmt.Errorf("OpenThread: %s", err) - } - err = ResumeThread(ht) - if err != nil { - e = fmt.Errorf("ResumeThread: %s", err) - } - CloseHandle(ht) - case RTL_CLONE_CHILD: - pid = 0 - err := AllocConsole() - if err != nil { - e = fmt.Errorf("AllocConsole: %s", err) - } - default: - e = fmt.Errorf("0x%x", ret) - } - return -} diff --git a/packages/w32/fork_constants.go b/packages/w32/fork_constants.go deleted file mode 100644 index 3e9b217c..00000000 --- a/packages/w32/fork_constants.go +++ /dev/null @@ -1,26 +0,0 @@ -package w32 - -const ( - RTL_CLONE_PROCESS_FLAGS_CREATE_SUSPENDED = 0x00000001 - RTL_CLONE_PROCESS_FLAGS_INHERIT_HANDLES = 0x00000002 - RTL_CLONE_PROCESS_FLAGS_NO_SYNCHRONIZE = 0x00000004 - - RTL_CLONE_PARENT = 0 - RTL_CLONE_CHILD = 297 - - THREAD_TERMINATE = 0x0001 - THREAD_SUSPEND_RESUME = 0x0002 - THREAD_GET_CONTEXT = 0x0008 - THREAD_SET_CONTEXT = 0x0010 - THREAD_SET_INFORMATION = 0x0020 - THREAD_QUERY_INFORMATION = 0x0040 - THREAD_SET_THREAD_TOKEN = 0x0080 - THREAD_IMPERSONATE = 0x0100 - THREAD_DIRECT_IMPERSONATION = 0x0200 - THREAD_SET_LIMITED_INFORMATION = 0x0400 - THREAD_QUERY_LIMITED_INFORMATION = 0x0800 - THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xffff - - PROCESS_SET_SESSIONID = 0x0004 - PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xffff -) diff --git a/packages/w32/fork_typedef.go b/packages/w32/fork_typedef.go deleted file mode 100644 index fcb90497..00000000 --- a/packages/w32/fork_typedef.go +++ /dev/null @@ -1,89 +0,0 @@ -package w32 - -// combase!_SECTION_IMAGE_INFORMATION -// +0x000 TransferAddress : Ptr64 Void -// +0x008 ZeroBits : Uint4B -// +0x010 MaximumStackSize : Uint8B -// +0x018 CommittedStackSize : Uint8B -// +0x020 SubSystemType : Uint4B -// +0x024 SubSystemMinorVersion : Uint2B -// +0x026 SubSystemMajorVersion : Uint2B -// +0x024 SubSystemVersion : Uint4B -// +0x028 MajorOperatingSystemVersion : Uint2B -// +0x02a MinorOperatingSystemVersion : Uint2B -// +0x028 OperatingSystemVersion : Uint4B -// +0x02c ImageCharacteristics : Uint2B -// +0x02e DllCharacteristics : Uint2B -// +0x030 Machine : Uint2B -// +0x032 ImageContainsCode : UChar -// +0x033 ImageFlags : UChar -// +0x033 ComPlusNativeReady : Pos 0, 1 Bit -// +0x033 ComPlusILOnly : Pos 1, 1 Bit -// +0x033 ImageDynamicallyRelocated : Pos 2, 1 Bit -// +0x033 ImageMappedFlat : Pos 3, 1 Bit -// +0x033 BaseBelow4gb : Pos 4, 1 Bit -// +0x033 ComPlusPrefer32bit : Pos 5, 1 Bit -// +0x033 Reserved : Pos 6, 2 Bits -// +0x034 LoaderFlags : Uint4B -// +0x038 ImageFileSize : Uint4B -// +0x03c CheckSum : Uint4B -type SECTION_IMAGE_INFORMATION struct { - TransferAddress uintptr - ZeroBits uint32 - MaximumStackSize uint64 - CommittedStackSize uint64 - SubSystemType uint32 - SubSystemMinorVersion uint16 - SubSystemMajorVersion uint16 - SubSystemVersion uint32 - MajorOperatingSystemVersion uint16 - MinorOperatingSystemVersion uint16 - OperatingSystemVersion uint32 - ImageCharacteristics uint16 - DllCharacteristics uint16 - Machine uint16 - ImageContainsCode uint8 - ImageFlags uint8 - ComPlusFlags uint8 - LoaderFlags uint32 - ImageFileSize uint32 - CheckSum uint32 -} - -func (si *SECTION_IMAGE_INFORMATION) ComPlusNativeReady() bool { - return (si.ComPlusFlags & (1 << 0)) == 1 -} - -func (si *SECTION_IMAGE_INFORMATION) ComPlusILOnly() bool { - return (si.ComPlusFlags & (1 << 1)) == 1 -} - -func (si *SECTION_IMAGE_INFORMATION) ImageDynamicallyRelocated() bool { - return (si.ComPlusFlags & (1 << 2)) == 1 -} - -func (si *SECTION_IMAGE_INFORMATION) ImageMappedFlat() bool { - return (si.ComPlusFlags & (1 << 3)) == 1 -} - -func (si *SECTION_IMAGE_INFORMATION) BaseBelow4gb() bool { - return (si.ComPlusFlags & (1 << 4)) == 1 -} - -func (si *SECTION_IMAGE_INFORMATION) ComPlusPrefer32bit() bool { - return (si.ComPlusFlags & (1 << 5)) == 1 -} - -// combase!_RTL_USER_PROCESS_INFORMATION -// +0x000 Length : Uint4B -// +0x008 Process : Ptr64 Void -// +0x010 Thread : Ptr64 Void -// +0x018 ClientId : _CLIENT_ID -// +0x028 ImageInformation : _SECTION_IMAGE_INFORMATION -type RTL_USER_PROCESS_INFORMATION struct { - Length uint32 - Process HANDLE - Thread HANDLE - ClientId CLIENT_ID - ImageInformation SECTION_IMAGE_INFORMATION -} diff --git a/packages/w32/gdi32.go b/packages/w32/gdi32.go deleted file mode 100644 index 39a81d6b..00000000 --- a/packages/w32/gdi32.go +++ /dev/null @@ -1,543 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modgdi32 = syscall.NewLazyDLL("gdi32.dll") - - procGetDeviceCaps = modgdi32.NewProc("GetDeviceCaps") - procGetCurrentObject = modgdi32.NewProc("GetCurrentObject") - procDeleteObject = modgdi32.NewProc("DeleteObject") - procCreateFontIndirect = modgdi32.NewProc("CreateFontIndirectW") - procAbortDoc = modgdi32.NewProc("AbortDoc") - procBitBlt = modgdi32.NewProc("BitBlt") - procPatBlt = modgdi32.NewProc("PatBlt") - procCloseEnhMetaFile = modgdi32.NewProc("CloseEnhMetaFile") - procCopyEnhMetaFile = modgdi32.NewProc("CopyEnhMetaFileW") - procCreateBrushIndirect = modgdi32.NewProc("CreateBrushIndirect") - procCreateCompatibleDC = modgdi32.NewProc("CreateCompatibleDC") - procCreateDC = modgdi32.NewProc("CreateDCW") - procCreateCompatibleBitmap = modgdi32.NewProc("CreateCompatibleBitmap") - procCreateDIBSection = modgdi32.NewProc("CreateDIBSection") - procCreateEnhMetaFile = modgdi32.NewProc("CreateEnhMetaFileW") - procCreateIC = modgdi32.NewProc("CreateICW") - procDeleteDC = modgdi32.NewProc("DeleteDC") - procDeleteEnhMetaFile = modgdi32.NewProc("DeleteEnhMetaFile") - procEllipse = modgdi32.NewProc("Ellipse") - procEndDoc = modgdi32.NewProc("EndDoc") - procEndPage = modgdi32.NewProc("EndPage") - procExtCreatePen = modgdi32.NewProc("ExtCreatePen") - procGetEnhMetaFile = modgdi32.NewProc("GetEnhMetaFileW") - procGetEnhMetaFileHeader = modgdi32.NewProc("GetEnhMetaFileHeader") - procGetObject = modgdi32.NewProc("GetObjectW") - procGetStockObject = modgdi32.NewProc("GetStockObject") - procGetTextExtentExPoint = modgdi32.NewProc("GetTextExtentExPointW") - procGetTextExtentPoint32 = modgdi32.NewProc("GetTextExtentPoint32W") - procGetTextMetrics = modgdi32.NewProc("GetTextMetricsW") - procLineTo = modgdi32.NewProc("LineTo") - procMoveToEx = modgdi32.NewProc("MoveToEx") - procPlayEnhMetaFile = modgdi32.NewProc("PlayEnhMetaFile") - procRectangle = modgdi32.NewProc("Rectangle") - procResetDC = modgdi32.NewProc("ResetDCW") - procSelectObject = modgdi32.NewProc("SelectObject") - procSetBkMode = modgdi32.NewProc("SetBkMode") - procSetBrushOrgEx = modgdi32.NewProc("SetBrushOrgEx") - procSetStretchBltMode = modgdi32.NewProc("SetStretchBltMode") - procSetTextColor = modgdi32.NewProc("SetTextColor") - procSetBkColor = modgdi32.NewProc("SetBkColor") - procStartDoc = modgdi32.NewProc("StartDocW") - procStartPage = modgdi32.NewProc("StartPage") - procStretchBlt = modgdi32.NewProc("StretchBlt") - procSetDIBitsToDevice = modgdi32.NewProc("SetDIBitsToDevice") - procChoosePixelFormat = modgdi32.NewProc("ChoosePixelFormat") - procDescribePixelFormat = modgdi32.NewProc("DescribePixelFormat") - procGetEnhMetaFilePixelFormat = modgdi32.NewProc("GetEnhMetaFilePixelFormat") - procGetPixelFormat = modgdi32.NewProc("GetPixelFormat") - procSetPixelFormat = modgdi32.NewProc("SetPixelFormat") - procSwapBuffers = modgdi32.NewProc("SwapBuffers") -) - -func GetDeviceCaps(hdc HDC, index int) int { - ret, _, _ := procGetDeviceCaps.Call( - uintptr(hdc), - uintptr(index)) - - return int(ret) -} - -func GetCurrentObject(hdc HDC, uObjectType uint32) HGDIOBJ { - ret, _, _ := procGetCurrentObject.Call( - uintptr(hdc), - uintptr(uObjectType)) - - return HGDIOBJ(ret) -} - -func DeleteObject(hObject HGDIOBJ) bool { - ret, _, _ := procDeleteObject.Call( - uintptr(hObject)) - - return ret != 0 -} - -func CreateFontIndirect(logFont *LOGFONT) HFONT { - ret, _, _ := procCreateFontIndirect.Call( - uintptr(unsafe.Pointer(logFont))) - - return HFONT(ret) -} - -func AbortDoc(hdc HDC) int { - ret, _, _ := procAbortDoc.Call( - uintptr(hdc)) - - return int(ret) -} - -func BitBlt(hdcDest HDC, nXDest, nYDest, nWidth, nHeight int, hdcSrc HDC, nXSrc, nYSrc int, dwRop uint) { - ret, _, _ := procBitBlt.Call( - uintptr(hdcDest), - uintptr(nXDest), - uintptr(nYDest), - uintptr(nWidth), - uintptr(nHeight), - uintptr(hdcSrc), - uintptr(nXSrc), - uintptr(nYSrc), - uintptr(dwRop)) - - if ret == 0 { - panic("BitBlt failed") - } -} - -func PatBlt(hdc HDC, nXLeft, nYLeft, nWidth, nHeight int, dwRop uint) { - ret, _, _ := procPatBlt.Call( - uintptr(hdc), - uintptr(nXLeft), - uintptr(nYLeft), - uintptr(nWidth), - uintptr(nHeight), - uintptr(dwRop)) - - if ret == 0 { - panic("PatBlt failed") - } -} - -func CloseEnhMetaFile(hdc HDC) HENHMETAFILE { - ret, _, _ := procCloseEnhMetaFile.Call( - uintptr(hdc)) - - return HENHMETAFILE(ret) -} - -func CopyEnhMetaFile(hemfSrc HENHMETAFILE, lpszFile *uint16) HENHMETAFILE { - ret, _, _ := procCopyEnhMetaFile.Call( - uintptr(hemfSrc), - uintptr(unsafe.Pointer(lpszFile))) - - return HENHMETAFILE(ret) -} - -func CreateBrushIndirect(lplb *LOGBRUSH) HBRUSH { - ret, _, _ := procCreateBrushIndirect.Call( - uintptr(unsafe.Pointer(lplb))) - - return HBRUSH(ret) -} - -func CreateCompatibleDC(hdc HDC) HDC { - ret, _, _ := procCreateCompatibleDC.Call( - uintptr(hdc)) - - if ret == 0 { - panic("Create compatible DC failed") - } - - return HDC(ret) -} - -func CreateDC(lpszDriver, lpszDevice, lpszOutput *uint16, lpInitData *DEVMODE) HDC { - ret, _, _ := procCreateDC.Call( - uintptr(unsafe.Pointer(lpszDriver)), - uintptr(unsafe.Pointer(lpszDevice)), - uintptr(unsafe.Pointer(lpszOutput)), - uintptr(unsafe.Pointer(lpInitData))) - - return HDC(ret) -} - -func CreateCompatibleBitmap(hdc HDC, width, height uint) HBITMAP { - ret, _, _ := procCreateCompatibleBitmap.Call( - uintptr(hdc), - uintptr(width), - uintptr(height)) - - return HBITMAP(ret) -} - -func CreateDIBSection(hdc HDC, pbmi *BITMAPINFO, iUsage uint, ppvBits *unsafe.Pointer, hSection HANDLE, dwOffset uint) HBITMAP { - ret, _, _ := procCreateDIBSection.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(pbmi)), - uintptr(iUsage), - uintptr(unsafe.Pointer(ppvBits)), - uintptr(hSection), - uintptr(dwOffset)) - - return HBITMAP(ret) -} - -func CreateEnhMetaFile(hdcRef HDC, lpFilename *uint16, lpRect *RECT, lpDescription *uint16) HDC { - ret, _, _ := procCreateEnhMetaFile.Call( - uintptr(hdcRef), - uintptr(unsafe.Pointer(lpFilename)), - uintptr(unsafe.Pointer(lpRect)), - uintptr(unsafe.Pointer(lpDescription))) - - return HDC(ret) -} - -func CreateIC(lpszDriver, lpszDevice, lpszOutput *uint16, lpdvmInit *DEVMODE) HDC { - ret, _, _ := procCreateIC.Call( - uintptr(unsafe.Pointer(lpszDriver)), - uintptr(unsafe.Pointer(lpszDevice)), - uintptr(unsafe.Pointer(lpszOutput)), - uintptr(unsafe.Pointer(lpdvmInit))) - - return HDC(ret) -} - -func DeleteDC(hdc HDC) bool { - ret, _, _ := procDeleteDC.Call( - uintptr(hdc)) - - return ret != 0 -} - -func DeleteEnhMetaFile(hemf HENHMETAFILE) bool { - ret, _, _ := procDeleteEnhMetaFile.Call( - uintptr(hemf)) - - return ret != 0 -} - -func Ellipse(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int) bool { - ret, _, _ := procEllipse.Call( - uintptr(hdc), - uintptr(nLeftRect), - uintptr(nTopRect), - uintptr(nRightRect), - uintptr(nBottomRect)) - - return ret != 0 -} - -func EndDoc(hdc HDC) int { - ret, _, _ := procEndDoc.Call( - uintptr(hdc)) - - return int(ret) -} - -func EndPage(hdc HDC) int { - ret, _, _ := procEndPage.Call( - uintptr(hdc)) - - return int(ret) -} - -func ExtCreatePen(dwPenStyle, dwWidth uint, lplb *LOGBRUSH, dwStyleCount uint, lpStyle *uint) HPEN { - ret, _, _ := procExtCreatePen.Call( - uintptr(dwPenStyle), - uintptr(dwWidth), - uintptr(unsafe.Pointer(lplb)), - uintptr(dwStyleCount), - uintptr(unsafe.Pointer(lpStyle))) - - return HPEN(ret) -} - -func GetEnhMetaFile(lpszMetaFile *uint16) HENHMETAFILE { - ret, _, _ := procGetEnhMetaFile.Call( - uintptr(unsafe.Pointer(lpszMetaFile))) - - return HENHMETAFILE(ret) -} - -func GetEnhMetaFileHeader(hemf HENHMETAFILE, cbBuffer uint, lpemh *ENHMETAHEADER) uint { - ret, _, _ := procGetEnhMetaFileHeader.Call( - uintptr(hemf), - uintptr(cbBuffer), - uintptr(unsafe.Pointer(lpemh))) - - return uint(ret) -} - -func GetObject(hgdiobj HGDIOBJ, cbBuffer uintptr, lpvObject unsafe.Pointer) int { - ret, _, _ := procGetObject.Call( - uintptr(hgdiobj), - uintptr(cbBuffer), - uintptr(lpvObject)) - - return int(ret) -} - -func GetStockObject(fnObject int) HGDIOBJ { - ret, _, _ := procGetStockObject.Call( - uintptr(fnObject)) - - return HGDIOBJ(ret) -} - -func GetTextExtentExPoint(hdc HDC, lpszStr *uint16, cchString, nMaxExtent int, lpnFit, alpDx *int, lpSize *SIZE) bool { - ret, _, _ := procGetTextExtentExPoint.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(lpszStr)), - uintptr(cchString), - uintptr(nMaxExtent), - uintptr(unsafe.Pointer(lpnFit)), - uintptr(unsafe.Pointer(alpDx)), - uintptr(unsafe.Pointer(lpSize))) - - return ret != 0 -} - -func GetTextExtentPoint32(hdc HDC, lpString *uint16, c int, lpSize *SIZE) bool { - ret, _, _ := procGetTextExtentPoint32.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(lpString)), - uintptr(c), - uintptr(unsafe.Pointer(lpSize))) - - return ret != 0 -} - -func GetTextMetrics(hdc HDC, lptm *TEXTMETRIC) bool { - ret, _, _ := procGetTextMetrics.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(lptm))) - - return ret != 0 -} - -func LineTo(hdc HDC, nXEnd, nYEnd int) bool { - ret, _, _ := procLineTo.Call( - uintptr(hdc), - uintptr(nXEnd), - uintptr(nYEnd)) - - return ret != 0 -} - -func MoveToEx(hdc HDC, x, y int, lpPoint *POINT) bool { - ret, _, _ := procMoveToEx.Call( - uintptr(hdc), - uintptr(x), - uintptr(y), - uintptr(unsafe.Pointer(lpPoint))) - - return ret != 0 -} - -func PlayEnhMetaFile(hdc HDC, hemf HENHMETAFILE, lpRect *RECT) bool { - ret, _, _ := procPlayEnhMetaFile.Call( - uintptr(hdc), - uintptr(hemf), - uintptr(unsafe.Pointer(lpRect))) - - return ret != 0 -} - -func Rectangle(hdc HDC, nLeftRect, nTopRect, nRightRect, nBottomRect int) bool { - ret, _, _ := procRectangle.Call( - uintptr(hdc), - uintptr(nLeftRect), - uintptr(nTopRect), - uintptr(nRightRect), - uintptr(nBottomRect)) - - return ret != 0 -} - -func ResetDC(hdc HDC, lpInitData *DEVMODE) HDC { - ret, _, _ := procResetDC.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(lpInitData))) - - return HDC(ret) -} - -func SelectObject(hdc HDC, hgdiobj HGDIOBJ) HGDIOBJ { - ret, _, _ := procSelectObject.Call( - uintptr(hdc), - uintptr(hgdiobj)) - - if ret == 0 { - panic("SelectObject failed") - } - - return HGDIOBJ(ret) -} - -func SetBkMode(hdc HDC, iBkMode int) int { - ret, _, _ := procSetBkMode.Call( - uintptr(hdc), - uintptr(iBkMode)) - - if ret == 0 { - panic("SetBkMode failed") - } - - return int(ret) -} - -func SetBrushOrgEx(hdc HDC, nXOrg, nYOrg int, lppt *POINT) bool { - ret, _, _ := procSetBrushOrgEx.Call( - uintptr(hdc), - uintptr(nXOrg), - uintptr(nYOrg), - uintptr(unsafe.Pointer(lppt))) - - return ret != 0 -} - -func SetStretchBltMode(hdc HDC, iStretchMode int) int { - ret, _, _ := procSetStretchBltMode.Call( - uintptr(hdc), - uintptr(iStretchMode)) - - return int(ret) -} - -func SetTextColor(hdc HDC, crColor COLORREF) COLORREF { - ret, _, _ := procSetTextColor.Call( - uintptr(hdc), - uintptr(crColor)) - - if ret == CLR_INVALID { - panic("SetTextColor failed") - } - - return COLORREF(ret) -} - -func SetBkColor(hdc HDC, crColor COLORREF) COLORREF { - ret, _, _ := procSetBkColor.Call( - uintptr(hdc), - uintptr(crColor)) - - if ret == CLR_INVALID { - panic("SetBkColor failed") - } - - return COLORREF(ret) -} - -func StartDoc(hdc HDC, lpdi *DOCINFO) int { - ret, _, _ := procStartDoc.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(lpdi))) - - return int(ret) -} - -func StartPage(hdc HDC) int { - ret, _, _ := procStartPage.Call( - uintptr(hdc)) - - return int(ret) -} - -func StretchBlt(hdcDest HDC, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest int, hdcSrc HDC, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc int, dwRop uint) { - ret, _, _ := procStretchBlt.Call( - uintptr(hdcDest), - uintptr(nXOriginDest), - uintptr(nYOriginDest), - uintptr(nWidthDest), - uintptr(nHeightDest), - uintptr(hdcSrc), - uintptr(nXOriginSrc), - uintptr(nYOriginSrc), - uintptr(nWidthSrc), - uintptr(nHeightSrc), - uintptr(dwRop)) - - if ret == 0 { - panic("StretchBlt failed") - } -} - -func SetDIBitsToDevice(hdc HDC, xDest, yDest, dwWidth, dwHeight, xSrc, ySrc int, uStartScan, cScanLines uint, lpvBits []byte, lpbmi *BITMAPINFO, fuColorUse uint) int { - ret, _, _ := procSetDIBitsToDevice.Call( - uintptr(hdc), - uintptr(xDest), - uintptr(yDest), - uintptr(dwWidth), - uintptr(dwHeight), - uintptr(xSrc), - uintptr(ySrc), - uintptr(uStartScan), - uintptr(cScanLines), - uintptr(unsafe.Pointer(&lpvBits[0])), - uintptr(unsafe.Pointer(lpbmi)), - uintptr(fuColorUse)) - - return int(ret) -} - -func ChoosePixelFormat(hdc HDC, pfd *PIXELFORMATDESCRIPTOR) int { - ret, _, _ := procChoosePixelFormat.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(pfd)), - ) - return int(ret) -} - -func DescribePixelFormat(hdc HDC, iPixelFormat int, nBytes uint, pfd *PIXELFORMATDESCRIPTOR) int { - ret, _, _ := procDescribePixelFormat.Call( - uintptr(hdc), - uintptr(iPixelFormat), - uintptr(nBytes), - uintptr(unsafe.Pointer(pfd)), - ) - return int(ret) -} - -func GetEnhMetaFilePixelFormat(hemf HENHMETAFILE, cbBuffer uint32, pfd *PIXELFORMATDESCRIPTOR) uint { - ret, _, _ := procGetEnhMetaFilePixelFormat.Call( - uintptr(hemf), - uintptr(cbBuffer), - uintptr(unsafe.Pointer(pfd)), - ) - return uint(ret) -} - -func GetPixelFormat(hdc HDC) int { - ret, _, _ := procGetPixelFormat.Call( - uintptr(hdc), - ) - return int(ret) -} - -func SetPixelFormat(hdc HDC, iPixelFormat int, pfd *PIXELFORMATDESCRIPTOR) bool { - ret, _, _ := procSetPixelFormat.Call( - uintptr(hdc), - uintptr(iPixelFormat), - uintptr(unsafe.Pointer(pfd)), - ) - return ret == TRUE -} - -func SwapBuffers(hdc HDC) bool { - ret, _, _ := procSwapBuffers.Call(uintptr(hdc)) - return ret == TRUE -} diff --git a/packages/w32/gdiplus.go b/packages/w32/gdiplus.go deleted file mode 100644 index f3a8fca4..00000000 --- a/packages/w32/gdiplus.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "errors" - "fmt" - "syscall" - "unsafe" -) - -const ( - Ok = 0 - GenericError = 1 - InvalidParameter = 2 - OutOfMemory = 3 - ObjectBusy = 4 - InsufficientBuffer = 5 - NotImplemented = 6 - Win32Error = 7 - WrongState = 8 - Aborted = 9 - FileNotFound = 10 - ValueOverflow = 11 - AccessDenied = 12 - UnknownImageFormat = 13 - FontFamilyNotFound = 14 - FontStyleNotFound = 15 - NotTrueTypeFont = 16 - UnsupportedGdiplusVersion = 17 - GdiplusNotInitialized = 18 - PropertyNotFound = 19 - PropertyNotSupported = 20 - ProfileNotFound = 21 -) - -func GetGpStatus(s int32) string { - switch s { - case Ok: - return "Ok" - case GenericError: - return "GenericError" - case InvalidParameter: - return "InvalidParameter" - case OutOfMemory: - return "OutOfMemory" - case ObjectBusy: - return "ObjectBusy" - case InsufficientBuffer: - return "InsufficientBuffer" - case NotImplemented: - return "NotImplemented" - case Win32Error: - return "Win32Error" - case WrongState: - return "WrongState" - case Aborted: - return "Aborted" - case FileNotFound: - return "FileNotFound" - case ValueOverflow: - return "ValueOverflow" - case AccessDenied: - return "AccessDenied" - case UnknownImageFormat: - return "UnknownImageFormat" - case FontFamilyNotFound: - return "FontFamilyNotFound" - case FontStyleNotFound: - return "FontStyleNotFound" - case NotTrueTypeFont: - return "NotTrueTypeFont" - case UnsupportedGdiplusVersion: - return "UnsupportedGdiplusVersion" - case GdiplusNotInitialized: - return "GdiplusNotInitialized" - case PropertyNotFound: - return "PropertyNotFound" - case PropertyNotSupported: - return "PropertyNotSupported" - case ProfileNotFound: - return "ProfileNotFound" - } - return "Unknown Status Value" -} - -var ( - token uintptr - - modgdiplus = syscall.NewLazyDLL("gdiplus.dll") - - procGdipCreateBitmapFromFile = modgdiplus.NewProc("GdipCreateBitmapFromFile") - procGdipCreateBitmapFromHBITMAP = modgdiplus.NewProc("GdipCreateBitmapFromHBITMAP") - procGdipCreateHBITMAPFromBitmap = modgdiplus.NewProc("GdipCreateHBITMAPFromBitmap") - procGdipCreateBitmapFromResource = modgdiplus.NewProc("GdipCreateBitmapFromResource") - procGdipCreateBitmapFromStream = modgdiplus.NewProc("GdipCreateBitmapFromStream") - procGdipDisposeImage = modgdiplus.NewProc("GdipDisposeImage") - procGdiplusShutdown = modgdiplus.NewProc("GdiplusShutdown") - procGdiplusStartup = modgdiplus.NewProc("GdiplusStartup") -) - -func GdipCreateBitmapFromFile(filename string) (*uintptr, error) { - var bitmap *uintptr - ret, _, _ := procGdipCreateBitmapFromFile.Call( - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(filename))), - uintptr(unsafe.Pointer(&bitmap))) - - if ret != Ok { - return nil, errors.New(fmt.Sprintf("GdipCreateBitmapFromFile failed with status '%s' for file '%s'", GetGpStatus(int32(ret)), filename)) - } - - return bitmap, nil -} - -func GdipCreateBitmapFromResource(instance HINSTANCE, resId *uint16) (*uintptr, error) { - var bitmap *uintptr - ret, _, _ := procGdipCreateBitmapFromResource.Call( - uintptr(instance), - uintptr(unsafe.Pointer(resId)), - uintptr(unsafe.Pointer(&bitmap))) - - if ret != Ok { - return nil, errors.New(fmt.Sprintf("GdiCreateBitmapFromResource failed with status '%s'", GetGpStatus(int32(ret)))) - } - - return bitmap, nil -} - -func GdipCreateBitmapFromStream(stream *IStream) (*uintptr, error) { - var bitmap *uintptr - ret, _, _ := procGdipCreateBitmapFromStream.Call( - uintptr(unsafe.Pointer(stream)), - uintptr(unsafe.Pointer(&bitmap))) - - if ret != Ok { - return nil, errors.New(fmt.Sprintf("GdipCreateBitmapFromStream failed with status '%s'", GetGpStatus(int32(ret)))) - } - - return bitmap, nil -} - -func GdipCreateHBITMAPFromBitmap(bitmap *uintptr, background uint32) (HBITMAP, error) { - var hbitmap HBITMAP - ret, _, _ := procGdipCreateHBITMAPFromBitmap.Call( - uintptr(unsafe.Pointer(bitmap)), - uintptr(unsafe.Pointer(&hbitmap)), - uintptr(background)) - - if ret != Ok { - return 0, errors.New(fmt.Sprintf("GdipCreateHBITMAPFromBitmap failed with status '%s'", GetGpStatus(int32(ret)))) - } - - return hbitmap, nil -} - -func GdipDisposeImage(image *uintptr) { - procGdipDisposeImage.Call(uintptr(unsafe.Pointer(image))) -} - -func GdiplusShutdown() { - procGdiplusShutdown.Call(token) -} - -func GdiplusStartup(input *GdiplusStartupInput, output *GdiplusStartupOutput) { - ret, _, _ := procGdiplusStartup.Call( - uintptr(unsafe.Pointer(&token)), - uintptr(unsafe.Pointer(input)), - uintptr(unsafe.Pointer(output))) - - if ret != Ok { - panic("GdiplusStartup failed with status " + GetGpStatus(int32(ret))) - } -} diff --git a/packages/w32/go.mod b/packages/w32/go.mod deleted file mode 100644 index ce6ffdfc..00000000 --- a/packages/w32/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/AllenDang/w32 diff --git a/packages/w32/idispatch.go b/packages/w32/idispatch.go deleted file mode 100644 index 41634a64..00000000 --- a/packages/w32/idispatch.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "unsafe" -) - -type pIDispatchVtbl struct { - pQueryInterface uintptr - pAddRef uintptr - pRelease uintptr - pGetTypeInfoCount uintptr - pGetTypeInfo uintptr - pGetIDsOfNames uintptr - pInvoke uintptr -} - -type IDispatch struct { - lpVtbl *pIDispatchVtbl -} - -func (this *IDispatch) QueryInterface(id *GUID) *IDispatch { - return ComQueryInterface((*IUnknown)(unsafe.Pointer(this)), id) -} - -func (this *IDispatch) AddRef() int32 { - return ComAddRef((*IUnknown)(unsafe.Pointer(this))) -} - -func (this *IDispatch) Release() int32 { - return ComRelease((*IUnknown)(unsafe.Pointer(this))) -} - -func (this *IDispatch) GetIDsOfName(names []string) []int32 { - return ComGetIDsOfName(this, names) -} - -func (this *IDispatch) Invoke(dispid int32, dispatch int16, params ...interface{}) *VARIANT { - return ComInvoke(this, dispid, dispatch, params...) -} diff --git a/packages/w32/istream.go b/packages/w32/istream.go deleted file mode 100644 index 2b840c3b..00000000 --- a/packages/w32/istream.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "unsafe" -) - -type pIStreamVtbl struct { - pQueryInterface uintptr - pAddRef uintptr - pRelease uintptr -} - -type IStream struct { - lpVtbl *pIStreamVtbl -} - -func (this *IStream) QueryInterface(id *GUID) *IDispatch { - return ComQueryInterface((*IUnknown)(unsafe.Pointer(this)), id) -} - -func (this *IStream) AddRef() int32 { - return ComAddRef((*IUnknown)(unsafe.Pointer(this))) -} - -func (this *IStream) Release() int32 { - return ComRelease((*IUnknown)(unsafe.Pointer(this))) -} diff --git a/packages/w32/iunknown.go b/packages/w32/iunknown.go deleted file mode 100644 index d63ff1bb..00000000 --- a/packages/w32/iunknown.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -type pIUnknownVtbl struct { - pQueryInterface uintptr - pAddRef uintptr - pRelease uintptr -} - -type IUnknown struct { - lpVtbl *pIUnknownVtbl -} - -func (this *IUnknown) QueryInterface(id *GUID) *IDispatch { - return ComQueryInterface(this, id) -} - -func (this *IUnknown) AddRef() int32 { - return ComAddRef(this) -} - -func (this *IUnknown) Release() int32 { - return ComRelease(this) -} diff --git a/packages/w32/kernel32.go b/packages/w32/kernel32.go deleted file mode 100644 index 28febbec..00000000 --- a/packages/w32/kernel32.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modkernel32 = syscall.NewLazyDLL("kernel32.dll") - - procGetModuleHandle = modkernel32.NewProc("GetModuleHandleW") - procMulDiv = modkernel32.NewProc("MulDiv") - procGetConsoleWindow = modkernel32.NewProc("GetConsoleWindow") - procGetCurrentThread = modkernel32.NewProc("GetCurrentThread") - procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives") - procGetUserDefaultLCID = modkernel32.NewProc("GetUserDefaultLCID") - procLstrlen = modkernel32.NewProc("lstrlenW") - procLstrcpy = modkernel32.NewProc("lstrcpyW") - procGlobalAlloc = modkernel32.NewProc("GlobalAlloc") - procGlobalFree = modkernel32.NewProc("GlobalFree") - procGlobalLock = modkernel32.NewProc("GlobalLock") - procGlobalUnlock = modkernel32.NewProc("GlobalUnlock") - procMoveMemory = modkernel32.NewProc("RtlMoveMemory") - procFindResource = modkernel32.NewProc("FindResourceW") - procSizeofResource = modkernel32.NewProc("SizeofResource") - procLockResource = modkernel32.NewProc("LockResource") - procLoadResource = modkernel32.NewProc("LoadResource") - procGetLastError = modkernel32.NewProc("GetLastError") - // procOpenProcess = modkernel32.NewProc("OpenProcess") - // procTerminateProcess = modkernel32.NewProc("TerminateProcess") - procCloseHandle = modkernel32.NewProc("CloseHandle") - procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") - procModule32First = modkernel32.NewProc("Module32FirstW") - procModule32Next = modkernel32.NewProc("Module32NextW") - procGetSystemTimes = modkernel32.NewProc("GetSystemTimes") - procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") - procSetConsoleTextAttribute = modkernel32.NewProc("SetConsoleTextAttribute") - procGetDiskFreeSpaceEx = modkernel32.NewProc("GetDiskFreeSpaceExW") - procGetProcessTimes = modkernel32.NewProc("GetProcessTimes") - procSetSystemTime = modkernel32.NewProc("SetSystemTime") - procGetSystemTime = modkernel32.NewProc("GetSystemTime") - procVirtualAllocEx = modkernel32.NewProc("VirtualAllocEx") - procVirtualFreeEx = modkernel32.NewProc("VirtualFreeEx") - procWriteProcessMemory = modkernel32.NewProc("WriteProcessMemory") - procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory") - procQueryPerformanceCounter = modkernel32.NewProc("QueryPerformanceCounter") - procQueryPerformanceFrequency = modkernel32.NewProc("QueryPerformanceFrequency") -) - -func GetModuleHandle(modulename string) HINSTANCE { - var mn uintptr - if modulename == "" { - mn = 0 - } else { - mn = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(modulename))) - } - ret, _, _ := procGetModuleHandle.Call(mn) - return HINSTANCE(ret) -} - -func MulDiv(number, numerator, denominator int) int { - ret, _, _ := procMulDiv.Call( - uintptr(number), - uintptr(numerator), - uintptr(denominator)) - - return int(ret) -} - -func GetConsoleWindow() HWND { - ret, _, _ := procGetConsoleWindow.Call() - - return HWND(ret) -} - -func GetCurrentThread() HANDLE { - ret, _, _ := procGetCurrentThread.Call() - - return HANDLE(ret) -} - -func GetLogicalDrives() uint32 { - ret, _, _ := procGetLogicalDrives.Call() - - return uint32(ret) -} - -func GetUserDefaultLCID() uint32 { - ret, _, _ := procGetUserDefaultLCID.Call() - - return uint32(ret) -} - -func Lstrlen(lpString *uint16) int { - ret, _, _ := procLstrlen.Call(uintptr(unsafe.Pointer(lpString))) - - return int(ret) -} - -func Lstrcpy(buf []uint16, lpString *uint16) { - procLstrcpy.Call( - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(lpString))) -} - -func GlobalAlloc(uFlags uint, dwBytes uint32) HGLOBAL { - ret, _, _ := procGlobalAlloc.Call( - uintptr(uFlags), - uintptr(dwBytes)) - - if ret == 0 { - panic("GlobalAlloc failed") - } - - return HGLOBAL(ret) -} - -func GlobalFree(hMem HGLOBAL) { - ret, _, _ := procGlobalFree.Call(uintptr(hMem)) - - if ret != 0 { - panic("GlobalFree failed") - } -} - -func GlobalLock(hMem HGLOBAL) unsafe.Pointer { - ret, _, _ := procGlobalLock.Call(uintptr(hMem)) - - if ret == 0 { - panic("GlobalLock failed") - } - - return unsafe.Pointer(ret) -} - -func GlobalUnlock(hMem HGLOBAL) bool { - ret, _, _ := procGlobalUnlock.Call(uintptr(hMem)) - - return ret != 0 -} - -func MoveMemory(destination, source unsafe.Pointer, length uint32) { - procMoveMemory.Call( - uintptr(unsafe.Pointer(destination)), - uintptr(source), - uintptr(length)) -} - -func FindResource(hModule HMODULE, lpName, lpType *uint16) (HRSRC, error) { - ret, _, _ := procFindResource.Call( - uintptr(hModule), - uintptr(unsafe.Pointer(lpName)), - uintptr(unsafe.Pointer(lpType))) - - if ret == 0 { - return 0, syscall.GetLastError() - } - - return HRSRC(ret), nil -} - -func SizeofResource(hModule HMODULE, hResInfo HRSRC) uint32 { - ret, _, _ := procSizeofResource.Call( - uintptr(hModule), - uintptr(hResInfo)) - - if ret == 0 { - panic("SizeofResource failed") - } - - return uint32(ret) -} - -func LockResource(hResData HGLOBAL) unsafe.Pointer { - ret, _, _ := procLockResource.Call(uintptr(hResData)) - - if ret == 0 { - panic("LockResource failed") - } - - return unsafe.Pointer(ret) -} - -func LoadResource(hModule HMODULE, hResInfo HRSRC) HGLOBAL { - ret, _, _ := procLoadResource.Call( - uintptr(hModule), - uintptr(hResInfo)) - - if ret == 0 { - panic("LoadResource failed") - } - - return HGLOBAL(ret) -} - -func GetLastError() uint32 { - ret, _, _ := procGetLastError.Call() - return uint32(ret) -} - -// func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) HANDLE { -// inherit := 0 -// if inheritHandle { -// inherit = 1 -// } - -// ret, _, _ := procOpenProcess.Call( -// uintptr(desiredAccess), -// uintptr(inherit), -// uintptr(processId)) -// return HANDLE(ret) -// } - -// func TerminateProcess(hProcess HANDLE, uExitCode uint) bool { -// ret, _, _ := procTerminateProcess.Call( -// uintptr(hProcess), -// uintptr(uExitCode)) -// return ret != 0 -// } - -func CloseHandle(object HANDLE) bool { - ret, _, _ := procCloseHandle.Call( - uintptr(object)) - return ret != 0 -} - -func CreateToolhelp32Snapshot(flags, processId uint32) HANDLE { - ret, _, _ := procCreateToolhelp32Snapshot.Call( - uintptr(flags), - uintptr(processId)) - - if ret <= 0 { - return HANDLE(0) - } - - return HANDLE(ret) -} - -func Module32First(snapshot HANDLE, me *MODULEENTRY32) bool { - ret, _, _ := procModule32First.Call( - uintptr(snapshot), - uintptr(unsafe.Pointer(me))) - - return ret != 0 -} - -func Module32Next(snapshot HANDLE, me *MODULEENTRY32) bool { - ret, _, _ := procModule32Next.Call( - uintptr(snapshot), - uintptr(unsafe.Pointer(me))) - - return ret != 0 -} - -func GetSystemTimes(lpIdleTime, lpKernelTime, lpUserTime *FILETIME) bool { - ret, _, _ := procGetSystemTimes.Call( - uintptr(unsafe.Pointer(lpIdleTime)), - uintptr(unsafe.Pointer(lpKernelTime)), - uintptr(unsafe.Pointer(lpUserTime))) - - return ret != 0 -} - -func GetProcessTimes(hProcess HANDLE, lpCreationTime, lpExitTime, lpKernelTime, lpUserTime *FILETIME) bool { - ret, _, _ := procGetProcessTimes.Call( - uintptr(hProcess), - uintptr(unsafe.Pointer(lpCreationTime)), - uintptr(unsafe.Pointer(lpExitTime)), - uintptr(unsafe.Pointer(lpKernelTime)), - uintptr(unsafe.Pointer(lpUserTime))) - - return ret != 0 -} - -func GetConsoleScreenBufferInfo(hConsoleOutput HANDLE) *CONSOLE_SCREEN_BUFFER_INFO { - var csbi CONSOLE_SCREEN_BUFFER_INFO - ret, _, _ := procGetConsoleScreenBufferInfo.Call( - uintptr(hConsoleOutput), - uintptr(unsafe.Pointer(&csbi))) - if ret == 0 { - return nil - } - return &csbi -} - -func SetConsoleTextAttribute(hConsoleOutput HANDLE, wAttributes uint16) bool { - ret, _, _ := procSetConsoleTextAttribute.Call( - uintptr(hConsoleOutput), - uintptr(wAttributes)) - return ret != 0 -} - -func GetDiskFreeSpaceEx(dirName string) (r bool, - freeBytesAvailable, totalNumberOfBytes, totalNumberOfFreeBytes uint64) { - ret, _, _ := procGetDiskFreeSpaceEx.Call( - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(dirName))), - uintptr(unsafe.Pointer(&freeBytesAvailable)), - uintptr(unsafe.Pointer(&totalNumberOfBytes)), - uintptr(unsafe.Pointer(&totalNumberOfFreeBytes))) - return ret != 0, - freeBytesAvailable, totalNumberOfBytes, totalNumberOfFreeBytes -} - -func GetSystemTime() *SYSTEMTIME { - var time SYSTEMTIME - procGetSystemTime.Call( - uintptr(unsafe.Pointer(&time))) - return &time -} - -func SetSystemTime(time *SYSTEMTIME) bool { - ret, _, _ := procSetSystemTime.Call( - uintptr(unsafe.Pointer(time))) - return ret != 0 -} - -func VirtualAllocEx(hProcess HANDLE, lpAddress, dwSize uintptr, flAllocationType, flProtect uint32) uintptr { - ret, _, _ := procVirtualAllocEx.Call( - uintptr(hProcess), - lpAddress, - dwSize, - uintptr(flAllocationType), - uintptr(flProtect), - ) - - return ret -} - -func VirtualFreeEx(hProcess HANDLE, lpAddress, dwSize uintptr, dwFreeType uint32) bool { - ret, _, _ := procVirtualFreeEx.Call( - uintptr(hProcess), - lpAddress, - dwSize, - uintptr(dwFreeType), - ) - - return ret != 0 -} - -func WriteProcessMemory(hProcess HANDLE, lpBaseAddress, lpBuffer, nSize uintptr) (int, bool) { - var nBytesWritten int - ret, _, _ := procWriteProcessMemory.Call( - uintptr(hProcess), - lpBaseAddress, - lpBuffer, - nSize, - uintptr(unsafe.Pointer(&nBytesWritten)), - ) - - return nBytesWritten, ret != 0 -} - -func ReadProcessMemory(hProcess HANDLE, lpBaseAddress, nSize uintptr) (lpBuffer []uint16, lpNumberOfBytesRead int, ok bool) { - - var nBytesRead int - buf := make([]uint16, nSize) - ret, _, _ := procReadProcessMemory.Call( - uintptr(hProcess), - lpBaseAddress, - uintptr(unsafe.Pointer(&buf[0])), - nSize, - uintptr(unsafe.Pointer(&nBytesRead)), - ) - - return buf, nBytesRead, ret != 0 -} - -func QueryPerformanceCounter() uint64 { - result := uint64(0) - procQueryPerformanceCounter.Call( - uintptr(unsafe.Pointer(&result)), - ) - - return result -} - -func QueryPerformanceFrequency() uint64 { - result := uint64(0) - procQueryPerformanceFrequency.Call( - uintptr(unsafe.Pointer(&result)), - ) - - return result -} diff --git a/packages/w32/ole32.go b/packages/w32/ole32.go deleted file mode 100644 index a7f79b55..00000000 --- a/packages/w32/ole32.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modole32 = syscall.NewLazyDLL("ole32.dll") - - procCoInitializeEx = modole32.NewProc("CoInitializeEx") - procCoInitialize = modole32.NewProc("CoInitialize") - procCoUninitialize = modole32.NewProc("CoUninitialize") - procCreateStreamOnHGlobal = modole32.NewProc("CreateStreamOnHGlobal") -) - -func CoInitializeEx(coInit uintptr) HRESULT { - ret, _, _ := procCoInitializeEx.Call( - 0, - coInit) - - switch uint32(ret) { - case E_INVALIDARG: - panic("CoInitializeEx failed with E_INVALIDARG") - case E_OUTOFMEMORY: - panic("CoInitializeEx failed with E_OUTOFMEMORY") - case E_UNEXPECTED: - panic("CoInitializeEx failed with E_UNEXPECTED") - } - - return HRESULT(ret) -} - -func CoInitialize() { - procCoInitialize.Call(0) -} - -func CoUninitialize() { - procCoUninitialize.Call() -} - -func CreateStreamOnHGlobal(hGlobal HGLOBAL, fDeleteOnRelease bool) *IStream { - stream := new(IStream) - ret, _, _ := procCreateStreamOnHGlobal.Call( - uintptr(hGlobal), - uintptr(BoolToBOOL(fDeleteOnRelease)), - uintptr(unsafe.Pointer(&stream))) - - switch uint32(ret) { - case E_INVALIDARG: - panic("CreateStreamOnHGlobal failed with E_INVALIDARG") - case E_OUTOFMEMORY: - panic("CreateStreamOnHGlobal failed with E_OUTOFMEMORY") - case E_UNEXPECTED: - panic("CreateStreamOnHGlobal failed with E_UNEXPECTED") - } - - return stream -} diff --git a/packages/w32/oleaut32.go b/packages/w32/oleaut32.go deleted file mode 100644 index 0eeeab72..00000000 --- a/packages/w32/oleaut32.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modoleaut32 = syscall.NewLazyDLL("oleaut32") - - procVariantInit = modoleaut32.NewProc("VariantInit") - procSysAllocString = modoleaut32.NewProc("SysAllocString") - procSysFreeString = modoleaut32.NewProc("SysFreeString") - procSysStringLen = modoleaut32.NewProc("SysStringLen") - procCreateDispTypeInfo = modoleaut32.NewProc("CreateDispTypeInfo") - procCreateStdDispatch = modoleaut32.NewProc("CreateStdDispatch") -) - -func VariantInit(v *VARIANT) { - hr, _, _ := procVariantInit.Call(uintptr(unsafe.Pointer(v))) - if hr != 0 { - panic("Invoke VariantInit error.") - } - return -} - -func SysAllocString(v string) (ss *int16) { - pss, _, _ := procSysAllocString.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(v)))) - ss = (*int16)(unsafe.Pointer(pss)) - return -} - -func SysFreeString(v *int16) { - hr, _, _ := procSysFreeString.Call(uintptr(unsafe.Pointer(v))) - if hr != 0 { - panic("Invoke SysFreeString error.") - } - return -} - -func SysStringLen(v *int16) uint { - l, _, _ := procSysStringLen.Call(uintptr(unsafe.Pointer(v))) - return uint(l) -} diff --git a/packages/w32/opengl32.go b/packages/w32/opengl32.go deleted file mode 100644 index 7363bb10..00000000 --- a/packages/w32/opengl32.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modopengl32 = syscall.NewLazyDLL("opengl32.dll") - - procwglCreateContext = modopengl32.NewProc("wglCreateContext") - procwglCreateLayerContext = modopengl32.NewProc("wglCreateLayerContext") - procwglDeleteContext = modopengl32.NewProc("wglDeleteContext") - procwglGetProcAddress = modopengl32.NewProc("wglGetProcAddress") - procwglMakeCurrent = modopengl32.NewProc("wglMakeCurrent") - procwglShareLists = modopengl32.NewProc("wglShareLists") -) - -func WglCreateContext(hdc HDC) HGLRC { - ret, _, _ := procwglCreateContext.Call( - uintptr(hdc), - ) - - return HGLRC(ret) -} - -func WglCreateLayerContext(hdc HDC, iLayerPlane int) HGLRC { - ret, _, _ := procwglCreateLayerContext.Call( - uintptr(hdc), - uintptr(iLayerPlane), - ) - - return HGLRC(ret) -} - -func WglDeleteContext(hglrc HGLRC) bool { - ret, _, _ := procwglDeleteContext.Call( - uintptr(hglrc), - ) - - return ret == TRUE -} - -func WglGetProcAddress(szProc string) uintptr { - ret, _, _ := procwglGetProcAddress.Call( - uintptr(unsafe.Pointer(syscall.StringBytePtr(szProc))), - ) - - return ret -} - -func WglMakeCurrent(hdc HDC, hglrc HGLRC) bool { - ret, _, _ := procwglMakeCurrent.Call( - uintptr(hdc), - uintptr(hglrc), - ) - - return ret == TRUE -} - -func WglShareLists(hglrc1, hglrc2 HGLRC) bool { - ret, _, _ := procwglShareLists.Call( - uintptr(hglrc1), - uintptr(hglrc2), - ) - - return ret == TRUE -} diff --git a/packages/w32/psapi.go b/packages/w32/psapi.go deleted file mode 100644 index bd1e1262..00000000 --- a/packages/w32/psapi.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unsafe" -) - -var ( - modpsapi = syscall.NewLazyDLL("psapi.dll") - - procEnumProcesses = modpsapi.NewProc("EnumProcesses") -) - -func EnumProcesses(processIds []uint32, cb uint32, bytesReturned *uint32) bool { - ret, _, _ := procEnumProcesses.Call( - uintptr(unsafe.Pointer(&processIds[0])), - uintptr(cb), - uintptr(unsafe.Pointer(bytesReturned))) - - return ret != 0 -} diff --git a/packages/w32/shell32.go b/packages/w32/shell32.go deleted file mode 100644 index 0923b8b6..00000000 --- a/packages/w32/shell32.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "errors" - "fmt" - "syscall" - "unsafe" -) - -var ( - modshell32 = syscall.NewLazyDLL("shell32.dll") - - procSHBrowseForFolder = modshell32.NewProc("SHBrowseForFolderW") - procSHGetPathFromIDList = modshell32.NewProc("SHGetPathFromIDListW") - procDragAcceptFiles = modshell32.NewProc("DragAcceptFiles") - procDragQueryFile = modshell32.NewProc("DragQueryFileW") - procDragQueryPoint = modshell32.NewProc("DragQueryPoint") - procDragFinish = modshell32.NewProc("DragFinish") - procShellExecute = modshell32.NewProc("ShellExecuteW") - procExtractIcon = modshell32.NewProc("ExtractIconW") -) - -func SHBrowseForFolder(bi *BROWSEINFO) uintptr { - ret, _, _ := procSHBrowseForFolder.Call(uintptr(unsafe.Pointer(bi))) - - return ret -} - -func SHGetPathFromIDList(idl uintptr) string { - buf := make([]uint16, 1024) - procSHGetPathFromIDList.Call( - idl, - uintptr(unsafe.Pointer(&buf[0]))) - - return syscall.UTF16ToString(buf) -} - -func DragAcceptFiles(hwnd HWND, accept bool) { - procDragAcceptFiles.Call( - uintptr(hwnd), - uintptr(BoolToBOOL(accept))) -} - -func DragQueryFile(hDrop HDROP, iFile uint) (fileName string, fileCount uint) { - ret, _, _ := procDragQueryFile.Call( - uintptr(hDrop), - uintptr(iFile), - 0, - 0) - - fileCount = uint(ret) - - if iFile != 0xFFFFFFFF { - buf := make([]uint16, fileCount+1) - - ret, _, _ := procDragQueryFile.Call( - uintptr(hDrop), - uintptr(iFile), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(fileCount+1)) - - if ret == 0 { - panic("Invoke DragQueryFile error.") - } - - fileName = syscall.UTF16ToString(buf) - } - - return -} - -func DragQueryPoint(hDrop HDROP) (x, y int, isClientArea bool) { - var pt POINT - ret, _, _ := procDragQueryPoint.Call( - uintptr(hDrop), - uintptr(unsafe.Pointer(&pt))) - - return int(pt.X), int(pt.Y), (ret == 1) -} - -func DragFinish(hDrop HDROP) { - procDragFinish.Call(uintptr(hDrop)) -} - -func ShellExecute(hwnd HWND, lpOperation, lpFile, lpParameters, lpDirectory string, nShowCmd int) error { - var op, param, directory uintptr - if len(lpOperation) != 0 { - op = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpOperation))) - } - if len(lpParameters) != 0 { - param = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpParameters))) - } - if len(lpDirectory) != 0 { - directory = uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpDirectory))) - } - - ret, _, _ := procShellExecute.Call( - uintptr(hwnd), - op, - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpFile))), - param, - directory, - uintptr(nShowCmd)) - - errorMsg := "" - if ret != 0 && ret <= 32 { - switch int(ret) { - case ERROR_FILE_NOT_FOUND: - errorMsg = "The specified file was not found." - case ERROR_PATH_NOT_FOUND: - errorMsg = "The specified path was not found." - case ERROR_BAD_FORMAT: - errorMsg = "The .exe file is invalid (non-Win32 .exe or error in .exe image)." - case SE_ERR_ACCESSDENIED: - errorMsg = "The operating system denied access to the specified file." - case SE_ERR_ASSOCINCOMPLETE: - errorMsg = "The file name association is incomplete or invalid." - case SE_ERR_DDEBUSY: - errorMsg = "The DDE transaction could not be completed because other DDE transactions were being processed." - case SE_ERR_DDEFAIL: - errorMsg = "The DDE transaction failed." - case SE_ERR_DDETIMEOUT: - errorMsg = "The DDE transaction could not be completed because the request timed out." - case SE_ERR_DLLNOTFOUND: - errorMsg = "The specified DLL was not found." - case SE_ERR_NOASSOC: - errorMsg = "There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable." - case SE_ERR_OOM: - errorMsg = "There was not enough memory to complete the operation." - case SE_ERR_SHARE: - errorMsg = "A sharing violation occurred." - default: - errorMsg = fmt.Sprintf("Unknown error occurred with error code %v", ret) - } - } else { - return nil - } - - return errors.New(errorMsg) -} - -func ExtractIcon(lpszExeFileName string, nIconIndex int) HICON { - ret, _, _ := procExtractIcon.Call( - 0, - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(lpszExeFileName))), - uintptr(nIconIndex)) - - return HICON(ret) -} diff --git a/packages/w32/typedef.go b/packages/w32/typedef.go deleted file mode 100644 index 118f76c6..00000000 --- a/packages/w32/typedef.go +++ /dev/null @@ -1,891 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "unsafe" -) - -// From MSDN: Windows Data Types -// http://msdn.microsoft.com/en-us/library/s3f49ktz.aspx -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751.aspx -// ATOM WORD -// BOOL int32 -// BOOLEAN byte -// BYTE byte -// CCHAR int8 -// CHAR int8 -// COLORREF DWORD -// DWORD uint32 -// DWORDLONG ULONGLONG -// DWORD_PTR ULONG_PTR -// DWORD32 uint32 -// DWORD64 uint64 -// FLOAT float32 -// HACCEL HANDLE -// HALF_PTR struct{} // ??? -// HANDLE PVOID -// HBITMAP HANDLE -// HBRUSH HANDLE -// HCOLORSPACE HANDLE -// HCONV HANDLE -// HCONVLIST HANDLE -// HCURSOR HANDLE -// HDC HANDLE -// HDDEDATA HANDLE -// HDESK HANDLE -// HDROP HANDLE -// HDWP HANDLE -// HENHMETAFILE HANDLE -// HFILE HANDLE -// HFONT HANDLE -// HGDIOBJ HANDLE -// HGLOBAL HANDLE -// HHOOK HANDLE -// HICON HANDLE -// HINSTANCE HANDLE -// HKEY HANDLE -// HKL HANDLE -// HLOCAL HANDLE -// HMENU HANDLE -// HMETAFILE HANDLE -// HMODULE HANDLE -// HPALETTE HANDLE -// HPEN HANDLE -// HRESULT int32 -// HRGN HANDLE -// HSZ HANDLE -// HWINSTA HANDLE -// HWND HANDLE -// INT int32 -// INT_PTR uintptr -// INT8 int8 -// INT16 int16 -// INT32 int32 -// INT64 int64 -// LANGID WORD -// LCID DWORD -// LCTYPE DWORD -// LGRPID DWORD -// LONG int32 -// LONGLONG int64 -// LONG_PTR uintptr -// LONG32 int32 -// LONG64 int64 -// LPARAM LONG_PTR -// LPBOOL *BOOL -// LPBYTE *BYTE -// LPCOLORREF *COLORREF -// LPCSTR *int8 -// LPCTSTR LPCWSTR -// LPCVOID unsafe.Pointer -// LPCWSTR *WCHAR -// LPDWORD *DWORD -// LPHANDLE *HANDLE -// LPINT *INT -// LPLONG *LONG -// LPSTR *CHAR -// LPTSTR LPWSTR -// LPVOID unsafe.Pointer -// LPWORD *WORD -// LPWSTR *WCHAR -// LRESULT LONG_PTR -// PBOOL *BOOL -// PBOOLEAN *BOOLEAN -// PBYTE *BYTE -// PCHAR *CHAR -// PCSTR *CHAR -// PCTSTR PCWSTR -// PCWSTR *WCHAR -// PDWORD *DWORD -// PDWORDLONG *DWORDLONG -// PDWORD_PTR *DWORD_PTR -// PDWORD32 *DWORD32 -// PDWORD64 *DWORD64 -// PFLOAT *FLOAT -// PHALF_PTR *HALF_PTR -// PHANDLE *HANDLE -// PHKEY *HKEY -// PINT_PTR *INT_PTR -// PINT8 *INT8 -// PINT16 *INT16 -// PINT32 *INT32 -// PINT64 *INT64 -// PLCID *LCID -// PLONG *LONG -// PLONGLONG *LONGLONG -// PLONG_PTR *LONG_PTR -// PLONG32 *LONG32 -// PLONG64 *LONG64 -// POINTER_32 struct{} // ??? -// POINTER_64 struct{} // ??? -// POINTER_SIGNED uintptr -// POINTER_UNSIGNED uintptr -// PSHORT *SHORT -// PSIZE_T *SIZE_T -// PSSIZE_T *SSIZE_T -// PSTR *CHAR -// PTBYTE *TBYTE -// PTCHAR *TCHAR -// PTSTR PWSTR -// PUCHAR *UCHAR -// PUHALF_PTR *UHALF_PTR -// PUINT *UINT -// PUINT_PTR *UINT_PTR -// PUINT8 *UINT8 -// PUINT16 *UINT16 -// PUINT32 *UINT32 -// PUINT64 *UINT64 -// PULONG *ULONG -// PULONGLONG *ULONGLONG -// PULONG_PTR *ULONG_PTR -// PULONG32 *ULONG32 -// PULONG64 *ULONG64 -// PUSHORT *USHORT -// PVOID unsafe.Pointer -// PWCHAR *WCHAR -// PWORD *WORD -// PWSTR *WCHAR -// QWORD uint64 -// SC_HANDLE HANDLE -// SC_LOCK LPVOID -// SERVICE_STATUS_HANDLE HANDLE -// SHORT int16 -// SIZE_T ULONG_PTR -// SSIZE_T LONG_PTR -// TBYTE WCHAR -// TCHAR WCHAR -// UCHAR uint8 -// UHALF_PTR struct{} // ??? -// UINT uint32 -// UINT_PTR uintptr -// UINT8 uint8 -// UINT16 uint16 -// UINT32 uint32 -// UINT64 uint64 -// ULONG uint32 -// ULONGLONG uint64 -// ULONG_PTR uintptr -// ULONG32 uint32 -// ULONG64 uint64 -// USHORT uint16 -// USN LONGLONG -// WCHAR uint16 -// WORD uint16 -// WPARAM UINT_PTR -type ( - ATOM uint16 - BOOL int32 - COLORREF uint32 - DWM_FRAME_COUNT uint64 - DWORD uint32 - HACCEL HANDLE - HANDLE uintptr - HBITMAP HANDLE - HBRUSH HANDLE - HCURSOR HANDLE - HDC HANDLE - HDROP HANDLE - HDWP HANDLE - HENHMETAFILE HANDLE - HFONT HANDLE - HGDIOBJ HANDLE - HGLOBAL HANDLE - HGLRC HANDLE - HHOOK HANDLE - HICON HANDLE - HIMAGELIST HANDLE - HINSTANCE HANDLE - HKEY HANDLE - HKL HANDLE - HMENU HANDLE - HMODULE HANDLE - HMONITOR HANDLE - HPEN HANDLE - HRESULT int32 - HRGN HANDLE - HRSRC HANDLE - HTHUMBNAIL HANDLE - HWND HANDLE - LPARAM uintptr - LPCVOID unsafe.Pointer - LRESULT uintptr - PVOID unsafe.Pointer - QPC_TIME uint64 - ULONG_PTR uintptr - WPARAM uintptr - TRACEHANDLE uintptr -) - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162805.aspx -type POINT struct { - X, Y int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162897.aspx -type RECT struct { - Left, Top, Right, Bottom int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms633577.aspx -type WNDCLASSEX struct { - Size uint32 - Style uint32 - WndProc uintptr - ClsExtra int32 - WndExtra int32 - Instance HINSTANCE - Icon HICON - Cursor HCURSOR - Background HBRUSH - MenuName *uint16 - ClassName *uint16 - IconSm HICON -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms644958.aspx -type MSG struct { - Hwnd HWND - Message uint32 - WParam uintptr - LParam uintptr - Time uint32 - Pt POINT -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145037.aspx -type LOGFONT struct { - Height int32 - Width int32 - Escapement int32 - Orientation int32 - Weight int32 - Italic byte - Underline byte - StrikeOut byte - CharSet byte - OutPrecision byte - ClipPrecision byte - Quality byte - PitchAndFamily byte - FaceName [LF_FACESIZE]uint16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839.aspx -type OPENFILENAME struct { - StructSize uint32 - Owner HWND - Instance HINSTANCE - Filter *uint16 - CustomFilter *uint16 - MaxCustomFilter uint32 - FilterIndex uint32 - File *uint16 - MaxFile uint32 - FileTitle *uint16 - MaxFileTitle uint32 - InitialDir *uint16 - Title *uint16 - Flags uint32 - FileOffset uint16 - FileExtension uint16 - DefExt *uint16 - CustData uintptr - FnHook uintptr - TemplateName *uint16 - PvReserved unsafe.Pointer - DwReserved uint32 - FlagsEx uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb773205.aspx -type BROWSEINFO struct { - Owner HWND - Root *uint16 - DisplayName *uint16 - Title *uint16 - Flags uint32 - CallbackFunc uintptr - LParam uintptr - Image int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931.aspx -type GUID struct { - Data1 uint32 - Data2 uint16 - Data3 uint16 - Data4 [8]byte -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms221627.aspx -type VARIANT struct { - VT uint16 // 2 - WReserved1 uint16 // 4 - WReserved2 uint16 // 6 - WReserved3 uint16 // 8 - Val int64 // 16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms221416.aspx -type DISPPARAMS struct { - Rgvarg uintptr - RgdispidNamedArgs uintptr - CArgs uint32 - CNamedArgs uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms221133.aspx -type EXCEPINFO struct { - WCode uint16 - WReserved uint16 - BstrSource *uint16 - BstrDescription *uint16 - BstrHelpFile *uint16 - DwHelpContext uint32 - PvReserved uintptr - PfnDeferredFillIn uintptr - Scode int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145035.aspx -type LOGBRUSH struct { - LbStyle uint32 - LbColor COLORREF - LbHatch uintptr -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183565.aspx -type DEVMODE struct { - DmDeviceName [CCHDEVICENAME]uint16 - DmSpecVersion uint16 - DmDriverVersion uint16 - DmSize uint16 - DmDriverExtra uint16 - DmFields uint32 - DmOrientation int16 - DmPaperSize int16 - DmPaperLength int16 - DmPaperWidth int16 - DmScale int16 - DmCopies int16 - DmDefaultSource int16 - DmPrintQuality int16 - DmColor int16 - DmDuplex int16 - DmYResolution int16 - DmTTOption int16 - DmCollate int16 - DmFormName [CCHFORMNAME]uint16 - DmLogPixels uint16 - DmBitsPerPel uint32 - DmPelsWidth uint32 - DmPelsHeight uint32 - DmDisplayFlags uint32 - DmDisplayFrequency uint32 - DmICMMethod uint32 - DmICMIntent uint32 - DmMediaType uint32 - DmDitherType uint32 - DmReserved1 uint32 - DmReserved2 uint32 - DmPanningWidth uint32 - DmPanningHeight uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376.aspx -type BITMAPINFOHEADER struct { - BiSize uint32 - BiWidth int32 - BiHeight int32 - BiPlanes uint16 - BiBitCount uint16 - BiCompression uint32 - BiSizeImage uint32 - BiXPelsPerMeter int32 - BiYPelsPerMeter int32 - BiClrUsed uint32 - BiClrImportant uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162938.aspx -type RGBQUAD struct { - RgbBlue byte - RgbGreen byte - RgbRed byte - RgbReserved byte -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183375.aspx -type BITMAPINFO struct { - BmiHeader BITMAPINFOHEADER - BmiColors *RGBQUAD -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183371.aspx -type BITMAP struct { - BmType int32 - BmWidth int32 - BmHeight int32 - BmWidthBytes int32 - BmPlanes uint16 - BmBitsPixel uint16 - BmBits unsafe.Pointer -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183567.aspx -type DIBSECTION struct { - DsBm BITMAP - DsBmih BITMAPINFOHEADER - DsBitfields [3]uint32 - DshSection HANDLE - DsOffset uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162607.aspx -type ENHMETAHEADER struct { - IType uint32 - NSize uint32 - RclBounds RECT - RclFrame RECT - DSignature uint32 - NVersion uint32 - NBytes uint32 - NRecords uint32 - NHandles uint16 - SReserved uint16 - NDescription uint32 - OffDescription uint32 - NPalEntries uint32 - SzlDevice SIZE - SzlMillimeters SIZE - CbPixelFormat uint32 - OffPixelFormat uint32 - BOpenGL uint32 - SzlMicrometers SIZE -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145106.aspx -type SIZE struct { - CX, CY int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145132.aspx -type TEXTMETRIC struct { - TmHeight int32 - TmAscent int32 - TmDescent int32 - TmInternalLeading int32 - TmExternalLeading int32 - TmAveCharWidth int32 - TmMaxCharWidth int32 - TmWeight int32 - TmOverhang int32 - TmDigitizedAspectX int32 - TmDigitizedAspectY int32 - TmFirstChar uint16 - TmLastChar uint16 - TmDefaultChar uint16 - TmBreakChar uint16 - TmItalic byte - TmUnderlined byte - TmStruckOut byte - TmPitchAndFamily byte - TmCharSet byte -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd183574.aspx -type DOCINFO struct { - CbSize int32 - LpszDocName *uint16 - LpszOutput *uint16 - LpszDatatype *uint16 - FwType uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb775514.aspx -type NMHDR struct { - HwndFrom HWND - IdFrom uintptr - Code uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774743.aspx -type LVCOLUMN struct { - Mask uint32 - Fmt int32 - Cx int32 - PszText *uint16 - CchTextMax int32 - ISubItem int32 - IImage int32 - IOrder int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774760.aspx -type LVITEM struct { - Mask uint32 - IItem int32 - ISubItem int32 - State uint32 - StateMask uint32 - PszText *uint16 - CchTextMax int32 - IImage int32 - LParam uintptr - IIndent int32 - IGroupId int32 - CColumns uint32 - PuColumns uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774754.aspx -type LVHITTESTINFO struct { - Pt POINT - Flags uint32 - IItem int32 - ISubItem int32 - IGroup int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774771.aspx -type NMITEMACTIVATE struct { - Hdr NMHDR - IItem int32 - ISubItem int32 - UNewState uint32 - UOldState uint32 - UChanged uint32 - PtAction POINT - LParam uintptr - UKeyFlags uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774773.aspx -type NMLISTVIEW struct { - Hdr NMHDR - IItem int32 - ISubItem int32 - UNewState uint32 - UOldState uint32 - UChanged uint32 - PtAction POINT - LParam uintptr -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb774780.aspx -type NMLVDISPINFO struct { - Hdr NMHDR - Item LVITEM -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb775507.aspx -type INITCOMMONCONTROLSEX struct { - DwSize uint32 - DwICC uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb760256.aspx -type TOOLINFO struct { - CbSize uint32 - UFlags uint32 - Hwnd HWND - UId uintptr - Rect RECT - Hinst HINSTANCE - LpszText *uint16 - LParam uintptr - LpReserved unsafe.Pointer -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms645604.aspx -type TRACKMOUSEEVENT struct { - CbSize uint32 - DwFlags uint32 - HwndTrack HWND - DwHoverTime uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms534067.aspx -type GdiplusStartupInput struct { - GdiplusVersion uint32 - DebugEventCallback uintptr - SuppressBackgroundThread BOOL - SuppressExternalCodecs BOOL -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms534068.aspx -type GdiplusStartupOutput struct { - NotificationHook uintptr - NotificationUnhook uintptr -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162768.aspx -type PAINTSTRUCT struct { - Hdc HDC - FErase BOOL - RcPaint RECT - FRestore BOOL - FIncUpdate BOOL - RgbReserved [32]byte -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms684225.aspx -type MODULEENTRY32 struct { - Size uint32 - ModuleID uint32 - ProcessID uint32 - GlblcntUsage uint32 - ProccntUsage uint32 - ModBaseAddr *uint8 - ModBaseSize uint32 - HModule HMODULE - SzModule [MAX_MODULE_NAME32 + 1]uint16 - SzExePath [MAX_PATH]uint16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms724284.aspx -type FILETIME struct { - DwLowDateTime uint32 - DwHighDateTime uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms682119.aspx -type COORD struct { - X, Y int16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms686311.aspx -type SMALL_RECT struct { - Left, Top, Right, Bottom int16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093.aspx -type CONSOLE_SCREEN_BUFFER_INFO struct { - DwSize COORD - DwCursorPosition COORD - WAttributes uint16 - SrWindow SMALL_RECT - DwMaximumWindowSize COORD -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/bb773244.aspx -type MARGINS struct { - CxLeftWidth, CxRightWidth, CyTopHeight, CyBottomHeight int32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa969500.aspx -type DWM_BLURBEHIND struct { - DwFlags uint32 - fEnable BOOL - hRgnBlur HRGN - fTransitionOnMaximized BOOL -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa969501.aspx -type DWM_PRESENT_PARAMETERS struct { - cbSize uint32 - fQueue BOOL - cRefreshStart DWM_FRAME_COUNT - cBuffer uint32 - fUseSourceRate BOOL - rateSource UNSIGNED_RATIO - cRefreshesPerFrame uint32 - eSampling DWM_SOURCE_FRAME_SAMPLING -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa969502.aspx -type DWM_THUMBNAIL_PROPERTIES struct { - dwFlags uint32 - rcDestination RECT - rcSource RECT - opacity byte - fVisible BOOL - fSourceClientAreaOnly BOOL -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa969503.aspx -type DWM_TIMING_INFO struct { - cbSize uint32 - rateRefresh UNSIGNED_RATIO - qpcRefreshPeriod QPC_TIME - rateCompose UNSIGNED_RATIO - qpcVBlank QPC_TIME - cRefresh DWM_FRAME_COUNT - cDXRefresh uint32 - qpcCompose QPC_TIME - cFrame DWM_FRAME_COUNT - cDXPresent uint32 - cRefreshFrame DWM_FRAME_COUNT - cFrameSubmitted DWM_FRAME_COUNT - cDXPresentSubmitted uint32 - cFrameConfirmed DWM_FRAME_COUNT - cDXPresentConfirmed uint32 - cRefreshConfirmed DWM_FRAME_COUNT - cDXRefreshConfirmed uint32 - cFramesLate DWM_FRAME_COUNT - cFramesOutstanding uint32 - cFrameDisplayed DWM_FRAME_COUNT - qpcFrameDisplayed QPC_TIME - cRefreshFrameDisplayed DWM_FRAME_COUNT - cFrameComplete DWM_FRAME_COUNT - qpcFrameComplete QPC_TIME - cFramePending DWM_FRAME_COUNT - qpcFramePending QPC_TIME - cFramesDisplayed DWM_FRAME_COUNT - cFramesComplete DWM_FRAME_COUNT - cFramesPending DWM_FRAME_COUNT - cFramesAvailable DWM_FRAME_COUNT - cFramesDropped DWM_FRAME_COUNT - cFramesMissed DWM_FRAME_COUNT - cRefreshNextDisplayed DWM_FRAME_COUNT - cRefreshNextPresented DWM_FRAME_COUNT - cRefreshesDisplayed DWM_FRAME_COUNT - cRefreshesPresented DWM_FRAME_COUNT - cRefreshStarted DWM_FRAME_COUNT - cPixelsReceived uint64 - cPixelsDrawn uint64 - cBuffersEmpty DWM_FRAME_COUNT -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd389402.aspx -type MilMatrix3x2D struct { - S_11, S_12, S_21, S_22 float64 - DX, DY float64 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa969505.aspx -type UNSIGNED_RATIO struct { - uiNumerator uint32 - uiDenominator uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms632603.aspx -type CREATESTRUCT struct { - CreateParams uintptr - Instance HINSTANCE - Menu HMENU - Parent HWND - Cy, Cx int32 - Y, X int32 - Style int32 - Name *uint16 - Class *uint16 - dwExStyle uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145065.aspx -type MONITORINFO struct { - CbSize uint32 - RcMonitor RECT - RcWork RECT - DwFlags uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd145066.aspx -type MONITORINFOEX struct { - MONITORINFO - SzDevice [CCHDEVICENAME]uint16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/dd368826.aspx -type PIXELFORMATDESCRIPTOR struct { - Size uint16 - Version uint16 - DwFlags uint32 - IPixelType byte - ColorBits byte - RedBits, RedShift byte - GreenBits, GreenShift byte - BlueBits, BlueShift byte - AlphaBits, AlphaShift byte - AccumBits byte - AccumRedBits byte - AccumGreenBits byte - AccumBlueBits byte - AccumAlphaBits byte - DepthBits, StencilBits byte - AuxBuffers byte - ILayerType byte - Reserved byte - DwLayerMask uint32 - DwVisibleMask uint32 - DwDamageMask uint32 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx -type INPUT struct { - Type uint32 - Mi MOUSEINPUT - Ki KEYBDINPUT - Hi HARDWAREINPUT -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646273(v=vs.85).aspx -type MOUSEINPUT struct { - Dx int32 - Dy int32 - MouseData uint32 - DwFlags uint32 - Time uint32 - DwExtraInfo uintptr -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646271(v=vs.85).aspx -type KEYBDINPUT struct { - WVk uint16 - WScan uint16 - DwFlags uint32 - Time uint32 - DwExtraInfo uintptr -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646269(v=vs.85).aspx -type HARDWAREINPUT struct { - UMsg uint32 - WParamL uint16 - WParamH uint16 -} - -type KbdInput struct { - typ uint32 - ki KEYBDINPUT -} - -type MouseInput struct { - typ uint32 - mi MOUSEINPUT -} - -type HardwareInput struct { - typ uint32 - hi HARDWAREINPUT -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx -type SYSTEMTIME struct { - Year uint16 - Month uint16 - DayOfWeek uint16 - Day uint16 - Hour uint16 - Minute uint16 - Second uint16 - Milliseconds uint16 -} - -// http://msdn.microsoft.com/en-us/library/windows/desktop/ms644967(v=vs.85).aspx -type KBDLLHOOKSTRUCT struct { - VkCode DWORD - ScanCode DWORD - Flags DWORD - Time DWORD - DwExtraInfo ULONG_PTR -} - -type HOOKPROC func(int, WPARAM, LPARAM) LRESULT - -// https://msdn.microsoft.com/en-us/library/windows/desktop/ms633498(v=vs.85).aspx -type WNDENUMPROC func(HWND, LPARAM) LRESULT diff --git a/packages/w32/user32.go b/packages/w32/user32.go deleted file mode 100644 index 8286e894..00000000 --- a/packages/w32/user32.go +++ /dev/null @@ -1,1046 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "fmt" - "syscall" - "unsafe" -) - -var ( - moduser32 = syscall.NewLazyDLL("user32.dll") - - procRegisterClassEx = moduser32.NewProc("RegisterClassExW") - procLoadIcon = moduser32.NewProc("LoadIconW") - procLoadCursor = moduser32.NewProc("LoadCursorW") - procShowWindow = moduser32.NewProc("ShowWindow") - procUpdateWindow = moduser32.NewProc("UpdateWindow") - procCreateWindowEx = moduser32.NewProc("CreateWindowExW") - procAdjustWindowRect = moduser32.NewProc("AdjustWindowRect") - procAdjustWindowRectEx = moduser32.NewProc("AdjustWindowRectEx") - procDestroyWindow = moduser32.NewProc("DestroyWindow") - procDefWindowProc = moduser32.NewProc("DefWindowProcW") - procDefDlgProc = moduser32.NewProc("DefDlgProcW") - procPostQuitMessage = moduser32.NewProc("PostQuitMessage") - procGetMessage = moduser32.NewProc("GetMessageW") - procTranslateMessage = moduser32.NewProc("TranslateMessage") - procDispatchMessage = moduser32.NewProc("DispatchMessageW") - procSendMessage = moduser32.NewProc("SendMessageW") - procSendMessageTimeout = moduser32.NewProc("SendMessageTimeout") - procPostMessage = moduser32.NewProc("PostMessageW") - procWaitMessage = moduser32.NewProc("WaitMessage") - procSetWindowText = moduser32.NewProc("SetWindowTextW") - procGetWindowTextLength = moduser32.NewProc("GetWindowTextLengthW") - procGetWindowText = moduser32.NewProc("GetWindowTextW") - procGetWindowRect = moduser32.NewProc("GetWindowRect") - procMoveWindow = moduser32.NewProc("MoveWindow") - procScreenToClient = moduser32.NewProc("ScreenToClient") - procCallWindowProc = moduser32.NewProc("CallWindowProcW") - procSetWindowLong = moduser32.NewProc("SetWindowLongW") - procSetWindowLongPtr = moduser32.NewProc("SetWindowLongW") - procGetWindowLong = moduser32.NewProc("GetWindowLongW") - procGetWindowLongPtr = moduser32.NewProc("GetWindowLongW") - procEnableWindow = moduser32.NewProc("EnableWindow") - procIsWindowEnabled = moduser32.NewProc("IsWindowEnabled") - procIsWindowVisible = moduser32.NewProc("IsWindowVisible") - procSetFocus = moduser32.NewProc("SetFocus") - procInvalidateRect = moduser32.NewProc("InvalidateRect") - procGetClientRect = moduser32.NewProc("GetClientRect") - procGetDC = moduser32.NewProc("GetDC") - procReleaseDC = moduser32.NewProc("ReleaseDC") - procSetCapture = moduser32.NewProc("SetCapture") - procReleaseCapture = moduser32.NewProc("ReleaseCapture") - procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") - procMessageBox = moduser32.NewProc("MessageBoxW") - procGetSystemMetrics = moduser32.NewProc("GetSystemMetrics") - procCopyRect = moduser32.NewProc("CopyRect") - procEqualRect = moduser32.NewProc("EqualRect") - procInflateRect = moduser32.NewProc("InflateRect") - procIntersectRect = moduser32.NewProc("IntersectRect") - procIsRectEmpty = moduser32.NewProc("IsRectEmpty") - procOffsetRect = moduser32.NewProc("OffsetRect") - procPtInRect = moduser32.NewProc("PtInRect") - procSetRect = moduser32.NewProc("SetRect") - procSetRectEmpty = moduser32.NewProc("SetRectEmpty") - procSubtractRect = moduser32.NewProc("SubtractRect") - procUnionRect = moduser32.NewProc("UnionRect") - procCreateDialogParam = moduser32.NewProc("CreateDialogParamW") - procDialogBoxParam = moduser32.NewProc("DialogBoxParamW") - procGetDlgItem = moduser32.NewProc("GetDlgItem") - procDrawIcon = moduser32.NewProc("DrawIcon") - procClientToScreen = moduser32.NewProc("ClientToScreen") - procIsDialogMessage = moduser32.NewProc("IsDialogMessageW") - procIsWindow = moduser32.NewProc("IsWindow") - procEndDialog = moduser32.NewProc("EndDialog") - procPeekMessage = moduser32.NewProc("PeekMessageW") - procTranslateAccelerator = moduser32.NewProc("TranslateAcceleratorW") - procSetWindowPos = moduser32.NewProc("SetWindowPos") - procFillRect = moduser32.NewProc("FillRect") - procDrawText = moduser32.NewProc("DrawTextW") - procAddClipboardFormatListener = moduser32.NewProc("AddClipboardFormatListener") - procRemoveClipboardFormatListener = moduser32.NewProc("RemoveClipboardFormatListener") - procOpenClipboard = moduser32.NewProc("OpenClipboard") - procCloseClipboard = moduser32.NewProc("CloseClipboard") - procEnumClipboardFormats = moduser32.NewProc("EnumClipboardFormats") - procGetClipboardData = moduser32.NewProc("GetClipboardData") - procSetClipboardData = moduser32.NewProc("SetClipboardData") - procEmptyClipboard = moduser32.NewProc("EmptyClipboard") - procGetClipboardFormatName = moduser32.NewProc("GetClipboardFormatNameW") - procIsClipboardFormatAvailable = moduser32.NewProc("IsClipboardFormatAvailable") - procBeginPaint = moduser32.NewProc("BeginPaint") - procEndPaint = moduser32.NewProc("EndPaint") - procGetKeyboardState = moduser32.NewProc("GetKeyboardState") - procMapVirtualKey = moduser32.NewProc("MapVirtualKeyExW") - procGetAsyncKeyState = moduser32.NewProc("GetAsyncKeyState") - procToAscii = moduser32.NewProc("ToAscii") - procSwapMouseButton = moduser32.NewProc("SwapMouseButton") - procGetCursorPos = moduser32.NewProc("GetCursorPos") - procSetCursorPos = moduser32.NewProc("SetCursorPos") - procSetCursor = moduser32.NewProc("SetCursor") - procCreateIcon = moduser32.NewProc("CreateIcon") - procDestroyIcon = moduser32.NewProc("DestroyIcon") - procMonitorFromPoint = moduser32.NewProc("MonitorFromPoint") - procMonitorFromRect = moduser32.NewProc("MonitorFromRect") - procMonitorFromWindow = moduser32.NewProc("MonitorFromWindow") - procGetMonitorInfo = moduser32.NewProc("GetMonitorInfoW") - procEnumDisplayMonitors = moduser32.NewProc("EnumDisplayMonitors") - procEnumDisplaySettingsEx = moduser32.NewProc("EnumDisplaySettingsExW") - procChangeDisplaySettingsEx = moduser32.NewProc("ChangeDisplaySettingsExW") - procSendInput = moduser32.NewProc("SendInput") - procSetWindowsHookEx = moduser32.NewProc("SetWindowsHookExW") - procUnhookWindowsHookEx = moduser32.NewProc("UnhookWindowsHookEx") - procCallNextHookEx = moduser32.NewProc("CallNextHookEx") - procSetForegroundWindow = moduser32.NewProc("SetForegroundWindow") - procFindWindowW = moduser32.NewProc("FindWindowW") - procFindWindowExW = moduser32.NewProc("FindWindowExW") - procGetClassName = moduser32.NewProc("GetClassNameW") - procEnumChildWindows = moduser32.NewProc("EnumChildWindows") - procSetTimer = moduser32.NewProc("SetTimer") - procKillTimer = moduser32.NewProc("KillTimer") - procRedrawWindow = moduser32.NewProc("RedrawWindow") -) - -func RegisterClassEx(wndClassEx *WNDCLASSEX) ATOM { - ret, _, _ := procRegisterClassEx.Call(uintptr(unsafe.Pointer(wndClassEx))) - return ATOM(ret) -} - -func LoadIcon(instance HINSTANCE, iconName *uint16) HICON { - ret, _, _ := procLoadIcon.Call( - uintptr(instance), - uintptr(unsafe.Pointer(iconName))) - - return HICON(ret) - -} - -func LoadCursor(instance HINSTANCE, cursorName *uint16) HCURSOR { - ret, _, _ := procLoadCursor.Call( - uintptr(instance), - uintptr(unsafe.Pointer(cursorName))) - - return HCURSOR(ret) - -} - -func GetClassNameW(hwnd HWND) string { - buf := make([]uint16, 255) - procGetClassName.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(255)) - - return syscall.UTF16ToString(buf) -} - -func SetForegroundWindow(hwnd HWND) bool { - ret, _, _ := procSetForegroundWindow.Call( - uintptr(hwnd)) - - return ret != 0 -} - -func ShowWindow(hwnd HWND, cmdshow int) bool { - ret, _, _ := procShowWindow.Call( - uintptr(hwnd), - uintptr(cmdshow)) - - return ret != 0 - -} - -func UpdateWindow(hwnd HWND) bool { - ret, _, _ := procUpdateWindow.Call( - uintptr(hwnd)) - return ret != 0 -} - -func CreateWindowEx(exStyle uint, className, windowName *uint16, - style uint, x, y, width, height int, parent HWND, menu HMENU, - instance HINSTANCE, param unsafe.Pointer) HWND { - ret, _, _ := procCreateWindowEx.Call( - uintptr(exStyle), - uintptr(unsafe.Pointer(className)), - uintptr(unsafe.Pointer(windowName)), - uintptr(style), - uintptr(x), - uintptr(y), - uintptr(width), - uintptr(height), - uintptr(parent), - uintptr(menu), - uintptr(instance), - uintptr(param)) - - return HWND(ret) -} - -func FindWindowExW(hwndParent, hwndChildAfter HWND, className, windowName *uint16) HWND { - ret, _, _ := procFindWindowExW.Call( - uintptr(hwndParent), - uintptr(hwndChildAfter), - uintptr(unsafe.Pointer(className)), - uintptr(unsafe.Pointer(windowName))) - - return HWND(ret) -} - -func FindWindowW(className, windowName *uint16) HWND { - ret, _, _ := procFindWindowW.Call( - uintptr(unsafe.Pointer(className)), - uintptr(unsafe.Pointer(windowName))) - - return HWND(ret) -} - -func EnumChildWindows(hWndParent HWND, lpEnumFunc WNDENUMPROC, lParam LPARAM) bool { - ret, _, _ := procEnumChildWindows.Call( - uintptr(hWndParent), - uintptr(syscall.NewCallback(lpEnumFunc)), - uintptr(lParam), - ) - - return ret != 0 -} - -func AdjustWindowRectEx(rect *RECT, style uint, menu bool, exStyle uint) bool { - ret, _, _ := procAdjustWindowRectEx.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(style), - uintptr(BoolToBOOL(menu)), - uintptr(exStyle)) - - return ret != 0 -} - -func AdjustWindowRect(rect *RECT, style uint, menu bool) bool { - ret, _, _ := procAdjustWindowRect.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(style), - uintptr(BoolToBOOL(menu))) - - return ret != 0 -} - -func DestroyWindow(hwnd HWND) bool { - ret, _, _ := procDestroyWindow.Call( - uintptr(hwnd)) - - return ret != 0 -} - -func DefWindowProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr { - ret, _, _ := procDefWindowProc.Call( - uintptr(hwnd), - uintptr(msg), - wParam, - lParam) - - return ret -} - -func DefDlgProc(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr { - ret, _, _ := procDefDlgProc.Call( - uintptr(hwnd), - uintptr(msg), - wParam, - lParam) - - return ret -} - -func PostQuitMessage(exitCode int) { - procPostQuitMessage.Call( - uintptr(exitCode)) -} - -func GetMessage(msg *MSG, hwnd HWND, msgFilterMin, msgFilterMax uint32) int { - ret, _, _ := procGetMessage.Call( - uintptr(unsafe.Pointer(msg)), - uintptr(hwnd), - uintptr(msgFilterMin), - uintptr(msgFilterMax)) - - return int(ret) -} - -func TranslateMessage(msg *MSG) bool { - ret, _, _ := procTranslateMessage.Call( - uintptr(unsafe.Pointer(msg))) - - return ret != 0 - -} - -func DispatchMessage(msg *MSG) uintptr { - ret, _, _ := procDispatchMessage.Call( - uintptr(unsafe.Pointer(msg))) - - return ret - -} - -func SendMessage(hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr { - ret, _, _ := procSendMessage.Call( - uintptr(hwnd), - uintptr(msg), - wParam, - lParam) - - return ret -} - -func SendMessageTimeout(hwnd HWND, msg uint32, wParam, lParam uintptr, fuFlags, uTimeout uint32) uintptr { - ret, _, _ := procSendMessageTimeout.Call( - uintptr(hwnd), - uintptr(msg), - wParam, - lParam, - uintptr(fuFlags), - uintptr(uTimeout)) - - return ret -} - -func PostMessage(hwnd HWND, msg uint32, wParam, lParam uintptr) bool { - ret, _, _ := procPostMessage.Call( - uintptr(hwnd), - uintptr(msg), - wParam, - lParam) - - return ret != 0 -} - -func WaitMessage() bool { - ret, _, _ := procWaitMessage.Call() - return ret != 0 -} - -func SetWindowText(hwnd HWND, text string) { - procSetWindowText.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text)))) -} - -func GetWindowTextLength(hwnd HWND) int { - ret, _, _ := procGetWindowTextLength.Call( - uintptr(hwnd)) - - return int(ret) -} - -func GetWindowText(hwnd HWND) string { - textLen := GetWindowTextLength(hwnd) + 1 - - buf := make([]uint16, textLen) - procGetWindowText.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(textLen)) - - return syscall.UTF16ToString(buf) -} - -func GetWindowRect(hwnd HWND) *RECT { - var rect RECT - procGetWindowRect.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&rect))) - - return &rect -} - -func MoveWindow(hwnd HWND, x, y, width, height int, repaint bool) bool { - ret, _, _ := procMoveWindow.Call( - uintptr(hwnd), - uintptr(x), - uintptr(y), - uintptr(width), - uintptr(height), - uintptr(BoolToBOOL(repaint))) - - return ret != 0 - -} - -func ScreenToClient(hwnd HWND, x, y int) (X, Y int, ok bool) { - pt := POINT{X: int32(x), Y: int32(y)} - ret, _, _ := procScreenToClient.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&pt))) - - return int(pt.X), int(pt.Y), ret != 0 -} - -func CallWindowProc(preWndProc uintptr, hwnd HWND, msg uint32, wParam, lParam uintptr) uintptr { - ret, _, _ := procCallWindowProc.Call( - preWndProc, - uintptr(hwnd), - uintptr(msg), - wParam, - lParam) - - return ret -} - -func SetWindowLong(hwnd HWND, index int, value uint32) uint32 { - ret, _, _ := procSetWindowLong.Call( - uintptr(hwnd), - uintptr(index), - uintptr(value)) - - return uint32(ret) -} - -func SetWindowLongPtr(hwnd HWND, index int, value uintptr) uintptr { - ret, _, _ := procSetWindowLongPtr.Call( - uintptr(hwnd), - uintptr(index), - value) - - return ret -} - -func GetWindowLong(hwnd HWND, index int) int32 { - ret, _, _ := procGetWindowLong.Call( - uintptr(hwnd), - uintptr(index)) - - return int32(ret) -} - -func GetWindowLongPtr(hwnd HWND, index int) uintptr { - ret, _, _ := procGetWindowLongPtr.Call( - uintptr(hwnd), - uintptr(index)) - - return ret -} - -func EnableWindow(hwnd HWND, b bool) bool { - ret, _, _ := procEnableWindow.Call( - uintptr(hwnd), - uintptr(BoolToBOOL(b))) - return ret != 0 -} - -func IsWindowEnabled(hwnd HWND) bool { - ret, _, _ := procIsWindowEnabled.Call( - uintptr(hwnd)) - - return ret != 0 -} - -func IsWindowVisible(hwnd HWND) bool { - ret, _, _ := procIsWindowVisible.Call( - uintptr(hwnd)) - - return ret != 0 -} - -func SetFocus(hwnd HWND) HWND { - ret, _, _ := procSetFocus.Call( - uintptr(hwnd)) - - return HWND(ret) -} - -func InvalidateRect(hwnd HWND, rect *RECT, erase bool) bool { - ret, _, _ := procInvalidateRect.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(rect)), - uintptr(BoolToBOOL(erase))) - - return ret != 0 -} - -func GetClientRect(hwnd HWND) *RECT { - var rect RECT - ret, _, _ := procGetClientRect.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&rect))) - - if ret == 0 { - panic(fmt.Sprintf("GetClientRect(%d) failed", hwnd)) - } - - return &rect -} - -func GetDC(hwnd HWND) HDC { - ret, _, _ := procGetDC.Call( - uintptr(hwnd)) - - return HDC(ret) -} - -func ReleaseDC(hwnd HWND, hDC HDC) bool { - ret, _, _ := procReleaseDC.Call( - uintptr(hwnd), - uintptr(hDC)) - - return ret != 0 -} - -func SetCapture(hwnd HWND) HWND { - ret, _, _ := procSetCapture.Call( - uintptr(hwnd)) - - return HWND(ret) -} - -func ReleaseCapture() bool { - ret, _, _ := procReleaseCapture.Call() - - return ret != 0 -} - -func GetWindowThreadProcessId(hwnd HWND) (HANDLE, int) { - var processId int - ret, _, _ := procGetWindowThreadProcessId.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&processId))) - - return HANDLE(ret), processId -} - -func MessageBox(hwnd HWND, title, caption string, flags uint) int { - ret, _, _ := procMessageBox.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(title))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))), - uintptr(flags)) - - return int(ret) -} - -func GetSystemMetrics(index int) int { - ret, _, _ := procGetSystemMetrics.Call( - uintptr(index)) - - return int(ret) -} - -func CopyRect(dst, src *RECT) bool { - ret, _, _ := procCopyRect.Call( - uintptr(unsafe.Pointer(dst)), - uintptr(unsafe.Pointer(src))) - - return ret != 0 -} - -func EqualRect(rect1, rect2 *RECT) bool { - ret, _, _ := procEqualRect.Call( - uintptr(unsafe.Pointer(rect1)), - uintptr(unsafe.Pointer(rect2))) - - return ret != 0 -} - -func InflateRect(rect *RECT, dx, dy int) bool { - ret, _, _ := procInflateRect.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(dx), - uintptr(dy)) - - return ret != 0 -} - -func IntersectRect(dst, src1, src2 *RECT) bool { - ret, _, _ := procIntersectRect.Call( - uintptr(unsafe.Pointer(dst)), - uintptr(unsafe.Pointer(src1)), - uintptr(unsafe.Pointer(src2))) - - return ret != 0 -} - -func IsRectEmpty(rect *RECT) bool { - ret, _, _ := procIsRectEmpty.Call( - uintptr(unsafe.Pointer(rect))) - - return ret != 0 -} - -func OffsetRect(rect *RECT, dx, dy int) bool { - ret, _, _ := procOffsetRect.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(dx), - uintptr(dy)) - - return ret != 0 -} - -func PtInRect(rect *RECT, x, y int) bool { - pt := POINT{X: int32(x), Y: int32(y)} - ret, _, _ := procPtInRect.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(unsafe.Pointer(&pt))) - - return ret != 0 -} - -func SetRect(rect *RECT, left, top, right, bottom int) bool { - ret, _, _ := procSetRect.Call( - uintptr(unsafe.Pointer(rect)), - uintptr(left), - uintptr(top), - uintptr(right), - uintptr(bottom)) - - return ret != 0 -} - -func SetRectEmpty(rect *RECT) bool { - ret, _, _ := procSetRectEmpty.Call( - uintptr(unsafe.Pointer(rect))) - - return ret != 0 -} - -func SubtractRect(dst, src1, src2 *RECT) bool { - ret, _, _ := procSubtractRect.Call( - uintptr(unsafe.Pointer(dst)), - uintptr(unsafe.Pointer(src1)), - uintptr(unsafe.Pointer(src2))) - - return ret != 0 -} - -func UnionRect(dst, src1, src2 *RECT) bool { - ret, _, _ := procUnionRect.Call( - uintptr(unsafe.Pointer(dst)), - uintptr(unsafe.Pointer(src1)), - uintptr(unsafe.Pointer(src2))) - - return ret != 0 -} - -func CreateDialog(hInstance HINSTANCE, lpTemplate *uint16, hWndParent HWND, lpDialogProc uintptr) HWND { - ret, _, _ := procCreateDialogParam.Call( - uintptr(hInstance), - uintptr(unsafe.Pointer(lpTemplate)), - uintptr(hWndParent), - lpDialogProc, - 0) - - return HWND(ret) -} - -func DialogBox(hInstance HINSTANCE, lpTemplateName *uint16, hWndParent HWND, lpDialogProc uintptr) int { - ret, _, _ := procDialogBoxParam.Call( - uintptr(hInstance), - uintptr(unsafe.Pointer(lpTemplateName)), - uintptr(hWndParent), - lpDialogProc, - 0) - - return int(ret) -} - -func GetDlgItem(hDlg HWND, nIDDlgItem int) HWND { - ret, _, _ := procGetDlgItem.Call( - uintptr(unsafe.Pointer(hDlg)), - uintptr(nIDDlgItem)) - - return HWND(ret) -} - -func DrawIcon(hDC HDC, x, y int, hIcon HICON) bool { - ret, _, _ := procDrawIcon.Call( - uintptr(unsafe.Pointer(hDC)), - uintptr(x), - uintptr(y), - uintptr(unsafe.Pointer(hIcon))) - - return ret != 0 -} - -func ClientToScreen(hwnd HWND, x, y int) (int, int) { - pt := POINT{X: int32(x), Y: int32(y)} - - procClientToScreen.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(&pt))) - - return int(pt.X), int(pt.Y) -} - -func IsDialogMessage(hwnd HWND, msg *MSG) bool { - ret, _, _ := procIsDialogMessage.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(msg))) - - return ret != 0 -} - -func IsWindow(hwnd HWND) bool { - ret, _, _ := procIsWindow.Call( - uintptr(hwnd)) - - return ret != 0 -} - -func EndDialog(hwnd HWND, nResult uintptr) bool { - ret, _, _ := procEndDialog.Call( - uintptr(hwnd), - nResult) - - return ret != 0 -} - -func PeekMessage(lpMsg *MSG, hwnd HWND, wMsgFilterMin, wMsgFilterMax, wRemoveMsg uint32) bool { - ret, _, _ := procPeekMessage.Call( - uintptr(unsafe.Pointer(lpMsg)), - uintptr(hwnd), - uintptr(wMsgFilterMin), - uintptr(wMsgFilterMax), - uintptr(wRemoveMsg)) - - return ret != 0 -} - -func TranslateAccelerator(hwnd HWND, hAccTable HACCEL, lpMsg *MSG) bool { - ret, _, _ := procTranslateAccelerator.Call( - uintptr(hwnd), - uintptr(hAccTable), - uintptr(unsafe.Pointer(lpMsg))) - - return ret != 0 -} - -func SetWindowPos(hwnd, hWndInsertAfter HWND, x, y, cx, cy int, uFlags uint) bool { - ret, _, _ := procSetWindowPos.Call( - uintptr(hwnd), - uintptr(hWndInsertAfter), - uintptr(x), - uintptr(y), - uintptr(cx), - uintptr(cy), - uintptr(uFlags)) - - return ret != 0 -} - -func FillRect(hDC HDC, lprc *RECT, hbr HBRUSH) bool { - ret, _, _ := procFillRect.Call( - uintptr(hDC), - uintptr(unsafe.Pointer(lprc)), - uintptr(hbr)) - - return ret != 0 -} - -func DrawText(hDC HDC, text string, uCount int, lpRect *RECT, uFormat uint) int { - ret, _, _ := procDrawText.Call( - uintptr(hDC), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text))), - uintptr(uCount), - uintptr(unsafe.Pointer(lpRect)), - uintptr(uFormat)) - - return int(ret) -} - -func AddClipboardFormatListener(hwnd HWND) bool { - ret, _, _ := procAddClipboardFormatListener.Call( - uintptr(hwnd)) - return ret != 0 -} - -func RemoveClipboardFormatListener(hwnd HWND) bool { - ret, _, _ := procRemoveClipboardFormatListener.Call( - uintptr(hwnd)) - return ret != 0 -} - -func OpenClipboard(hWndNewOwner HWND) bool { - ret, _, _ := procOpenClipboard.Call( - uintptr(hWndNewOwner)) - return ret != 0 -} - -func CloseClipboard() bool { - ret, _, _ := procCloseClipboard.Call() - return ret != 0 -} - -func EnumClipboardFormats(format uint) uint { - ret, _, _ := procEnumClipboardFormats.Call( - uintptr(format)) - return uint(ret) -} - -func GetClipboardData(uFormat uint) HANDLE { - ret, _, _ := procGetClipboardData.Call( - uintptr(uFormat)) - return HANDLE(ret) -} - -func SetClipboardData(uFormat uint, hMem HANDLE) HANDLE { - ret, _, _ := procSetClipboardData.Call( - uintptr(uFormat), - uintptr(hMem)) - return HANDLE(ret) -} - -func EmptyClipboard() bool { - ret, _, _ := procEmptyClipboard.Call() - return ret != 0 -} - -func GetClipboardFormatName(format uint) (string, bool) { - cchMaxCount := 255 - buf := make([]uint16, cchMaxCount) - ret, _, _ := procGetClipboardFormatName.Call( - uintptr(format), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(cchMaxCount)) - - if ret > 0 { - return syscall.UTF16ToString(buf), true - } - - return "Requested format does not exist or is predefined", false -} - -func IsClipboardFormatAvailable(format uint) bool { - ret, _, _ := procIsClipboardFormatAvailable.Call(uintptr(format)) - return ret != 0 -} - -func BeginPaint(hwnd HWND, paint *PAINTSTRUCT) HDC { - ret, _, _ := procBeginPaint.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(paint))) - return HDC(ret) -} - -func EndPaint(hwnd HWND, paint *PAINTSTRUCT) { - procEndPaint.Call( - uintptr(hwnd), - uintptr(unsafe.Pointer(paint))) -} - -func GetKeyboardState(lpKeyState *[]byte) bool { - ret, _, _ := procGetKeyboardState.Call( - uintptr(unsafe.Pointer(&(*lpKeyState)[0]))) - return ret != 0 -} - -func MapVirtualKeyEx(uCode, uMapType uint, dwhkl HKL) uint { - ret, _, _ := procMapVirtualKey.Call( - uintptr(uCode), - uintptr(uMapType), - uintptr(dwhkl)) - return uint(ret) -} - -func GetAsyncKeyState(vKey int) uint16 { - ret, _, _ := procGetAsyncKeyState.Call(uintptr(vKey)) - return uint16(ret) -} - -func ToAscii(uVirtKey, uScanCode uint, lpKeyState *byte, lpChar *uint16, uFlags uint) int { - ret, _, _ := procToAscii.Call( - uintptr(uVirtKey), - uintptr(uScanCode), - uintptr(unsafe.Pointer(lpKeyState)), - uintptr(unsafe.Pointer(lpChar)), - uintptr(uFlags)) - return int(ret) -} - -func SwapMouseButton(fSwap bool) bool { - ret, _, _ := procSwapMouseButton.Call( - uintptr(BoolToBOOL(fSwap))) - return ret != 0 -} - -func GetCursorPos() (x, y int, ok bool) { - pt := POINT{} - ret, _, _ := procGetCursorPos.Call(uintptr(unsafe.Pointer(&pt))) - return int(pt.X), int(pt.Y), ret != 0 -} - -func SetCursorPos(x, y int) bool { - ret, _, _ := procSetCursorPos.Call( - uintptr(x), - uintptr(y), - ) - return ret != 0 -} - -func SetCursor(cursor HCURSOR) HCURSOR { - ret, _, _ := procSetCursor.Call( - uintptr(cursor), - ) - return HCURSOR(ret) -} - -func CreateIcon(instance HINSTANCE, nWidth, nHeight int, cPlanes, cBitsPerPixel byte, ANDbits, XORbits *byte) HICON { - ret, _, _ := procCreateIcon.Call( - uintptr(instance), - uintptr(nWidth), - uintptr(nHeight), - uintptr(cPlanes), - uintptr(cBitsPerPixel), - uintptr(unsafe.Pointer(ANDbits)), - uintptr(unsafe.Pointer(XORbits)), - ) - return HICON(ret) -} - -func DestroyIcon(icon HICON) bool { - ret, _, _ := procDestroyIcon.Call( - uintptr(icon), - ) - return ret != 0 -} - -func MonitorFromPoint(x, y int, dwFlags uint32) HMONITOR { - ret, _, _ := procMonitorFromPoint.Call( - uintptr(x), - uintptr(y), - uintptr(dwFlags), - ) - return HMONITOR(ret) -} - -func MonitorFromRect(rc *RECT, dwFlags uint32) HMONITOR { - ret, _, _ := procMonitorFromRect.Call( - uintptr(unsafe.Pointer(rc)), - uintptr(dwFlags), - ) - return HMONITOR(ret) -} - -func MonitorFromWindow(hwnd HWND, dwFlags uint32) HMONITOR { - ret, _, _ := procMonitorFromWindow.Call( - uintptr(hwnd), - uintptr(dwFlags), - ) - return HMONITOR(ret) -} - -func GetMonitorInfo(hMonitor HMONITOR, lmpi *MONITORINFO) bool { - ret, _, _ := procGetMonitorInfo.Call( - uintptr(hMonitor), - uintptr(unsafe.Pointer(lmpi)), - ) - return ret != 0 -} - -func EnumDisplayMonitors(hdc HDC, clip *RECT, fnEnum, dwData uintptr) bool { - ret, _, _ := procEnumDisplayMonitors.Call( - uintptr(hdc), - uintptr(unsafe.Pointer(clip)), - fnEnum, - dwData, - ) - return ret != 0 -} - -func EnumDisplaySettingsEx(szDeviceName *uint16, iModeNum uint32, devMode *DEVMODE, dwFlags uint32) bool { - ret, _, _ := procEnumDisplaySettingsEx.Call( - uintptr(unsafe.Pointer(szDeviceName)), - uintptr(iModeNum), - uintptr(unsafe.Pointer(devMode)), - uintptr(dwFlags), - ) - return ret != 0 -} - -func ChangeDisplaySettingsEx(szDeviceName *uint16, devMode *DEVMODE, hwnd HWND, dwFlags uint32, lParam uintptr) int32 { - ret, _, _ := procChangeDisplaySettingsEx.Call( - uintptr(unsafe.Pointer(szDeviceName)), - uintptr(unsafe.Pointer(devMode)), - uintptr(hwnd), - uintptr(dwFlags), - lParam, - ) - return int32(ret) -} - -func SetWindowsHookEx(idHook int, lpfn HOOKPROC, hMod HINSTANCE, dwThreadId DWORD) HHOOK { - ret, _, _ := procSetWindowsHookEx.Call( - uintptr(idHook), - uintptr(syscall.NewCallback(lpfn)), - uintptr(hMod), - uintptr(dwThreadId), - ) - return HHOOK(ret) -} - -func UnhookWindowsHookEx(hhk HHOOK) bool { - ret, _, _ := procUnhookWindowsHookEx.Call( - uintptr(hhk), - ) - return ret != 0 -} - -func CallNextHookEx(hhk HHOOK, nCode int, wParam WPARAM, lParam LPARAM) LRESULT { - ret, _, _ := procCallNextHookEx.Call( - uintptr(hhk), - uintptr(nCode), - uintptr(wParam), - uintptr(lParam), - ) - return LRESULT(ret) -} - -func SetTimer(hwnd HWND, nIDEvent uint32, uElapse uint32, lpTimerProc uintptr) uintptr { - ret, _, _ := procSetTimer.Call( - uintptr(hwnd), - uintptr(nIDEvent), - uintptr(uElapse), - lpTimerProc, - ) - return ret -} - -func KillTimer(hwnd HWND, nIDEvent uint32) bool { - ret, _, _ := procKillTimer.Call( - uintptr(hwnd), - uintptr(nIDEvent), - ) - return ret != 0 -} - -// it will panic when the function fails -func RedrawWindow(hWnd HWND, lpRect *RECT, hrgnUpdate HRGN, flag uint32) { - ret, _, _ := procRedrawWindow.Call( - uintptr(hWnd), - uintptr(unsafe.Pointer(lpRect)), - uintptr(hrgnUpdate), - uintptr(flag), - ) - if ret!=0{ - panic("RedrawWindow fail") - } - return -} \ No newline at end of file diff --git a/packages/w32/utils.go b/packages/w32/utils.go deleted file mode 100644 index 4fb5b6c2..00000000 --- a/packages/w32/utils.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -import ( - "syscall" - "unicode/utf16" - "unsafe" -) - -func MakeIntResource(id uint16) *uint16 { - return (*uint16)(unsafe.Pointer(uintptr(id))) -} - -func LOWORD(dw uint32) uint16 { - return uint16(dw) -} - -func HIWORD(dw uint32) uint16 { - return uint16(dw >> 16 & 0xffff) -} - -func BoolToBOOL(value bool) BOOL { - if value { - return 1 - } - - return 0 -} - -func UTF16PtrToString(cstr *uint16) string { - if cstr != nil { - us := make([]uint16, 0, 256) - for p := uintptr(unsafe.Pointer(cstr)); ; p += 2 { - u := *(*uint16)(unsafe.Pointer(p)) - if u == 0 { - return string(utf16.Decode(us)) - } - us = append(us, u) - } - } - - return "" -} - -func ComAddRef(unknown *IUnknown) int32 { - ret, _, _ := syscall.Syscall(unknown.lpVtbl.pAddRef, 1, - uintptr(unsafe.Pointer(unknown)), - 0, - 0) - return int32(ret) -} - -func ComRelease(unknown *IUnknown) int32 { - ret, _, _ := syscall.Syscall(unknown.lpVtbl.pRelease, 1, - uintptr(unsafe.Pointer(unknown)), - 0, - 0) - return int32(ret) -} - -func ComQueryInterface(unknown *IUnknown, id *GUID) *IDispatch { - var disp *IDispatch - hr, _, _ := syscall.Syscall(unknown.lpVtbl.pQueryInterface, 3, - uintptr(unsafe.Pointer(unknown)), - uintptr(unsafe.Pointer(id)), - uintptr(unsafe.Pointer(&disp))) - if hr != 0 { - panic("Invoke QieryInterface error.") - } - return disp -} - -func ComGetIDsOfName(disp *IDispatch, names []string) []int32 { - wnames := make([]*uint16, len(names)) - dispid := make([]int32, len(names)) - for i := 0; i < len(names); i++ { - wnames[i] = syscall.StringToUTF16Ptr(names[i]) - } - hr, _, _ := syscall.Syscall6(disp.lpVtbl.pGetIDsOfNames, 6, - uintptr(unsafe.Pointer(disp)), - uintptr(unsafe.Pointer(IID_NULL)), - uintptr(unsafe.Pointer(&wnames[0])), - uintptr(len(names)), - uintptr(GetUserDefaultLCID()), - uintptr(unsafe.Pointer(&dispid[0]))) - if hr != 0 { - panic("Invoke GetIDsOfName error.") - } - return dispid -} - -func ComInvoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (result *VARIANT) { - var dispparams DISPPARAMS - - if dispatch&DISPATCH_PROPERTYPUT != 0 { - dispnames := [1]int32{DISPID_PROPERTYPUT} - dispparams.RgdispidNamedArgs = uintptr(unsafe.Pointer(&dispnames[0])) - dispparams.CNamedArgs = 1 - } - var vargs []VARIANT - if len(params) > 0 { - vargs = make([]VARIANT, len(params)) - for i, v := range params { - //n := len(params)-i-1 - n := len(params) - i - 1 - VariantInit(&vargs[n]) - switch v.(type) { - case bool: - if v.(bool) { - vargs[n] = VARIANT{VT_BOOL, 0, 0, 0, 0xffff} - } else { - vargs[n] = VARIANT{VT_BOOL, 0, 0, 0, 0} - } - case *bool: - vargs[n] = VARIANT{VT_BOOL | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*bool))))} - case byte: - vargs[n] = VARIANT{VT_I1, 0, 0, 0, int64(v.(byte))} - case *byte: - vargs[n] = VARIANT{VT_I1 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*byte))))} - case int16: - vargs[n] = VARIANT{VT_I2, 0, 0, 0, int64(v.(int16))} - case *int16: - vargs[n] = VARIANT{VT_I2 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*int16))))} - case uint16: - vargs[n] = VARIANT{VT_UI2, 0, 0, 0, int64(v.(int16))} - case *uint16: - vargs[n] = VARIANT{VT_UI2 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*uint16))))} - case int, int32: - vargs[n] = VARIANT{VT_UI4, 0, 0, 0, int64(v.(int))} - case *int, *int32: - vargs[n] = VARIANT{VT_I4 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*int))))} - case uint, uint32: - vargs[n] = VARIANT{VT_UI4, 0, 0, 0, int64(v.(uint))} - case *uint, *uint32: - vargs[n] = VARIANT{VT_UI4 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*uint))))} - case int64: - vargs[n] = VARIANT{VT_I8, 0, 0, 0, v.(int64)} - case *int64: - vargs[n] = VARIANT{VT_I8 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*int64))))} - case uint64: - vargs[n] = VARIANT{VT_UI8, 0, 0, 0, int64(v.(uint64))} - case *uint64: - vargs[n] = VARIANT{VT_UI8 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*uint64))))} - case float32: - vargs[n] = VARIANT{VT_R4, 0, 0, 0, int64(v.(float32))} - case *float32: - vargs[n] = VARIANT{VT_R4 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*float32))))} - case float64: - vargs[n] = VARIANT{VT_R8, 0, 0, 0, int64(v.(float64))} - case *float64: - vargs[n] = VARIANT{VT_R8 | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*float64))))} - case string: - vargs[n] = VARIANT{VT_BSTR, 0, 0, 0, int64(uintptr(unsafe.Pointer(SysAllocString(v.(string)))))} - case *string: - vargs[n] = VARIANT{VT_BSTR | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*string))))} - case *IDispatch: - vargs[n] = VARIANT{VT_DISPATCH, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*IDispatch))))} - case **IDispatch: - vargs[n] = VARIANT{VT_DISPATCH | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(**IDispatch))))} - case nil: - vargs[n] = VARIANT{VT_NULL, 0, 0, 0, 0} - case *VARIANT: - vargs[n] = VARIANT{VT_VARIANT | VT_BYREF, 0, 0, 0, int64(uintptr(unsafe.Pointer(v.(*VARIANT))))} - default: - panic("unknown type") - } - } - dispparams.Rgvarg = uintptr(unsafe.Pointer(&vargs[0])) - dispparams.CArgs = uint32(len(params)) - } - - var ret VARIANT - var excepInfo EXCEPINFO - VariantInit(&ret) - hr, _, _ := syscall.Syscall9(disp.lpVtbl.pInvoke, 8, - uintptr(unsafe.Pointer(disp)), - uintptr(dispid), - uintptr(unsafe.Pointer(IID_NULL)), - uintptr(GetUserDefaultLCID()), - uintptr(dispatch), - uintptr(unsafe.Pointer(&dispparams)), - uintptr(unsafe.Pointer(&ret)), - uintptr(unsafe.Pointer(&excepInfo)), - 0) - if hr != 0 { - if excepInfo.BstrDescription != nil { - bs := UTF16PtrToString(excepInfo.BstrDescription) - panic(bs) - } - } - for _, varg := range vargs { - if varg.VT == VT_BSTR && varg.Val != 0 { - SysFreeString(((*int16)(unsafe.Pointer(uintptr(varg.Val))))) - } - } - result = &ret - return -} diff --git a/packages/w32/vars.go b/packages/w32/vars.go deleted file mode 100644 index 2dab2e39..00000000 --- a/packages/w32/vars.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2010-2012 The W32 Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package w32 - -var ( - IID_NULL = &GUID{0x00000000, 0x0000, 0x0000, [8]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} - IID_IUnknown = &GUID{0x00000000, 0x0000, 0x0000, [8]byte{0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}} - IID_IDispatch = &GUID{0x00020400, 0x0000, 0x0000, [8]byte{0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}} - IID_IConnectionPointContainer = &GUID{0xB196B284, 0xBAB4, 0x101A, [8]byte{0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07}} - IID_IConnectionPoint = &GUID{0xB196B286, 0xBAB4, 0x101A, [8]byte{0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07}} -) From ece6355dfc04341ac3578f59f07583072b3fc39d Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 5 Jun 2020 13:05:43 +0200 Subject: [PATCH 025/174] [pkg] xbuild tweaks Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitmask.pro b/bitmask.pro index 6abb8d17..dd6c5af6 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -5,6 +5,7 @@ CONFIG += qt staticlib windows:CONFIG += console unix:DEBUG:CONFIG += debug lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") +QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 # trying to optimize size of the static binary. # probably more can be shaved off with some patience @@ -34,7 +35,7 @@ lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") #QTPLUGIN.QTcpServerConnectionFactory =- #QTPLUGIN.QGenericEnginePlugin =- -QT += qml quick +QT += qml quick widgets SOURCES += \ gui/main.cpp \ From 304f4451a7c33df14d616bd8ae3348626cfd046a Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 5 Jun 2020 13:06:39 +0200 Subject: [PATCH 026/174] [bug] systray pain and vodoo Signed-off-by: kali kaneko (leap communications) --- gui/main.cpp | 6 +++--- gui/qml/main.qml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gui/main.cpp b/gui/main.cpp index 3e967612..e6e9bb86 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -71,8 +71,8 @@ int main(int argc, char **argv) { exit(0); } - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QGuiApplication app(argc, argv); + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; QQmlContext *ctx = engine.rootContext(); diff --git a/gui/qml/main.qml b/gui/qml/main.qml index b601f407..daf8150a 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -24,7 +24,9 @@ ApplicationWindow { We can still use this quirk, and can use the AppWindow with deferred Loaders as a placeholder for all the many dialogs, or to load a nice splash screen etc... */ + app.visible = true; + show(); hide(); } @@ -65,6 +67,7 @@ ApplicationWindow { icon.source = icons["off"] tooltip = qsTr("Checking status...") console.debug("systray init completed") + hide(); show(); } From 181bfd6d4eb6c06e9627dd89d0cf93c21913cfd6 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 5 Jun 2020 20:00:16 +0200 Subject: [PATCH 027/174] [pkg] add needed framework for osx Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitmask.pro b/bitmask.pro index dd6c5af6..28119a7e 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -7,6 +7,10 @@ unix:DEBUG:CONFIG += debug lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 +macx { + LIBS += -framework Security +} + # trying to optimize size of the static binary. # probably more can be shaved off with some patience # You need to recompile your version of Qt to use the libraries you want. The From 12c936be8df02dcb383b0f66c0790bdfbfb809c3 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 11 Jun 2020 13:53:27 +0200 Subject: [PATCH 028/174] [refactor] use ioutil.TempFile Signed-off-by: kali kaneko (leap communications) --- pkg/pickle/helpers.go | 64 +++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/pkg/pickle/helpers.go b/pkg/pickle/helpers.go index ec034d35..69d0e878 100644 --- a/pkg/pickle/helpers.go +++ b/pkg/pickle/helpers.go @@ -21,10 +21,9 @@ import ( "fmt" "io/ioutil" "log" - "math/rand" "os" "os/exec" - "time" + "runtime" _ "0xacab.org/leap/bitmask-vpn/pkg/pickle/statik" "github.com/rakyll/statik/fs" @@ -36,16 +35,6 @@ const ( policyFile = "/usr/share/polkit-1/actions/se.leap.bitmask.riseupvpn.policy" ) -var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") - -func randSeq(n int) string { - b := make([]rune, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] - } - return string(b) -} - func check(e error) { if e != nil { panic(e) @@ -59,25 +48,41 @@ func alreadyThere(path string) bool { return false } +func isRoot() bool { + uid := os.Getuid() + return uid == 0 +} + func copyAsRoot(orig, dest string, isExec bool) { if alreadyThere(dest) { fmt.Println("> File exists: ", dest) return } - var confirm string - fmt.Println("> About to write (as root):", dest) - fmt.Printf("> Continue? [y/N] ") - fmt.Scanln(&confirm) - if confirm != "y" { - fmt.Println("aborting") - os.Exit(1) + + cmd := exec.Command("false") + if isRoot() { + cmd = exec.Command("cp", orig, dest) + } else { + var confirm string + fmt.Println("> About to write (with sudo):", dest) + fmt.Printf("> ok? [y/N] ") + fmt.Scanln(&confirm) + if confirm != "y" { + fmt.Println("aborting") + os.Exit(1) + } + cmd = exec.Command("sudo", "cp", orig, dest) } - cmd := exec.Command("sudo", "cp", orig, dest) + err := cmd.Run() check(err) if isExec { - cmd = exec.Command("sudo", "chmod", "776", dest) + if isRoot() { + cmd = exec.Command("chmod", "776", dest) + } else { + cmd = exec.Command("sudo", "chmod", "776", dest) + } err = cmd.Run() check(err) } @@ -85,9 +90,12 @@ func copyAsRoot(orig, dest string, isExec bool) { fmt.Println("> done") } -/* dumpHelper works in linux only at the moment. - TODO should separate implementations by platform */ func dumpHelper(fname, dest string, isExec bool) { + // TODO win/mac implementation + if runtime.GOOS != "linux" { + fmt.Println("Only linux supported for now") + return + } stFS, err := fs.New() if err != nil { log.Fatal(err) @@ -103,19 +111,17 @@ func dumpHelper(fname, dest string, isExec bool) { if err != nil { log.Fatal(err) } - tmp := "/dev/shm/" + randSeq(14) - f, err := os.Create(tmp) + tmpfile, err := ioutil.TempFile("/dev/shm", "*") check(err) - defer os.Remove(tmp) + defer os.Remove(tmpfile.Name()) - _, err = f.Write(c) + _, err = tmpfile.Write(c) check(err) - copyAsRoot(tmp, dest, isExec) + copyAsRoot(tmpfile.Name(), dest, isExec) } func InstallHelpers() { - rand.Seed(time.Now().UnixNano()) dumpHelper("bitmask-root", bitmaskRoot, true) dumpHelper("se.leap.bitmask.policy", policyFile, false) } From 94d1e97beaf9a45767280fa454058e214d6fa993 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 11 Jun 2020 19:49:37 +0200 Subject: [PATCH 029/174] [refactor] remove unneeded cruft Signed-off-by: kali kaneko (leap communications) --- gui/main.cpp | 54 ++++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/gui/main.cpp b/gui/main.cpp index e6e9bb86..c55b538b 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,8 +1,9 @@ #include -#include -#include +#include #include #include +#include +#include #include #include "handlers.h" @@ -13,45 +14,15 @@ from blockbusters like "here be dragons" and "darling, I wrote a little contraption". */ -/* Our glorious global object state. In here we store a serialized snapshot of - the context from the application "backend", living in the linked Go-land - lib. */ +QJsonWatch *qw = new QJsonWatch; -static char *json; +/* onStatusChanged is the C function that we register as a callback with CGO. + It pulls a string serialization of the context object, than we then pass + along to Qml via signals. */ -/* We are interested in observing changes to this global json variable. - The jsonWatchdog bridges the gap from pure c callbacks to the rest of the c++ - logic. QJsonWatch comes from QObject so it can emit signals. */ - -QJsonWatch *qw; - -struct jsonWatchdog { - jsonWatchdog() { qw = new QJsonWatch; } - void changed() { emit qw->jsonChanged(QString(json)); } -}; - -/* we need C wrappers around every C++ object, so that we can invoke their methods - from the function pointers passed as callbacks to CGO. */ -extern "C" { -static void *newWatchdog(void) { return (void *)(new jsonWatchdog); } -static void jsonChanged(void *ptr) { - if (ptr != NULL) { - jsonWatchdog *klsPtr = static_cast(ptr); - klsPtr->changed(); - } -} -} - -void *wd = newWatchdog(); - -/* onStatusChanged is the C function that we register as a callback with CGO, - to be called from the Go side. It pulls a string serialization of the - context object, than we then pass along to Qt objects and to Qml. */ void onStatusChanged() { char *ctx = RefreshContext(); - json = ctx; - /* the method wrapped emits a qt signal */ - jsonChanged(wd); + emit qw->jsonChanged(QString(ctx)); free(ctx); } @@ -71,8 +42,15 @@ int main(int argc, char **argv) { exit(0); } + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); + + if (!QSystemTrayIcon::isSystemTrayAvailable()) { + qDebug() << "No systray icon available. Things won't work for now, sorry..."; + exit(1); + } + app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; QQmlContext *ctx = engine.rootContext(); @@ -95,7 +73,7 @@ int main(int argc, char **argv) { /* connect the jsonChanged signal explicitely. In the lambda, we reload the json in the model every time we receive an update from Go */ - QObject::connect(qw, &QJsonWatch::jsonChanged, [ctx, model](QString js) { + QObject::connect(qw, &QJsonWatch::jsonChanged, [model](QString js) { model->loadJson(js.toUtf8()); }); From 223151805a5ccc5c4a925b69936c97c7f2ab9cc4 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 11 Jun 2020 19:50:29 +0200 Subject: [PATCH 030/174] [refactor] out with actions Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index ecff8dce..43f7b67c 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -123,45 +123,14 @@ func (s status) fromString(st string) status { } } -// FIXME ----------------------------------------------------------------------- -// at some moment I thought this was a good idea, but probably is overkill - -// and not used right now. Discuss with meskio in code review, and very likely -// remove it - there are probably better ways of dealing with tracking of user -// actions more towards the ui layer. - -// An action is originated in the UI. These represent requests coming from the -// frontend via the C code. VPN code needs to watch them and fullfill their -// requests as soon as possible. -type actions int - -const ( - switchOn actions = iota - switchOff - unblock -) - -func (a actions) String() string { - return [...]string{"switchOn", "switchOff", "unblock"}[a] -} - -func (a actions) MarshalJSON() ([]byte, error) { - b := bytes.NewBufferString(`"`) - b.WriteString(a.String()) - b.WriteString(`"`) - return b.Bytes(), nil -} - -// ----------------------------------------------------------------------------- - // The connectionCtx keeps the global state that is passed around to C-land. It // also serves as the primary way of passing requests from the frontend to the // Go-core, by letting the UI write some of these variables and processing // them. type connectionCtx struct { - AppName string `json:"appName"` - Provider string `json:"provider"` - Status status `json:"status"` - Actions []actions `json:"actions,omitempty"` + AppName string `json:"appName"` + Provider string `json:"provider"` + Status status `json:"status"` bm bitmask.Bitmask } From 26af63cbad3d79f6a8662fe533a2bce7102ef0fc Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 11 Jun 2020 20:48:27 +0200 Subject: [PATCH 031/174] [bug] avoid segfault when trying to show menu for some reason I don't understand, explicit activations end up in a segfault when I try to call menu.open() from the signal handler. i'm ok not handling middle clicks if that means I can stop digging in search of the real reasons, to be honest. - Fixes: #299 Signed-off-by: kali kaneko (leap communications) --- gui/qml/main.qml | 116 +++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 49 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index daf8150a..80e5e629 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -52,15 +52,29 @@ ApplicationWindow { "wait": "qrc:/assets/icon/png/black/vpn_wait_0.png", "blocked": "qrc:/assets/icon/png/black/vpn_blocked.png", } - + SystemTrayIcon { id: systray visible: true + onActivated: { - console.debug("app is", ctx.appName) - menu.open() + // this looks like a widget bug. middle click (reasons 3 or 4) + // produce a segfault when trying to call menu.open() + // left and right click seem to be working fine, so let's ignore this for now. + switch (reason) { + case SystemTrayIcon.Unknown: + break + case SystemTrayIcon.Context: + break + case SystemTrayIcon.DoubleClick: + break + case SystemTrayIcon.Trigger: + break + case SystemTrayIcon.MiddleClick: + break + } } Component.onCompleted: { @@ -71,8 +85,10 @@ ApplicationWindow { show(); } - menu: Menu { + + id: systrayMenu + StateGroup { id: vpn state: ctx ? ctx.status : "" @@ -106,49 +122,6 @@ ApplicationWindow { ] } - /* - LoginDialog { - id: login - } - DonateDialog { - id: donate - } - MessageDialog { - id: about - buttons: MessageDialog.Ok - title: "About" - text: "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

-

This service is paid for entirely by donations from users like you. Please donate.

-

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

".arg(ctxSystray.applicationName).arg(ctxSystray.provider).arg(ctxSystray.donateURL).arg(ctxSystray.tosURL) - informativeText: "%1 version: %2".arg(ctxSystray.applicationName).arg(ctxSystray.version) - } - MessageDialog { - id: errorStartingVPN - buttons: MessageDialog.Ok - modality: Qt.NonModal - title: "Error starting VPN" - text: "Can't connect to %1".arg(ctxSystray.applicationName) - detailedText: ctxSystray.errorStartingMsg - visible: ctxSystray.errorStartingMsg != "" - } - MessageDialog { - id: authAgent - buttons: MessageDialog.Ok - modality: Qt.NonModal - title: "Missing authentication agent" - text: "Could not find a polkit authentication agent. Please run one and try again." - visible: ctxSystray.authAgent == true - } - MessageDialog { - id: initFailure - buttons: MessageDialog.Ok - modality: Qt.NonModal - title: "Initialization Error" - text: ctxSystray.errorInitMsg - visible: ctxSystray.errorInitMsg != "" - } - */ - MenuItem { id: statusItem text: qsTr("Checking status...") @@ -190,9 +163,8 @@ ApplicationWindow { MenuItem { text: qsTr("Donate...") - //onTriggered: ctxSystray.donate() visible: true - //visible: ctx.showDonate + //onTriggered: donate.open() } MenuItem { @@ -208,4 +180,50 @@ ApplicationWindow { } } } + + /* + LoginDialog { + id: login + } + DonateDialog { + id: donate + } + MessageDialog { + id: about + buttons: MessageDialog.Ok + title: "About" + text: "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

+

This service is paid for entirely by donations from users like you. Please donate.

+

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

".arg(ctxSystray.applicationName).arg(ctxSystray.provider).arg(ctxSystray.donateURL).arg(ctxSystray.tosURL) + informativeText: "%1 version: %2".arg(ctxSystray.applicationName).arg(ctxSystray.version) + } + MessageDialog { + id: errorStartingVPN + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Error starting VPN" + text: "Can't connect to %1".arg(ctxSystray.applicationName) + detailedText: ctxSystray.errorStartingMsg + visible: ctxSystray.errorStartingMsg != "" + } + MessageDialog { + id: authAgent + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Missing authentication agent" + text: "Could not find a polkit authentication agent. Please run one and try again." + visible: ctxSystray.authAgent == true + } + MessageDialog { + id: initFailure + buttons: MessageDialog.Ok + modality: Qt.NonModal + title: "Initialization Error" + text: ctxSystray.errorInitMsg + visible: ctxSystray.errorInitMsg != "" + } + */ + + + } From ea3147b3d74a4e2955e0f547cbbc1a729fd3baa1 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 11 Jun 2020 20:51:28 +0200 Subject: [PATCH 032/174] [pkg] simplify project file Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/bitmask.pro b/bitmask.pro index 28119a7e..910ba23d 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -1,7 +1,7 @@ # FIXME: this should be overwritten by build templates TARGET=riseup-vpn -CONFIG += qt staticlib +CONFIG += qt static windows:CONFIG += console unix:DEBUG:CONFIG += debug lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") @@ -11,34 +11,6 @@ macx { LIBS += -framework Security } -# trying to optimize size of the static binary. -# probably more can be shaved off with some patience -# You need to recompile your version of Qt to use the libraries you want. The -# information comes from the build configuration of the Qt version that you are -# using. Simply point Qts configure to the relevant libraries you wish to -# override, build it, and use it to build your project. It will automatically -# pull in the newer libraries that you overrode. -# TODO: patch the $(PKG)_BUILD definition in mxe/src/qtbase.mk and shave some options there. -# https://stackoverflow.com/questions/5587141/recommended-flags-for-a-minimalistic-qt-build -# See also: https://qtlite.com/ - -#QTPLUGIN.imageformats = - -#QTPLUGIN.QTcpServerConnectionFactory =- -#QTPLUGIN.QQmlDebugServerFactory =- -#QTPLUGIN.QWindowsIntegrationPlugin =- -#QTPLUGIN.QQmlDebuggerServiceFactory =- -#QTPLUGIN.QQmlInspectorServiceFactory =- -#QTPLUGIN.QLocalClientConnectionFactory =- -#QTPLUGIN.QDebugMessageServiceFactory =- -#QTPLUGIN.QQmlNativeDebugConnectorFactory =- -#QTPLUGIN.QQmlNativeDebugServiceFactory =- -#QTPLUGIN.QQmlPreviewServiceFactory =- -#QTPLUGIN.QQmlProfilerServiceFactory =- -#QTPLUGIN.QQuickProfilerAdapterFactory =- -#QTPLUGIN.QQmlDebugServerFactory =- -#QTPLUGIN.QTcpServerConnectionFactory =- -#QTPLUGIN.QGenericEnginePlugin =- - QT += qml quick widgets SOURCES += \ From 4e93e59a13673a9a82ed616afd6cd7905862adfd Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 12:40:59 +0200 Subject: [PATCH 033/174] [feat] working donate dialog Signed-off-by: kali kaneko (leap communications) --- bitmask.pro | 2 +- gui/backend.go | 60 +++++++++++++++++++++++++++++++--------- gui/gui.qrc | 1 + gui/handlers.cpp | 6 ++++ gui/handlers.h | 1 + gui/main.cpp | 4 +-- gui/qml/DonateDialog.qml | 27 ++++++++++++++++++ gui/qml/main.qml | 23 +++++++++------ 8 files changed, 99 insertions(+), 25 deletions(-) create mode 100644 gui/qml/DonateDialog.qml diff --git a/bitmask.pro b/bitmask.pro index 910ba23d..115aec71 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -1,7 +1,7 @@ # FIXME: this should be overwritten by build templates TARGET=riseup-vpn -CONFIG += qt static +CONFIG += qt staticlib windows:CONFIG += console unix:DEBUG:CONFIG += debug lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5") diff --git a/gui/backend.go b/gui/backend.go index 43f7b67c..d05ba7a9 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -6,14 +6,18 @@ import ( "bytes" "encoding/json" "fmt" + "io" "log" "net/http" "os" + "path" "reflect" "sync" + //"time" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/config" "0xacab.org/leap/bitmask-vpn/pkg/pickle" "0xacab.org/leap/bitmask-vpn/pkg/systray2" "github.com/jmshal/go-locale" @@ -71,8 +75,6 @@ func trigger(event string) { /* connection status */ -const logFile = "systray.log" - const ( offStr = "off" startingStr = "starting" @@ -130,6 +132,7 @@ func (s status) fromString(st string) status { type connectionCtx struct { AppName string `json:"appName"` Provider string `json:"provider"` + Donate bool `json:"donate"` Status status `json:"status"` bm bitmask.Bitmask } @@ -170,8 +173,14 @@ func setStatus(st status) { go trigger(OnStatusChanged) } +func toggleDonate() { + stmut.Lock() + defer stmut.Unlock() + ctx.Donate = !ctx.Donate + go trigger(OnStatusChanged) +} + func setStatusFromStr(stStr string) { - log.Println("status:", stStr) setStatus(unknown.fromString(stStr)) } @@ -184,8 +193,18 @@ func initPrinter() *message.Printer { return message.NewPrinter(message.MatchLanguage(locale, "en")) } +const logFile = "systray.log" + +var logger io.Closer + // initializeBitmask instantiates a bitmask connection func initializeBitmask() { + _, err := config.ConfigureLogger(path.Join(config.Path, logFile)) + + if err != nil { + log.Println("Can't configure logger: ", err) + } + if ctx == nil { log.Println("error: cannot initialize bitmask, ctx is nil") os.Exit(1) @@ -223,6 +242,7 @@ func initializeContext(provider, appName string) { ctx = &connectionCtx{ AppName: appName, Provider: provider, + Donate: false, Status: st, } go trigger(OnStatusChanged) @@ -263,27 +283,32 @@ func mockUI() { //export SwitchOn func SwitchOn() { - setStatus(starting) - startVPN() + go setStatus(starting) + go startVPN() } //export SwitchOff func SwitchOff() { - setStatus(stopping) - stopVPN() + go setStatus(stopping) + go stopVPN() +} + +//export Unblock +func Unblock() { + fmt.Println("unblock... [not implemented]") } //export Quit func Quit() { if ctx.Status != off { - setStatus(stopping) + go setStatus(stopping) stopVPN() } } -//export Unblock -func Unblock() { - fmt.Println("unblock... [not implemented]") +//export ToggleDonate +func ToggleDonate() { + toggleDonate() } //export SubscribeToEvent @@ -293,12 +318,21 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { //export InitializeBitmaskContext func InitializeBitmaskContext() { - provider := "black.riseup.net" - appName := "RiseupVPN" + provider := config.Provider + appName := config.ApplicationName initOnce.Do(func() { initializeContext(provider, appName) }) go ctx.updateStatus() + + /* DEBUG + timer := time.NewTimer(time.Second * 3) + go func() { + <-timer.C + fmt.Println("donate timer fired") + toggleDonate() + }() + */ } //export RefreshContext diff --git a/gui/gui.qrc b/gui/gui.qrc index 705c2b74..b0cd72c9 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -1,6 +1,7 @@ qml/main.qml + qml/DonateDialog.qml assets/icon/png/black/vpn_off.png assets/icon/png/black/vpn_on.png diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 79fbb582..e37de2d1 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -23,8 +23,14 @@ void Backend::unblock() Unblock(); } +void Backend::toggleDonate() +{ + ToggleDonate(); +} + void Backend::quit() { Quit(); emit this->quitDone(); } + diff --git a/gui/handlers.h b/gui/handlers.h index 0a8782d7..3fe9eed5 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -33,6 +33,7 @@ public slots: void switchOn(); void switchOff(); void unblock(); + void toggleDonate(); void quit(); }; diff --git a/gui/main.cpp b/gui/main.cpp index c55b538b..5ecd4add 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -42,13 +42,11 @@ int main(int argc, char **argv) { exit(0); } - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); if (!QSystemTrayIcon::isSystemTrayAvailable()) { - qDebug() << "No systray icon available. Things won't work for now, sorry..."; - exit(1); + qDebug() << "No systray icon available. Things might not work for now, sorry..."; } app.setQuitOnLastWindowClosed(false); diff --git a/gui/qml/DonateDialog.qml b/gui/qml/DonateDialog.qml new file mode 100644 index 00000000..b7431abe --- /dev/null +++ b/gui/qml/DonateDialog.qml @@ -0,0 +1,27 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 + +MessageDialog { + standardButtons: StandardButton.No | StandardButton.Yes + title: "Donate" + icon: StandardIcon.Warning + text: getText() + + function getText() { + var _name = ctx ? ctx.appName : "vpn" + var donateTxt = qsTr( + "The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\nDo you want to donate now?").arg(_name) + return donateTxt + } + + onAccepted: { + if (backend) { + backend.donateAccepted(true) + } + } + onRejected: { + if (backend) { + backend.donateAccepted(false) + } + } +} diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 80e5e629..98eac800 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -11,10 +11,16 @@ ApplicationWindow { property var ctx + Connections { target: jsonModel onDataChanged: { ctx = JSON.parse(jsonModel.getJson()); + if (ctx.donate == 'true') { + console.debug(jsonModel.getJson()) + donate.visible = true + backend.toggleDonate() + } } } @@ -92,6 +98,7 @@ ApplicationWindow { StateGroup { id: vpn state: ctx ? ctx.status : "" + states: [ State { name: "initializing" }, State { @@ -106,7 +113,7 @@ ApplicationWindow { }, State { name: "starting" - PropertyChanges { target: systray; tooltip: toHuman("connecting"); icon.source: icons["wait"] } + PropertyChanges { target: systray; tooltip: toHuman("connecting"); icon.source: icons["wait"] } PropertyChanges { target: statusItem; text: toHuman("connecting") } }, State { @@ -181,13 +188,17 @@ ApplicationWindow { } } + DonateDialog { + visible: false + id: donate + } +} + + /* LoginDialog { id: login } - DonateDialog { - id: donate - } MessageDialog { id: about buttons: MessageDialog.Ok @@ -223,7 +234,3 @@ ApplicationWindow { visible: ctxSystray.errorInitMsg != "" } */ - - - -} From 97121e8977f25f3a34c22e61458aa011027e5432 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 19:05:59 +0200 Subject: [PATCH 034/174] [refactor] reorganize modules bitmaskd: so long and thanks for all the fish! Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 40 +----- pkg/bitmask/autostart.go | 6 +- pkg/bitmask/bitmaskd.go | 44 ------ pkg/{systray2/run.go => bitmask/init.go} | 75 +++++++--- pkg/bitmask/standalone.go | 4 +- pkg/bitmaskd/events.go | 50 ------- pkg/bitmaskd/main.go | 163 ---------------------- pkg/bitmaskd/vpn.go | 103 -------------- pkg/{systray2/config.go => config/gui.go} | 20 +-- pkg/{systray2 => pid}/pid.go | 21 ++- pkg/{systray2 => pid}/pid_test.go | 2 +- 11 files changed, 94 insertions(+), 434 deletions(-) delete mode 100644 pkg/bitmask/bitmaskd.go rename pkg/{systray2/run.go => bitmask/init.go} (58%) delete mode 100644 pkg/bitmaskd/events.go delete mode 100644 pkg/bitmaskd/main.go delete mode 100644 pkg/bitmaskd/vpn.go rename pkg/{systray2/config.go => config/gui.go} (83%) rename pkg/{systray2 => pid}/pid.go (68%) rename pkg/{systray2 => pid}/pid_test.go (94%) diff --git a/gui/backend.go b/gui/backend.go index d05ba7a9..cf7c0fb2 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -6,22 +6,16 @@ import ( "bytes" "encoding/json" "fmt" - "io" "log" "net/http" "os" - "path" "reflect" "sync" //"time" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" - "0xacab.org/leap/bitmask-vpn/pkg/config" "0xacab.org/leap/bitmask-vpn/pkg/pickle" - "0xacab.org/leap/bitmask-vpn/pkg/systray2" - "github.com/jmshal/go-locale" - "golang.org/x/text/message" ) // typedef void (*cb)(); @@ -184,37 +178,17 @@ func setStatusFromStr(stStr string) { setStatus(unknown.fromString(stStr)) } -func initPrinter() *message.Printer { - locale, err := go_locale.DetectLocale() - if err != nil { - log.Println("Error detecting the system locale: ", err) - } - - return message.NewPrinter(message.MatchLanguage(locale, "en")) -} - -const logFile = "systray.log" - -var logger io.Closer - // initializeBitmask instantiates a bitmask connection func initializeBitmask() { - _, err := config.ConfigureLogger(path.Join(config.Path, logFile)) - - if err != nil { - log.Println("Can't configure logger: ", err) - } - if ctx == nil { log.Println("error: cannot initialize bitmask, ctx is nil") os.Exit(1) } - conf := systray.ParseConfig() - conf.Version = "unknown" - conf.Printer = initPrinter() - b, err := bitmask.Init(conf.Printer) + bitmask.InitializeLogger() + + b, err := bitmask.InitializeBitmask() if err != nil { - log.Fatal(err) + log.Println("error: cannot initialize bitmask") } ctx.bm = b } @@ -318,10 +292,10 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { //export InitializeBitmaskContext func InitializeBitmaskContext() { - provider := config.Provider - appName := config.ApplicationName + pi := bitmask.GetConfiguredProvider() + initOnce.Do(func() { - initializeContext(provider, appName) + initializeContext(pi.Provider, pi.AppName) }) go ctx.updateStatus() diff --git a/pkg/bitmask/autostart.go b/pkg/bitmask/autostart.go index 32b931a2..ebab428a 100644 --- a/pkg/bitmask/autostart.go +++ b/pkg/bitmask/autostart.go @@ -21,12 +21,12 @@ type Autostart interface { Enable() error } -type DummyAutostart struct{} +type dummyAutostart struct{} -func (a *DummyAutostart) Disable() error { +func (a *dummyAutostart) Disable() error { return nil } -func (a *DummyAutostart) Enable() error { +func (a *dummyAutostart) Enable() error { return nil } diff --git a/pkg/bitmask/bitmaskd.go b/pkg/bitmask/bitmaskd.go deleted file mode 100644 index a8c4e5d2..00000000 --- a/pkg/bitmask/bitmaskd.go +++ /dev/null @@ -1,44 +0,0 @@ -// +build bitmaskd -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package bitmask - -import ( - "errors" - "log" - - "0xacab.org/leap/bitmask-vpn/pkg/bitmaskd" - "golang.org/x/text/message" -) - -const ( - notRunning = `Is bitmaskd running? Start bitmask and try again.` -) - -// Init bitmask -func Init(printer *message.Printer) (Bitmask, error) { - b, err := bitmaskd.Init() - if err != nil { - log.Printf("An error ocurred starting bitmaskd: %v", err) - err = errors.New(printer.Sprintf(notRunning)) - } - return b, err -} - -// NewAutostart creates a handler for the autostart of your platform -func NewAutostart(appName string, iconPath string) Autostart { - return &DummyAutostart{} -} diff --git a/pkg/systray2/run.go b/pkg/bitmask/init.go similarity index 58% rename from pkg/systray2/run.go rename to pkg/bitmask/init.go index 00c2c943..9af79489 100644 --- a/pkg/systray2/run.go +++ b/pkg/bitmask/init.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -13,52 +13,83 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package systray +package bitmask import ( "log" "os" + "path" + + "github.com/jmshal/go-locale" + "golang.org/x/text/message" - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" "0xacab.org/leap/bitmask-vpn/pkg/config" + "0xacab.org/leap/bitmask-vpn/pkg/pid" ) -/* -func initialize(conf *Config, bt *bmTray, finishedCh chan bool) { - defer func() { finishedCh <- true }() +type ProviderInfo struct { + Provider string + AppName string +} + +func GetConfiguredProvider() *ProviderInfo { + provider := config.Provider + appName := config.ApplicationName + return &ProviderInfo{provider, appName} +} + +func InitializeLogger() { + _, err := config.ConfigureLogger(path.Join(config.LogPath)) + if err != nil { + log.Println("Can't configure logger: ", err) + } +} + +func InitializeBitmask() (Bitmask, error) { if _, err := os.Stat(config.Path); os.IsNotExist(err) { os.MkdirAll(config.Path, os.ModePerm) } - err := acquirePID() + err := pid.AcquirePID() if err != nil { log.Fatal(err) } - defer releasePID() + defer pid.ReleasePID() + + conf := config.ParseConfig() + conf.Version = "unknown" + conf.Printer = initPrinter() - b, err := bitmask.Init(conf.Printer) + b, err := Init(conf.Printer) if err != nil { // TODO notify failure - return + log.Fatal(err) } - defer b.Close() go checkAndStartBitmask(b, conf) - go listenSignals(b) - var as bitmask.Autostart + var as Autostart if conf.DisableAustostart { - as = &bitmask.DummyAutostart{} + as = &dummyAutostart{} } else { - as = bitmask.NewAutostart(config.ApplicationName, "") + as = newAutostart(config.ApplicationName, "") } err = as.Enable() if err != nil { log.Printf("Error enabling autostart: %v", err) } + return b, nil +} + +func initPrinter() *message.Printer { + locale, err := go_locale.DetectLocale() + if err != nil { + log.Println("Error detecting the system locale: ", err) + } + + return message.NewPrinter(message.MatchLanguage(locale, "en")) } -*/ -func checkAndStartBitmask(b bitmask.Bitmask, conf *Config) { +func checkAndStartBitmask(b Bitmask, conf *config.Config) { if conf.Obfs4 { err := b.UseTransport("obfs4") if err != nil { @@ -76,9 +107,9 @@ func checkAndStartBitmask(b bitmask.Bitmask, conf *Config) { } } -func checkAndInstallHelpers(b bitmask.Bitmask) error { - helpers, priviledge, err := b.VPNCheck() - if (err != nil && err.Error() == "nopolkit") || (err == nil && !priviledge) { +func checkAndInstallHelpers(b Bitmask) error { + helpers, privilege, err := b.VPNCheck() + if (err != nil && err.Error() == "nopolkit") || (err == nil && !privilege) { log.Printf("No polkit found") os.Exit(1) } else if err != nil { @@ -95,12 +126,12 @@ func checkAndInstallHelpers(b bitmask.Bitmask) error { return nil } -func maybeStartVPN(b bitmask.Bitmask, conf *Config) error { +func maybeStartVPN(b Bitmask, conf *config.Config) error { if !conf.StartVPN { return nil } err := b.StartVPN(config.Provider) - conf.setUserStoppedVPN(false) + conf.SetUserStoppedVPN(false) return err } diff --git a/pkg/bitmask/standalone.go b/pkg/bitmask/standalone.go index 8ae6f395..92ea542c 100644 --- a/pkg/bitmask/standalone.go +++ b/pkg/bitmask/standalone.go @@ -43,8 +43,8 @@ func Init(printer *message.Printer) (Bitmask, error) { return b, err } -// NewAutostart creates a handler for the autostart of your platform -func NewAutostart(appName string, iconPath string) Autostart { +// newAutostart creates a handler for the autostart of your platform +func newAutostart(appName string, iconPath string) Autostart { exec := os.Args if os.Getenv("SNAP") != "" { re := regexp.MustCompile("/snap/([^/]*)/") diff --git a/pkg/bitmaskd/events.go b/pkg/bitmaskd/events.go deleted file mode 100644 index 3c8bb2c9..00000000 --- a/pkg/bitmaskd/events.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package bitmaskd - -import ( - "log" - "net/http" -) - -const ( - statusEvent = "VPN_STATUS_CHANGED" -) - -func (b *Bitmask) eventsHandler() { - b.send("events", "register", statusEvent) - client := &http.Client{ - Timeout: 0, - } - for { - resJSON, err := send(b.apiToken, client, "events", "poll") - res, ok := resJSON.([]interface{}) - if err != nil || !ok || len(res) < 1 { - continue - } - event, ok := res[0].(string) - if !ok || event != statusEvent { - continue - } - - status, err := b.GetStatus() - if err != nil { - log.Printf("Error receiving status: %v", err) - continue - } - b.statusCh <- status - } -} diff --git a/pkg/bitmaskd/main.go b/pkg/bitmaskd/main.go deleted file mode 100644 index b0d03496..00000000 --- a/pkg/bitmaskd/main.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package bitmaskd - -import ( - "bytes" - "encoding/json" - "errors" - "io/ioutil" - "log" - "net/http" - "path" - "time" - - "0xacab.org/leap/bitmask-vpn/pkg/config" -) - -const ( - timeout = time.Second * 15 - url = "http://localhost:7070/API/" - headerAuth = "X-Bitmask-Auth" -) - -// Bitmask holds the bitmask client data -type Bitmask struct { - client *http.Client - apiToken string - statusCh chan string -} - -// Init the connection to bitmask -func Init() (*Bitmask, error) { - statusCh := make(chan string) - client := &http.Client{ - Timeout: timeout, - } - - err := waitForBitmaskd() - if err != nil { - return nil, err - } - - apiToken, err := getToken() - if err != nil { - return nil, err - } - - b := Bitmask{client, apiToken, statusCh} - go b.eventsHandler() - return &b, nil -} - -// GetStatusCh returns a channel that will recieve VPN status changes -func (b *Bitmask) GetStatusCh() <-chan string { - return b.statusCh -} - -// Close the connection to bitmask -func (b *Bitmask) Close() { - _, err := b.send("core", "stop") - if err != nil { - log.Printf("Got an error stopping bitmaskd: %v", err) - } -} - -// Version gets the bitmask version string -func (b *Bitmask) Version() (string, error) { - res, err := b.send("core", "version") - if err != nil { - return "", err - } - return res["version_core"].(string), nil -} - -func waitForBitmaskd() error { - var err error - for i := 0; i < 30; i++ { - resp, err := http.Post(url, "", nil) - if err == nil { - resp.Body.Close() - return nil - } - log.Printf("Bitmask is not ready (iteration %d): %v", i, err) - time.Sleep(1 * time.Second) - } - return err -} - -func (b *Bitmask) send(parts ...interface{}) (map[string]interface{}, error) { - resJSON, err := send(b.apiToken, b.client, parts...) - if err != nil { - return nil, err - } - result, ok := resJSON.(map[string]interface{}) - if !ok { - return nil, errors.New("Not valid response") - } - return result, nil -} - -func send(apiToken string, client *http.Client, parts ...interface{}) (interface{}, error) { - apiSection, _ := parts[0].(string) - reqBody, err := json.Marshal(parts[1:]) - if err != nil { - return nil, err - } - req, err := http.NewRequest("POST", url+apiSection, bytes.NewReader(reqBody)) - if err != nil { - return nil, err - } - req.Header.Add(headerAuth, apiToken) - - resp, err := client.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - resJSON, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } - return parseResponse(resJSON) -} - -func parseResponse(resJSON []byte) (interface{}, error) { - var response struct { - Result interface{} - Error string - } - err := json.Unmarshal(resJSON, &response) - if response.Error != "" { - return nil, errors.New(response.Error) - } - return response.Result, err -} - -func getToken() (string, error) { - var err error - path := path.Join(config.Path, "authtoken") - for i := 0; i < 30; i++ { - b, err := ioutil.ReadFile(path) - if err == nil { - return string(b), nil - } - log.Printf("Auth token is not ready (iteration %d): %v", i, err) - time.Sleep(1 * time.Second) - } - return "", err -} diff --git a/pkg/bitmaskd/vpn.go b/pkg/bitmaskd/vpn.go deleted file mode 100644 index 2747441f..00000000 --- a/pkg/bitmaskd/vpn.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package bitmaskd - -import ( - "errors" - "log" -) - -// StartVPN for provider -func (b *Bitmask) StartVPN(provider string) error { - _, err := b.send("vpn", "start", provider) - return err -} - -// StopVPN or cancel -func (b *Bitmask) StopVPN() error { - _, err := b.send("vpn", "stop") - return err -} - -// ReloadFirewall restarts the firewall -func (b *Bitmask) ReloadFirewall() error { - _, err := b.send("vpn", "fw_reload") - return err -} - -// GetStatus returns the VPN status -func (b *Bitmask) GetStatus() (string, error) { - res, err := b.send("vpn", "status") - if err != nil { - return "", err - } - return res["status"].(string), nil -} - -// InstallHelpers into the system -func (b *Bitmask) InstallHelpers() error { - _, err := b.send("vpn", "install") - return err -} - -// VPNCheck returns if the helpers are installed and up to date and if polkit is running -func (b *Bitmask) VPNCheck() (helpers bool, priviledge bool, err error) { - res, err := b.send("vpn", "check", "") - if err != nil { - return false, false, err - } - installed, ok := res["installed"].(bool) - if !ok { - log.Printf("Unexpected value for installed on 'vpn check': %v", res) - return false, false, errors.New("Invalid response format") - } - privcheck, ok := res["privcheck"].(bool) - if !ok { - log.Printf("Unexpected value for privcheck on 'vpn check': %v", res) - return installed, false, errors.New("Invalid response format") - } - return installed, privcheck, nil -} - -// ListGateways return the names of the gateways -func (b *Bitmask) ListGateways(provider string) ([]string, error) { - res, err := b.send("vpn", "list") - if err != nil { - return nil, err - } - - names := []string{} - locations, ok := res[provider].([]interface{}) - if !ok { - return nil, errors.New("Can't read the locations for provider " + provider) - } - for i := range locations { - loc := locations[i].(map[string]interface{}) - names = append(names, loc["name"].(string)) - } - return names, nil -} - -// UseGateway selects name as the default gateway -func (b *Bitmask) UseGateway(name string) error { - _, err := b.send("vpn", "locations", name) - return err -} - -// UseTransport selects an obfuscation transport to use -func (b *Bitmask) UseTransport(transport string) error { - return errors.New("Transport " + transport + " not implemented") -} diff --git a/pkg/systray2/config.go b/pkg/config/gui.go similarity index 83% rename from pkg/systray2/config.go rename to pkg/config/gui.go index 75a4a984..ce3f14d6 100644 --- a/pkg/systray2/config.go +++ b/pkg/config/gui.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package systray +package config import ( "encoding/json" @@ -21,7 +21,6 @@ import ( "path" "time" - "0xacab.org/leap/bitmask-vpn/pkg/config" "golang.org/x/text/message" ) @@ -31,7 +30,8 @@ const ( ) var ( - configPath = path.Join(config.Path, "systray.json") + configPath = path.Join(Path, "systray.json") + LogPath = path.Join(Path, "systray.log") ) // Config holds the configuration of the systray @@ -72,25 +72,25 @@ func ParseConfig() *Config { return &conf } -func (c *Config) setUserStoppedVPN(vpnStopped bool) error { +func (c *Config) SetUserStoppedVPN(vpnStopped bool) error { c.file.UserStoppedVPN = vpnStopped return c.save() } -func (c *Config) hasDonated() bool { +func (c *Config) HasDonated() bool { return c.file.Donated.Add(oneMonth).After(time.Now()) } -func (c *Config) needsNotification() bool { - return !c.hasDonated() && c.file.LastNotification.Add(oneDay).Before(time.Now()) +func (c *Config) NeedsNotification() bool { + return !c.HasDonated() && c.file.LastNotification.Add(oneDay).Before(time.Now()) } -func (c *Config) setNotification() error { +func (c *Config) SetNotification() error { c.file.LastNotification = time.Now() return c.save() } -func (c *Config) setDonated() error { +func (c *Config) SetDonated() error { c.file.Donated = time.Now() return c.save() } diff --git a/pkg/systray2/pid.go b/pkg/pid/pid.go similarity index 68% rename from pkg/systray2/pid.go rename to pkg/pid/pid.go index b898d4e4..11242106 100644 --- a/pkg/systray2/pid.go +++ b/pkg/pid/pid.go @@ -1,4 +1,19 @@ -package systray +// Copyright (C) 2018-2020 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package pid import ( "fmt" @@ -16,7 +31,7 @@ import ( var pidFile = filepath.Join(config.Path, "systray.pid") -func acquirePID() error { +func AcquirePID() error { pid := syscall.Getpid() current, err := getPID() if err != nil { @@ -30,7 +45,7 @@ func acquirePID() error { return setPID(pid) } -func releasePID() error { +func ReleasePID() error { pid := syscall.Getpid() current, err := getPID() if err != nil { diff --git a/pkg/systray2/pid_test.go b/pkg/pid/pid_test.go similarity index 94% rename from pkg/systray2/pid_test.go rename to pkg/pid/pid_test.go index dda83848..dbc76f35 100644 --- a/pkg/systray2/pid_test.go +++ b/pkg/pid/pid_test.go @@ -1,4 +1,4 @@ -package systray +package pid import ( "syscall" From c2569f940ce0a827fba2f6e4a960749b5fac08f8 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 20:00:13 +0200 Subject: [PATCH 035/174] [refactor] reorganize backend in its own module Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 302 ++------------------------------------- pkg/backend/api.go | 74 ++++++++++ pkg/backend/bitmask.go | 52 +++++++ pkg/backend/callbacks.go | 63 ++++++++ pkg/backend/mocks.go | 32 +++++ pkg/backend/status.go | 122 ++++++++++++++++ 6 files changed, 357 insertions(+), 288 deletions(-) create mode 100644 pkg/backend/api.go create mode 100644 pkg/backend/bitmask.go create mode 100644 pkg/backend/callbacks.go create mode 100644 pkg/backend/mocks.go create mode 100644 pkg/backend/status.go diff --git a/gui/backend.go b/gui/backend.go index cf7c0fb2..9c65025a 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -1,333 +1,59 @@ package main -/* a wrapper around bitmask that exposes status to a QtQml gui */ +/* a wrapper around bitmask that exposes status to a QtQml gui. + Have a look at the pkg/backend module for further enlightment. */ import ( - "bytes" - "encoding/json" - "fmt" - "log" - "net/http" - "os" - "reflect" - "sync" - //"time" + "C" "unsafe" - "0xacab.org/leap/bitmask-vpn/pkg/bitmask" - "0xacab.org/leap/bitmask-vpn/pkg/pickle" + "0xacab.org/leap/bitmask-vpn/pkg/backend" ) -// typedef void (*cb)(); -// inline void _do_callback(cb f) { -// f(); -// } -import "C" - -/* callbacks into C-land */ - -var mut sync.Mutex -var stmut sync.Mutex -var cbs = make(map[string](*[0]byte)) -var initOnce sync.Once - -// Events are just a enumeration of all the posible events that C functions can -// be interested in subscribing to. You cannot subscribe to an event that is -// not listed here. -type Events struct { - OnStatusChanged string -} - -const OnStatusChanged string = "OnStatusChanged" - -// subscribe registers a callback from C-land. -// This callback needs to be passed as a void* C function pointer. -func subscribe(event string, fp unsafe.Pointer) { - mut.Lock() - defer mut.Unlock() - e := &Events{} - v := reflect.Indirect(reflect.ValueOf(&e)) - hf := v.Elem().FieldByName(event) - if reflect.ValueOf(hf).IsZero() { - fmt.Println("ERROR: not a valid event:", event) - } else { - cbs[event] = (*[0]byte)(fp) - } -} - -// trigger fires a callback from C-land. -func trigger(event string) { - mut.Lock() - defer mut.Unlock() - cb := cbs[event] - if cb != nil { - C._do_callback(cb) - } else { - fmt.Println("ERROR: this event does not have subscribers:", event) - } -} - -/* connection status */ - -const ( - offStr = "off" - startingStr = "starting" - onStr = "on" - stoppingStr = "stopping" - failedStr = "failed" -) - -// status reflects the current VPN status. Go code is responsible for updating -// it; C-land just watches its changes and pulls its updates via the serialized -// context object. -type status int - -const ( - off status = iota - starting - on - stopping - failed - unknown -) - -func (s status) String() string { - return [...]string{offStr, startingStr, onStr, stoppingStr, failedStr}[s] -} - -func (s status) MarshalJSON() ([]byte, error) { - b := bytes.NewBufferString(`"`) - b.WriteString(s.String()) - b.WriteString(`"`) - return b.Bytes(), nil -} - -func (s status) fromString(st string) status { - switch st { - case offStr: - return off - case startingStr: - return starting - case onStr: - return on - case stoppingStr: - return stopping - case failedStr: - return failed - default: - return unknown - } -} - -// The connectionCtx keeps the global state that is passed around to C-land. It -// also serves as the primary way of passing requests from the frontend to the -// Go-core, by letting the UI write some of these variables and processing -// them. -type connectionCtx struct { - AppName string `json:"appName"` - Provider string `json:"provider"` - Donate bool `json:"donate"` - Status status `json:"status"` - bm bitmask.Bitmask -} - -func (c connectionCtx) toJson() ([]byte, error) { - stmut.Lock() - defer stmut.Unlock() - b, err := json.Marshal(c) - if err != nil { - log.Println(err) - return nil, err - } - return b, nil -} - -func (c connectionCtx) updateStatus() { - if stStr, err := c.bm.GetStatus(); err != nil { - log.Printf("Error getting status: %v", err) - } else { - setStatusFromStr(stStr) - } - - statusCh := c.bm.GetStatusCh() - for { - select { - case stStr := <-statusCh: - setStatusFromStr(stStr) - } - } -} - -var ctx *connectionCtx - -func setStatus(st status) { - stmut.Lock() - defer stmut.Unlock() - ctx.Status = st - go trigger(OnStatusChanged) -} - -func toggleDonate() { - stmut.Lock() - defer stmut.Unlock() - ctx.Donate = !ctx.Donate - go trigger(OnStatusChanged) -} - -func setStatusFromStr(stStr string) { - setStatus(unknown.fromString(stStr)) -} - -// initializeBitmask instantiates a bitmask connection -func initializeBitmask() { - if ctx == nil { - log.Println("error: cannot initialize bitmask, ctx is nil") - os.Exit(1) - } - bitmask.InitializeLogger() - - b, err := bitmask.InitializeBitmask() - if err != nil { - log.Println("error: cannot initialize bitmask") - } - ctx.bm = b -} - -func startVPN() { - err := ctx.bm.StartVPN(ctx.Provider) - if err != nil { - log.Println(err) - os.Exit(1) - } -} - -func stopVPN() { - err := ctx.bm.StopVPN() - if err != nil { - log.Println(err) - } -} - -// initializeContext initializes an empty connStatus and assigns it to the -// global ctx holder. This is expected to be called only once, so the public -// api uses the sync.Once primitive to call this. -func initializeContext(provider, appName string) { - var st status = off - ctx = &connectionCtx{ - AppName: appName, - Provider: provider, - Donate: false, - Status: st, - } - go trigger(OnStatusChanged) - initializeBitmask() -} - -/* mock http server: easy way to mocking vpn behavior on ui interaction. This -* should also show a good way of writing functionality tests just for the Qml -* layer */ - -func mockUIOn(w http.ResponseWriter, r *http.Request) { - log.Println("changing status: on") - setStatus(on) -} - -func mockUIOff(w http.ResponseWriter, r *http.Request) { - log.Println("changing status: off") - setStatus(off) -} - -func mockUIFailed(w http.ResponseWriter, r *http.Request) { - log.Println("changing status: failed") - setStatus(failed) -} - -func mockUI() { - http.HandleFunc("/on", mockUIOn) - http.HandleFunc("/off", mockUIOff) - http.HandleFunc("/failed", mockUIFailed) - http.ListenAndServe(":8080", nil) -} - -/* - - exported C api - -*/ - //export SwitchOn func SwitchOn() { - go setStatus(starting) - go startVPN() + backend.SwitchOn() } //export SwitchOff func SwitchOff() { - go setStatus(stopping) - go stopVPN() + backend.SwitchOff() } //export Unblock func Unblock() { - fmt.Println("unblock... [not implemented]") + backend.Unblock() } //export Quit func Quit() { - if ctx.Status != off { - go setStatus(stopping) - stopVPN() - } + backend.Quit() + } //export ToggleDonate func ToggleDonate() { - toggleDonate() + backend.ToggleDonate() } //export SubscribeToEvent func SubscribeToEvent(event string, f unsafe.Pointer) { - subscribe(event, f) + backend.SubscribeToEvent(event, f) } //export InitializeBitmaskContext func InitializeBitmaskContext() { - pi := bitmask.GetConfiguredProvider() - - initOnce.Do(func() { - initializeContext(pi.Provider, pi.AppName) - }) - go ctx.updateStatus() - - /* DEBUG - timer := time.NewTimer(time.Second * 3) - go func() { - <-timer.C - fmt.Println("donate timer fired") - toggleDonate() - }() - */ + backend.InitializeBitmaskContext() } //export RefreshContext func RefreshContext() *C.char { - c, _ := ctx.toJson() - return C.CString(string(c)) + return (*C.char)(backend.RefreshContext()) } //export InstallHelpers func InstallHelpers() { - pickle.InstallHelpers() -} - -/* end of the exposed api */ - -/* we could enable this one optionally for the qt tests */ - -/* uncomment: export MockUIInteraction */ -func MockUIInteraction() { - log.Println("mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") - go mockUI() + backend.InstallHelpers() } func main() {} diff --git a/pkg/backend/api.go b/pkg/backend/api.go new file mode 100644 index 00000000..f924cbda --- /dev/null +++ b/pkg/backend/api.go @@ -0,0 +1,74 @@ +/* All the exported functions live here */ + +package backend + +import ( + "C" + "fmt" + "log" + "unsafe" + + "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/pickle" +) + +func SwitchOn() { + go setStatus(starting) + go startVPN() +} + +func SwitchOff() { + go setStatus(stopping) + go stopVPN() +} + +func Unblock() { + fmt.Println("unblock... [not implemented]") +} + +func Quit() { + if ctx.Status != off { + go setStatus(stopping) + stopVPN() + } +} + +func ToggleDonate() { + toggleDonate() +} + +func SubscribeToEvent(event string, f unsafe.Pointer) { + subscribe(event, f) +} + +func InitializeBitmaskContext() { + pi := bitmask.GetConfiguredProvider() + + initOnce.Do(func() { + initializeContext(pi.Provider, pi.AppName) + }) + go ctx.updateStatus() + + /* DEBUG + timer := time.NewTimer(time.Second * 3) + go func() { + <-timer.C + fmt.Println("donate timer fired") + toggleDonate() + }() + */ +} + +func RefreshContext() *C.char { + c, _ := ctx.toJson() + return C.CString(string(c)) +} + +func InstallHelpers() { + pickle.InstallHelpers() +} + +func MockUIInteraction() { + log.Println("mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") + go mockUI() +} diff --git a/pkg/backend/bitmask.go b/pkg/backend/bitmask.go new file mode 100644 index 00000000..07d27ea6 --- /dev/null +++ b/pkg/backend/bitmask.go @@ -0,0 +1,52 @@ +package backend + +import ( + "log" + "os" + + "0xacab.org/leap/bitmask-vpn/pkg/bitmask" +) + +func initializeBitmask() { + if ctx == nil { + log.Println("error: cannot initialize bitmask, ctx is nil") + os.Exit(1) + } + bitmask.InitializeLogger() + + b, err := bitmask.InitializeBitmask() + if err != nil { + log.Println("error: cannot initialize bitmask") + } + ctx.bm = b +} + +func startVPN() { + err := ctx.bm.StartVPN(ctx.Provider) + if err != nil { + log.Println(err) + os.Exit(1) + } +} + +func stopVPN() { + err := ctx.bm.StopVPN() + if err != nil { + log.Println(err) + } +} + +// initializeContext initializes an empty connStatus and assigns it to the +// global ctx holder. This is expected to be called only once, so the public +// api uses the sync.Once primitive to call this. +func initializeContext(provider, appName string) { + var st status = off + ctx = &connectionCtx{ + AppName: appName, + Provider: provider, + Donate: false, + Status: st, + } + go trigger(OnStatusChanged) + initializeBitmask() +} diff --git a/pkg/backend/callbacks.go b/pkg/backend/callbacks.go new file mode 100644 index 00000000..5ea3b048 --- /dev/null +++ b/pkg/backend/callbacks.go @@ -0,0 +1,63 @@ +package backend + +import ( + "fmt" + "reflect" + "sync" + "unsafe" +) + +/* NOTE! ATCHUNG! what follow are not silly comments. Well, *this one* is, but + the lines after this are not. + Those are inline C functions, that are invoked by CGO later on. + it's also crucial that you don't any extra space between the function + block and the 'import "C"' line. */ + +// typedef void (*cb)(); +// inline void _do_callback(cb f) { +// f(); +// } +import "C" + +/* callbacks into C-land */ + +var mut sync.Mutex +var stmut sync.Mutex +var cbs = make(map[string](*[0]byte)) +var initOnce sync.Once + +// Events are just a enumeration of all the posible events that C functions can +// be interested in subscribing to. You cannot subscribe to an event that is +// not listed here. +type Events struct { + OnStatusChanged string +} + +const OnStatusChanged string = "OnStatusChanged" + +// subscribe registers a callback from C-land. +// This callback needs to be passed as a void* C function pointer. +func subscribe(event string, fp unsafe.Pointer) { + mut.Lock() + defer mut.Unlock() + e := &Events{} + v := reflect.Indirect(reflect.ValueOf(&e)) + hf := v.Elem().FieldByName(event) + if reflect.ValueOf(hf).IsZero() { + fmt.Println("ERROR: not a valid event:", event) + } else { + cbs[event] = (*[0]byte)(fp) + } +} + +// trigger fires a callback from C-land. +func trigger(event string) { + mut.Lock() + defer mut.Unlock() + cb := cbs[event] + if cb != nil { + C._do_callback(cb) + } else { + fmt.Println("ERROR: this event does not have subscribers:", event) + } +} diff --git a/pkg/backend/mocks.go b/pkg/backend/mocks.go new file mode 100644 index 00000000..a8ede736 --- /dev/null +++ b/pkg/backend/mocks.go @@ -0,0 +1,32 @@ +package backend + +import ( + "log" + "net/http" +) + +/* mock http server: easy way to mocking vpn behavior on ui interaction. This +* should also show a good way of writing functionality tests just for the Qml +* layer */ + +func mockUIOn(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: on") + setStatus(on) +} + +func mockUIOff(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: off") + setStatus(off) +} + +func mockUIFailed(w http.ResponseWriter, r *http.Request) { + log.Println("changing status: failed") + setStatus(failed) +} + +func mockUI() { + http.HandleFunc("/on", mockUIOn) + http.HandleFunc("/off", mockUIOff) + http.HandleFunc("/failed", mockUIFailed) + http.ListenAndServe(":8080", nil) +} diff --git a/pkg/backend/status.go b/pkg/backend/status.go new file mode 100644 index 00000000..e2d31dbe --- /dev/null +++ b/pkg/backend/status.go @@ -0,0 +1,122 @@ +package backend + +import ( + "bytes" + "encoding/json" + "log" + + "0xacab.org/leap/bitmask-vpn/pkg/bitmask" +) + +const ( + offStr = "off" + startingStr = "starting" + onStr = "on" + stoppingStr = "stopping" + failedStr = "failed" +) + +// ctx will be our glorious global object. +// if we ever switch again to a provider-agnostic app, we should keep a map here. +var ctx *connectionCtx + +// the status type reflects the current VPN status. Go code is responsible for updating +// it; the C gui just watches its changes and pulls its updates via the serialized +// context object. + +type status int + +const ( + off status = iota + starting + on + stopping + failed + unknown +) + +func (s status) String() string { + return [...]string{offStr, startingStr, onStr, stoppingStr, failedStr}[s] +} + +func (s status) MarshalJSON() ([]byte, error) { + b := bytes.NewBufferString(`"`) + b.WriteString(s.String()) + b.WriteString(`"`) + return b.Bytes(), nil +} + +func (s status) fromString(st string) status { + switch st { + case offStr: + return off + case startingStr: + return starting + case onStr: + return on + case stoppingStr: + return stopping + case failedStr: + return failed + default: + return unknown + } +} + +// The connectionCtx keeps the global state that is passed around to C-land. It +// also serves as the primary way of passing requests from the frontend to the +// Go-core, by letting the UI write some of these variables and processing +// them. + +type connectionCtx struct { + AppName string `json:"appName"` + Provider string `json:"provider"` + Donate bool `json:"donate"` + Status status `json:"status"` + bm bitmask.Bitmask +} + +func (c connectionCtx) toJson() ([]byte, error) { + stmut.Lock() + defer stmut.Unlock() + b, err := json.Marshal(c) + if err != nil { + log.Println(err) + return nil, err + } + return b, nil +} + +func (c connectionCtx) updateStatus() { + if stStr, err := c.bm.GetStatus(); err != nil { + log.Printf("Error getting status: %v", err) + } else { + setStatusFromStr(stStr) + } + + statusCh := c.bm.GetStatusCh() + for { + select { + case stStr := <-statusCh: + setStatusFromStr(stStr) + } + } +} + +func setStatus(st status) { + stmut.Lock() + defer stmut.Unlock() + ctx.Status = st + go trigger(OnStatusChanged) +} + +func toggleDonate() { + stmut.Lock() + defer stmut.Unlock() + ctx.Donate = !ctx.Donate + go trigger(OnStatusChanged) +} + +func setStatusFromStr(stStr string) { + setStatus(unknown.fromString(stStr)) +} From 48d134eddb40af32156658475b01e7f745854b83 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 20:35:48 +0200 Subject: [PATCH 036/174] [refactor] rename standalone to just vpn --- pkg/bitmask/autostart.go | 45 +++++++++++ pkg/bitmask/init.go | 13 +++- pkg/bitmask/standalone.go | 74 ------------------- pkg/{standalone => vpn}/bonafide/bonafide.go | 0 pkg/vpn/bonafide/bonafide_api_test.go | 15 ++++ .../bonafide/bonafide_integration_test.go | 0 .../bonafide/bonafide_test.go | 0 .../bonafide/eip_service.go | 0 .../bonafide/testdata/cert | 0 .../bonafide/testdata/eip-service.json | 0 .../bonafide/testdata/eip-service3.json | 0 pkg/{standalone => vpn}/launcher.go | 4 +- pkg/{standalone => vpn}/launcher_linux.go | 4 +- pkg/{standalone => vpn}/main.go | 6 +- pkg/{standalone/vpn.go => vpn/openvpn.go} | 4 +- pkg/{standalone => vpn}/status.go | 4 +- 16 files changed, 83 insertions(+), 86 deletions(-) delete mode 100644 pkg/bitmask/standalone.go rename pkg/{standalone => vpn}/bonafide/bonafide.go (100%) create mode 100644 pkg/vpn/bonafide/bonafide_api_test.go rename pkg/{standalone => vpn}/bonafide/bonafide_integration_test.go (100%) rename pkg/{standalone => vpn}/bonafide/bonafide_test.go (100%) rename pkg/{standalone => vpn}/bonafide/eip_service.go (100%) rename pkg/{standalone => vpn}/bonafide/testdata/cert (100%) rename pkg/{standalone => vpn}/bonafide/testdata/eip-service.json (100%) rename pkg/{standalone => vpn}/bonafide/testdata/eip-service3.json (100%) rename pkg/{standalone => vpn}/launcher.go (98%) rename pkg/{standalone => vpn}/launcher_linux.go (98%) rename pkg/{standalone => vpn}/main.go (95%) rename pkg/{standalone/vpn.go => vpn/openvpn.go} (99%) rename pkg/{standalone => vpn}/status.go (98%) diff --git a/pkg/bitmask/autostart.go b/pkg/bitmask/autostart.go index ebab428a..1ba91627 100644 --- a/pkg/bitmask/autostart.go +++ b/pkg/bitmask/autostart.go @@ -1,3 +1,4 @@ +// +build !bitmaskd // Copyright (C) 2018 LEAP // // This program is free software: you can redistribute it and/or modify @@ -15,12 +16,56 @@ package bitmask +import ( + "fmt" + "log" + "os" + "path/filepath" + "regexp" + + pmautostart "github.com/ProtonMail/go-autostart" +) + +const ( + errorMsg = `An error has ocurred initializing the VPN: %v` +) + // Autostart holds the functions to enable and disable the application autostart type Autostart interface { Disable() error Enable() error } +// newAutostart creates a handler for the autostart of your platform +func newAutostart(appName string, iconPath string) Autostart { + exec := os.Args + if os.Getenv("SNAP") != "" { + re := regexp.MustCompile("/snap/([^/]*)/") + match := re.FindStringSubmatch(os.Args[0]) + if len(match) > 1 { + snapName := match[1] + exec = []string{fmt.Sprintf("/snap/bin/%s.launcher", snapName)} + } else { + log.Printf("Snap binary has unknown path: %v", os.Args[0]) + } + } + + if exec[0][:2] == "./" || exec[0][:2] == ".\\" { + var err error + exec[0], err = filepath.Abs(exec[0]) + if err != nil { + log.Printf("Error making the path absolute directory: %v", err) + } + } + + return &pmautostart.App{ + Name: appName, + Exec: exec, + DisplayName: appName, + Icon: iconPath, + } +} + type dummyAutostart struct{} func (a *dummyAutostart) Disable() error { diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index 9af79489..7f10ab9d 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -16,6 +16,7 @@ package bitmask import ( + "errors" "log" "os" "path" @@ -25,6 +26,7 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/config" "0xacab.org/leap/bitmask-vpn/pkg/pid" + "0xacab.org/leap/bitmask-vpn/pkg/vpn" ) type ProviderInfo struct { @@ -45,6 +47,15 @@ func InitializeLogger() { } } +func initBitmask(printer *message.Printer) (Bitmask, error) { + b, err := vpn.Init() + if err != nil { + log.Printf("An error ocurred starting bitmask: %v", err) + err = errors.New(printer.Sprintf(errorMsg, err)) + } + return b, err +} + func InitializeBitmask() (Bitmask, error) { if _, err := os.Stat(config.Path); os.IsNotExist(err) { os.MkdirAll(config.Path, os.ModePerm) @@ -60,7 +71,7 @@ func InitializeBitmask() (Bitmask, error) { conf.Version = "unknown" conf.Printer = initPrinter() - b, err := Init(conf.Printer) + b, err := initBitmask(conf.Printer) if err != nil { // TODO notify failure log.Fatal(err) diff --git a/pkg/bitmask/standalone.go b/pkg/bitmask/standalone.go deleted file mode 100644 index 92ea542c..00000000 --- a/pkg/bitmask/standalone.go +++ /dev/null @@ -1,74 +0,0 @@ -// +build !bitmaskd -// Copyright (C) 2018 LEAP -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -package bitmask - -import ( - "errors" - "fmt" - "log" - "os" - "path/filepath" - "regexp" - - "0xacab.org/leap/bitmask-vpn/pkg/standalone" - pmautostart "github.com/ProtonMail/go-autostart" - "golang.org/x/text/message" -) - -const ( - errorMsg = `An error has ocurred initializing the VPN: %v` -) - -// Init bitmask -func Init(printer *message.Printer) (Bitmask, error) { - b, err := standalone.Init() - if err != nil { - log.Printf("An error ocurred starting standalone bitmask: %v", err) - err = errors.New(printer.Sprintf(errorMsg, err)) - } - return b, err -} - -// newAutostart creates a handler for the autostart of your platform -func newAutostart(appName string, iconPath string) Autostart { - exec := os.Args - if os.Getenv("SNAP") != "" { - re := regexp.MustCompile("/snap/([^/]*)/") - match := re.FindStringSubmatch(os.Args[0]) - if len(match) > 1 { - snapName := match[1] - exec = []string{fmt.Sprintf("/snap/bin/%s.launcher", snapName)} - } else { - log.Printf("Snap binary has unknown path: %v", os.Args[0]) - } - } - - if exec[0][:2] == "./" || exec[0][:2] == ".\\" { - var err error - exec[0], err = filepath.Abs(exec[0]) - if err != nil { - log.Printf("Error making the path absolute directory: %v", err) - } - } - - return &pmautostart.App{ - Name: appName, - Exec: exec, - DisplayName: appName, - Icon: iconPath, - } -} diff --git a/pkg/standalone/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go similarity index 100% rename from pkg/standalone/bonafide/bonafide.go rename to pkg/vpn/bonafide/bonafide.go diff --git a/pkg/vpn/bonafide/bonafide_api_test.go b/pkg/vpn/bonafide/bonafide_api_test.go new file mode 100644 index 00000000..7b48d8f4 --- /dev/null +++ b/pkg/vpn/bonafide/bonafide_api_test.go @@ -0,0 +1,15 @@ +package bonafide + +import ( + "log" + "testing" +) + +func TestBonafideAPI(t *testing.T) { + b := New() + cert, err := b.GetCertPem() + if err != nil { + log.Fatal(err) + } + log.Println(string(cert)) +} diff --git a/pkg/standalone/bonafide/bonafide_integration_test.go b/pkg/vpn/bonafide/bonafide_integration_test.go similarity index 100% rename from pkg/standalone/bonafide/bonafide_integration_test.go rename to pkg/vpn/bonafide/bonafide_integration_test.go diff --git a/pkg/standalone/bonafide/bonafide_test.go b/pkg/vpn/bonafide/bonafide_test.go similarity index 100% rename from pkg/standalone/bonafide/bonafide_test.go rename to pkg/vpn/bonafide/bonafide_test.go diff --git a/pkg/standalone/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go similarity index 100% rename from pkg/standalone/bonafide/eip_service.go rename to pkg/vpn/bonafide/eip_service.go diff --git a/pkg/standalone/bonafide/testdata/cert b/pkg/vpn/bonafide/testdata/cert similarity index 100% rename from pkg/standalone/bonafide/testdata/cert rename to pkg/vpn/bonafide/testdata/cert diff --git a/pkg/standalone/bonafide/testdata/eip-service.json b/pkg/vpn/bonafide/testdata/eip-service.json similarity index 100% rename from pkg/standalone/bonafide/testdata/eip-service.json rename to pkg/vpn/bonafide/testdata/eip-service.json diff --git a/pkg/standalone/bonafide/testdata/eip-service3.json b/pkg/vpn/bonafide/testdata/eip-service3.json similarity index 100% rename from pkg/standalone/bonafide/testdata/eip-service3.json rename to pkg/vpn/bonafide/testdata/eip-service3.json diff --git a/pkg/standalone/launcher.go b/pkg/vpn/launcher.go similarity index 98% rename from pkg/standalone/launcher.go rename to pkg/vpn/launcher.go index 621ba4c3..e18fdc67 100644 --- a/pkg/standalone/launcher.go +++ b/pkg/vpn/launcher.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package standalone +package vpn import ( "bytes" @@ -29,7 +29,7 @@ import ( "time" "0xacab.org/leap/bitmask-vpn/pkg/config" - "0xacab.org/leap/bitmask-vpn/pkg/standalone/bonafide" + "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" ) type launcher struct { diff --git a/pkg/standalone/launcher_linux.go b/pkg/vpn/launcher_linux.go similarity index 98% rename from pkg/standalone/launcher_linux.go rename to pkg/vpn/launcher_linux.go index 5b66415b..71a74eaf 100644 --- a/pkg/standalone/launcher_linux.go +++ b/pkg/vpn/launcher_linux.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package standalone +package vpn import ( "errors" @@ -24,7 +24,7 @@ import ( "strings" "0xacab.org/leap/bitmask-vpn/pkg/config" - "0xacab.org/leap/bitmask-vpn/pkg/standalone/bonafide" + "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" "github.com/keybase/go-ps" ) diff --git a/pkg/standalone/main.go b/pkg/vpn/main.go similarity index 95% rename from pkg/standalone/main.go rename to pkg/vpn/main.go index 4ac57769..ce599c94 100644 --- a/pkg/standalone/main.go +++ b/pkg/vpn/main.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package standalone +package vpn import ( "io/ioutil" @@ -21,7 +21,7 @@ import ( "os" "0xacab.org/leap/bitmask-vpn/pkg/config" - "0xacab.org/leap/bitmask-vpn/pkg/standalone/bonafide" + "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" "0xacab.org/leap/shapeshifter" "github.com/apparentlymart/go-openvpn-mgmt/openvpn" ) diff --git a/pkg/standalone/vpn.go b/pkg/vpn/openvpn.go similarity index 99% rename from pkg/standalone/vpn.go rename to pkg/vpn/openvpn.go index 4682a47e..a75b830a 100644 --- a/pkg/standalone/vpn.go +++ b/pkg/vpn/openvpn.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package standalone +package vpn import ( "fmt" diff --git a/pkg/standalone/status.go b/pkg/vpn/status.go similarity index 98% rename from pkg/standalone/status.go rename to pkg/vpn/status.go index 96177e18..a4d7ada3 100644 --- a/pkg/standalone/status.go +++ b/pkg/vpn/status.go @@ -1,4 +1,4 @@ -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package standalone +package vpn import ( "fmt" From b15ebb5d849f1ba80909076d3f3f7fa7f6c1be47 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 20:39:11 +0200 Subject: [PATCH 037/174] [docs] add some TODOs in the README --- README.md | 20 +++++++------------- pkg/config/version/version.go | 7 +++++++ 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 pkg/config/version/version.go diff --git a/README.md b/README.md index 1895e6bd..22bed219 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Install it ---------- Install dependencies: + +TODO: add qt5 deps here + ``` # make depends ``` @@ -99,24 +102,14 @@ Run it: ``` - -Bitmaskd -------------- -Is also posible to compile the systray to use bitmask as backend: -``` - $ go build -tags bitmaskd -``` - -In that case bitmask-systray assumes that you already have bitmaskd running. Run bitmask and the systray: -``` - $ bitmaskd - $ build/bin/bitmask-vpn -``` +./build.sh i18n ---- +TODO: move this to developer docs + The translations are done in transifex. To help us contribute your translations there and/or review the existing ones: https://www.transifex.com/otf/bitmask/RiseupVPN/ @@ -126,6 +119,7 @@ When a string has being modified you need to regenerate the locales: $ make generate_locales ``` + To fetch the translations from transifex and rebuild the catalog.go (API\_TOKEN is the transifex API token): ``` $ API_TOKEN='xxxxxxxxxxx' make locales diff --git a/pkg/config/version/version.go b/pkg/config/version/version.go new file mode 100644 index 00000000..f587180b --- /dev/null +++ b/pkg/config/version/version.go @@ -0,0 +1,7 @@ +package version +// AUTO-GENERATED. DO NOT EDIT +// 2020-11-01 20:44:12.8327052 +0100 CET m=+0.136413501 + +// VERSION is generated by git-describe from gen.go +var VERSION = "0.20.4-165-g1f6a24e" + \ No newline at end of file From f0886b0123d9fe5d7b5f8ba65088798f86d2fafb Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 18:39:43 +0200 Subject: [PATCH 038/174] [docs] remove references to deprecated bitmaskd --- Makefile | 20 +++++++------------- README.md | 2 +- pkg/bitmask/autostart.go | 1 - 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index ff93dd30..72ae1776 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,7 @@ # (c) LEAP Encryption Access Project, 2019-2020 ######################################################################### -.PHONY: all get build build_bitmaskd icon locales generate_locales clean - -TAGS ?= gtk_3_18 +.PHONY: all get build icon locales generate_locales clean XBUILD ?= no SKIP_CACHECK ?= no @@ -41,17 +39,16 @@ install_go: @sudo apt-get install golang-go depends: - -@make depends$(patsubst CYGWIN%,Cygwin, $(UNAME)) - @go get -u golang.org/x/text/cmd/gotext github.com/cratonica/2goarray - + -@make depends$(UNAME) + dependsLinux: - @sudo apt install libgtk-3-dev libappindicator3-dev golang pkg-config dh-golang golang-golang-x-text-dev cmake devscripts fakeroot debhelper curl + @sudo apt install golang pkg-config dh-golang golang-golang-x-text-dev cmake devscripts fakeroot debhelper curl @make -C docker deps @# debian needs also: snap install snapcraft --classic; snap install multipass --beta --classic dependsDarwin: # TODO - bootstrap homebrew if not there - @brew install python3 golang make pkg-config upx curl + @brew install python3 golang make pkg-config curl @brew install --default-names gnu-sed dependsCygwin: @@ -84,9 +81,6 @@ build_%: test: @go test -tags "integration $(TAGS)" ./... -build_bitmaskd: - @go build -tags "$(TAGS) bitmaskd" -ldflags "-X main.version=`git describe --tags`" ./cmd/* - build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' @@ -97,7 +91,7 @@ ifeq ($(ARCH), 386) CXXPath ?= i686-w64-mingw32-c++ else CCPath ?= x86_64-w64-mingw32-gcc - CXXPath ?= x86_64-w64-mingw32-c++ + CXXPath ?= x86_64-w64-mingw32-c++-- endif CROSS_WIN_FLAGS = CGO_ENABLED=1 GOARCH=$(ARCH) GOOS=windows CC=$(CCPath) CGO_LDFLAGS="-lssp" CXX=$(CXXPath) @@ -264,7 +258,7 @@ generate_locales: @gotext update -lang=$(lang_list) ./pkg/systray ./pkg/bitmask @make -C tools/transifex -locales/%/out.gotext.json: pkg/systray/systray.go pkg/systray/notificator.go pkg/bitmask/standalone.go pkg/bitmask/bitmaskd.go +locales/%/out.gotext.json: pkg/systray/systray.go pkg/systray/notificator.go pkg/bitmask/standalone.go @gotext update -lang=$* ./pkg/systray ./pkg/bitmask cmd/bitmask-vpn/catalog.go: $(foreach lang,$(LANGS),locales/$(lang)/messages.gotext.json) diff --git a/README.md b/README.md index 22bed219..5ab3d9c9 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,6 @@ When you report an issue include the following information: * what you got * the version of the program. You can check the version on the about page. * the logs of the program. The location of the logs depends on the OS: - * linux: `/home//.config/leap/bitmaskd.log` & `/home//.config/leap/systray.log` + * linux: `/home//.config/leap/systray.log` * OSX: `/Users//Library/Preferences/leap/systray.log`, `/Applications/RiseupVPN.app/Contents/helper/helper.log` & `/Applications/RiseupVPN.app/Contents/helper/openvpn.log` * windows: `C:\Users\\AppData\Local\leap\systray.log`, `C:\Program Files\RiseupVPN\helper.log` & `C:\Program Files\RiseupVPN\openvp.log` diff --git a/pkg/bitmask/autostart.go b/pkg/bitmask/autostart.go index 1ba91627..9e37fe4c 100644 --- a/pkg/bitmask/autostart.go +++ b/pkg/bitmask/autostart.go @@ -1,4 +1,3 @@ -// +build !bitmaskd // Copyright (C) 2018 LEAP // // This program is free software: you can redistribute it and/or modify From 164d628bb13762218a3dfff5682ff27fd12cafef Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 21:28:48 +0200 Subject: [PATCH 039/174] [feat] re-implement donation reminders first pass on giving functionality to the donation reminder --- gui/backend.go | 11 +++-- gui/handlers.cpp | 16 +++++- gui/handlers.h | 4 +- gui/qml/DonateDialog.qml | 5 +- gui/qml/main.qml | 7 +-- pkg/backend/api.go | 29 +++++++---- pkg/backend/bitmask.go | 19 ++++++-- pkg/backend/donate.go | 35 +++++++++++++ pkg/backend/status.go | 103 +++++++++++++++++++-------------------- pkg/config/gui.go | 14 +++--- 10 files changed, 158 insertions(+), 85 deletions(-) create mode 100644 pkg/backend/donate.go diff --git a/gui/backend.go b/gui/backend.go index 9c65025a..ab96edbe 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -31,9 +31,14 @@ func Quit() { } -//export ToggleDonate -func ToggleDonate() { - backend.ToggleDonate() +//export DonateAccepted +func DonateAccepted() { + backend.DonateAccepted() +} + +//export DonateRejected +func DonateRejected() { + backend.DonateRejected() } //export SubscribeToEvent diff --git a/gui/handlers.cpp b/gui/handlers.cpp index e37de2d1..39a57469 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include "handlers.h" #include "lib/libgoshim.h" @@ -23,9 +25,19 @@ void Backend::unblock() Unblock(); } -void Backend::toggleDonate() +void Backend::donateAccepted() { - ToggleDonate(); + DonateAccepted(); +} + +void Backend::donateRejected() +{ + DonateRejected(); +} + +void Backend::openURL(QString link) +{ + QDesktopServices::openUrl(QUrl(link)); } void Backend::quit() diff --git a/gui/handlers.h b/gui/handlers.h index 3fe9eed5..e65fd5eb 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -33,7 +33,9 @@ public slots: void switchOn(); void switchOff(); void unblock(); - void toggleDonate(); + void donateAccepted(); + void donateRejected(); + void openURL(QString link); void quit(); }; diff --git a/gui/qml/DonateDialog.qml b/gui/qml/DonateDialog.qml index b7431abe..eb761a4a 100644 --- a/gui/qml/DonateDialog.qml +++ b/gui/qml/DonateDialog.qml @@ -16,12 +16,13 @@ MessageDialog { onAccepted: { if (backend) { - backend.donateAccepted(true) + backend.openURL(ctx.donateURL) + backend.donateAccepted() } } onRejected: { if (backend) { - backend.donateAccepted(false) + backend.donateRejected() } } } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 98eac800..65c09cb9 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -16,10 +16,9 @@ ApplicationWindow { target: jsonModel onDataChanged: { ctx = JSON.parse(jsonModel.getJson()); - if (ctx.donate == 'true') { + if (ctx.donateDialog == 'true') { console.debug(jsonModel.getJson()) donate.visible = true - backend.toggleDonate() } } } @@ -171,7 +170,9 @@ ApplicationWindow { MenuItem { text: qsTr("Donate...") visible: true - //onTriggered: donate.open() + onTriggered: { + donate.visible = true + } } MenuItem { diff --git a/pkg/backend/api.go b/pkg/backend/api.go index f924cbda..5cb0304d 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -6,6 +6,7 @@ import ( "C" "fmt" "log" + "time" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" @@ -23,18 +24,24 @@ func SwitchOff() { } func Unblock() { + //TODO fmt.Println("unblock... [not implemented]") } func Quit() { if ctx.Status != off { go setStatus(stopping) + ctx.cfg.SetUserStoppedVPN(true) stopVPN() } } -func ToggleDonate() { - toggleDonate() +func DonateAccepted() { + donateAccepted() +} + +func DonateRejected() { + donateRejected() } func SubscribeToEvent(event string, f unsafe.Pointer) { @@ -42,21 +49,23 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { } func InitializeBitmaskContext() { - pi := bitmask.GetConfiguredProvider() + p := bitmask.GetConfiguredProvider() initOnce.Do(func() { - initializeContext(pi.Provider, pi.AppName) + initializeContext( + p.Provider, p.AppName) }) go ctx.updateStatus() - /* DEBUG - timer := time.NewTimer(time.Second * 3) go func() { - <-timer.C - fmt.Println("donate timer fired") - toggleDonate() + if needsDonationReminder() { + // wait a bit before launching reminder + timer := time.NewTimer(time.Minute * 5) + <-timer.C + showDonate() + } + }() - */ } func RefreshContext() *C.char { diff --git a/pkg/backend/bitmask.go b/pkg/backend/bitmask.go index 07d27ea6..8fd2367a 100644 --- a/pkg/backend/bitmask.go +++ b/pkg/backend/bitmask.go @@ -5,6 +5,7 @@ import ( "os" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/config" ) func initializeBitmask() { @@ -19,6 +20,7 @@ func initializeBitmask() { log.Println("error: cannot initialize bitmask") } ctx.bm = b + ctx.cfg = config.ParseConfig() } func startVPN() { @@ -36,16 +38,25 @@ func stopVPN() { } } +func wantDonations() bool { + if config.AskForDonations == "true" { + return true + } + return false +} + // initializeContext initializes an empty connStatus and assigns it to the // global ctx holder. This is expected to be called only once, so the public // api uses the sync.Once primitive to call this. func initializeContext(provider, appName string) { var st status = off ctx = &connectionCtx{ - AppName: appName, - Provider: provider, - Donate: false, - Status: st, + AppName: appName, + Provider: provider, + DonateURL: config.DonateURL, + AskForDonations: wantDonations(), + DonateDialog: false, + Status: st, } go trigger(OnStatusChanged) initializeBitmask() diff --git a/pkg/backend/donate.go b/pkg/backend/donate.go new file mode 100644 index 00000000..d2166876 --- /dev/null +++ b/pkg/backend/donate.go @@ -0,0 +1,35 @@ +package backend + +import ( + "log" + "time" +) + +func needsDonationReminder() bool { + return ctx.cfg.NeedsDonationReminder() +} + +func donateAccepted() { + stmut.Lock() + defer stmut.Unlock() + ctx.DonateDialog = false + log.Println("marking as donated") + ctx.cfg.SetDonated() + go trigger(OnStatusChanged) +} + +func donateRejected() { + timer := time.NewTimer(time.Hour) + go func() { + <-timer.C + showDonate() + }() +} + +func showDonate() { + stmut.Lock() + defer stmut.Unlock() + ctx.DonateDialog = true + ctx.cfg.SetLastReminded() + go trigger(OnStatusChanged) +} diff --git a/pkg/backend/status.go b/pkg/backend/status.go index e2d31dbe..7e9f211f 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -6,6 +6,7 @@ import ( "log" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/config" ) const ( @@ -20,60 +21,20 @@ const ( // if we ever switch again to a provider-agnostic app, we should keep a map here. var ctx *connectionCtx -// the status type reflects the current VPN status. Go code is responsible for updating -// it; the C gui just watches its changes and pulls its updates via the serialized -// context object. - -type status int - -const ( - off status = iota - starting - on - stopping - failed - unknown -) - -func (s status) String() string { - return [...]string{offStr, startingStr, onStr, stoppingStr, failedStr}[s] -} - -func (s status) MarshalJSON() ([]byte, error) { - b := bytes.NewBufferString(`"`) - b.WriteString(s.String()) - b.WriteString(`"`) - return b.Bytes(), nil -} - -func (s status) fromString(st string) status { - switch st { - case offStr: - return off - case startingStr: - return starting - case onStr: - return on - case stoppingStr: - return stopping - case failedStr: - return failed - default: - return unknown - } -} - // The connectionCtx keeps the global state that is passed around to C-land. It // also serves as the primary way of passing requests from the frontend to the // Go-core, by letting the UI write some of these variables and processing // them. type connectionCtx struct { - AppName string `json:"appName"` - Provider string `json:"provider"` - Donate bool `json:"donate"` - Status status `json:"status"` - bm bitmask.Bitmask + AppName string `json:"appName"` + Provider string `json:"provider"` + AskForDonations bool `json:"askForDonations"` + DonateDialog bool `json:"donateDialog"` + DonateURL string `json:"donateURL"` + Status status `json:"status"` + bm bitmask.Bitmask + cfg *config.Config } func (c connectionCtx) toJson() ([]byte, error) { @@ -110,11 +71,47 @@ func setStatus(st status) { go trigger(OnStatusChanged) } -func toggleDonate() { - stmut.Lock() - defer stmut.Unlock() - ctx.Donate = !ctx.Donate - go trigger(OnStatusChanged) +// the status type reflects the current VPN status. Go code is responsible for updating +// it; the C gui just watches its changes and pulls its updates via the serialized +// context object. + +type status int + +const ( + off status = iota + starting + on + stopping + failed + unknown +) + +func (s status) String() string { + return [...]string{offStr, startingStr, onStr, stoppingStr, failedStr}[s] +} + +func (s status) MarshalJSON() ([]byte, error) { + b := bytes.NewBufferString(`"`) + b.WriteString(s.String()) + b.WriteString(`"`) + return b.Bytes(), nil +} + +func (s status) fromString(st string) status { + switch st { + case offStr: + return off + case startingStr: + return starting + case onStr: + return on + case stoppingStr: + return stopping + case failedStr: + return failed + default: + return unknown + } } func setStatusFromStr(stStr string) { diff --git a/pkg/config/gui.go b/pkg/config/gui.go index ce3f14d6..5fa4886f 100644 --- a/pkg/config/gui.go +++ b/pkg/config/gui.go @@ -37,7 +37,7 @@ var ( // Config holds the configuration of the systray type Config struct { file struct { - LastNotification time.Time + LastReminded time.Time Donated time.Time SelectGateway bool Obfs4 bool @@ -77,16 +77,16 @@ func (c *Config) SetUserStoppedVPN(vpnStopped bool) error { return c.save() } -func (c *Config) HasDonated() bool { - return c.file.Donated.Add(oneMonth).After(time.Now()) +func (c *Config) NeedsDonationReminder() bool { + return !c.hasDonated() && c.file.LastReminded.Add(oneDay).Before(time.Now()) } -func (c *Config) NeedsNotification() bool { - return !c.HasDonated() && c.file.LastNotification.Add(oneDay).Before(time.Now()) +func (c *Config) hasDonated() bool { + return c.file.Donated.Add(oneMonth).After(time.Now()) } -func (c *Config) SetNotification() error { - c.file.LastNotification = time.Now() +func (c *Config) SetLastReminded() error { + c.file.LastReminded = time.Now() return c.save() } From 1d4797828b359006809a4b8f62109045ee2389de Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 21:36:12 +0200 Subject: [PATCH 040/174] [feat] open help url --- gui/qml/main.qml | 8 +++----- pkg/backend/bitmask.go | 2 ++ pkg/backend/status.go | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 65c09cb9..b9b844a6 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -164,20 +164,18 @@ ApplicationWindow { MenuItem { text: qsTr("Help...") - //onTriggered: ctxSystray.help() + onTriggered: backend.openURL(ctx.helpURL) } MenuItem { text: qsTr("Donate...") visible: true - onTriggered: { - donate.visible = true - } + onTriggered: { donate.visible = true } } MenuItem { text: qsTr("About...") - //onTriggered: about.open() + //onTriggered: { about.visible = true } } MenuSeparator {} diff --git a/pkg/backend/bitmask.go b/pkg/backend/bitmask.go index 8fd2367a..feff1152 100644 --- a/pkg/backend/bitmask.go +++ b/pkg/backend/bitmask.go @@ -53,6 +53,8 @@ func initializeContext(provider, appName string) { ctx = &connectionCtx{ AppName: appName, Provider: provider, + TosURL: config.TosURL, + HelpURL: config.HelpURL, DonateURL: config.DonateURL, AskForDonations: wantDonations(), DonateDialog: false, diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 7e9f211f..6b13dd30 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -29,6 +29,8 @@ var ctx *connectionCtx type connectionCtx struct { AppName string `json:"appName"` Provider string `json:"provider"` + TosURL string `json:"tosURL"` + HelpURL string `json:"helpURL"` AskForDonations bool `json:"askForDonations"` DonateDialog bool `json:"donateDialog"` DonateURL string `json:"donateURL"` From e9058d3c60221b27d6bc10b66c11a390ec968854 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 22:05:10 +0200 Subject: [PATCH 041/174] [pkg] add generation of vendored config again --- Makefile | 2 +- gui/backend.go | 2 ++ pkg/config/config.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 72ae1776..7e8d6dd0 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ ifeq (${SKIP_CACHECK}, no) endif generate: - @go generate cmd/bitmask-vpn/main.go + @go generate gui/backend.go relink_default: ifneq (,$(wildcard ${DEFAULT_PROVIDER})) diff --git a/gui/backend.go b/gui/backend.go index ab96edbe..edb2b173 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -1,5 +1,7 @@ package main +//go:generate python3 ../branding/scripts/vendorize.py ../branding/templates/bitmaskvpn/config.go ../branding/config/vendor.conf ../pkg/config/config.go + /* a wrapper around bitmask that exposes status to a QtQml gui. Have a look at the pkg/backend module for further enlightment. */ diff --git a/pkg/config/config.go b/pkg/config/config.go index 4228dae2..ad159a12 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,6 +1,6 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by vendorize.py -// At 2020-04-14 18:42:06 +// At 2020-06-16 21:44:41 package config From 82d32b45bda4097f5be588273b5174aa21d665f4 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 22:06:23 +0200 Subject: [PATCH 042/174] [pkg] remove vendoring from Makefile --- Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7e8d6dd0..3b0fb74d 100644 --- a/Makefile +++ b/Makefile @@ -132,12 +132,7 @@ build_all_providers: # packaging templates ######################################################################### -prepare: re_vendor prepare_templates gen_pkg_win gen_pkg_osx gen_pkg_snap gen_pkg_deb prepare_done - -re_vendor: - # we update the module vendoring in case we're building with a different - # go version than in development - @go mod vendor +prepare: prepare_templates gen_pkg_win gen_pkg_osx gen_pkg_snap gen_pkg_deb prepare_done prepare_templates: generate relink_default tgz @mkdir -p build/${PROVIDER}/bin/ deploy From 60512bb2bcafd66dd21a5b47e4efb4139ed9726d Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 16 Jun 2020 22:14:35 +0200 Subject: [PATCH 043/174] [feat] include git version in generated variable --- build.sh | 1 + pkg/config/version/.gitignore | 1 + pkg/config/version/LICENSE | 19 +++++++ pkg/config/version/gen.go | 3 ++ pkg/config/version/main.go | 95 +++++++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+) create mode 100644 pkg/config/version/.gitignore create mode 100644 pkg/config/version/LICENSE create mode 100644 pkg/config/version/gen.go create mode 100644 pkg/config/version/main.go diff --git a/build.sh b/build.sh index 402525f1..4ce1e777 100755 --- a/build.sh +++ b/build.sh @@ -28,6 +28,7 @@ function init { function buildGoLib { echo "[+] Using go in" $GO "[`go version`]" + $GO generate ./pkg/config/version/gen.go if [ "$XBUILD" == "no" ] then echo "[+] Building Go library with standard Go compiler" diff --git a/pkg/config/version/.gitignore b/pkg/config/version/.gitignore new file mode 100644 index 00000000..f53f6d39 --- /dev/null +++ b/pkg/config/version/.gitignore @@ -0,0 +1 @@ +version.go diff --git a/pkg/config/version/LICENSE b/pkg/config/version/LICENSE new file mode 100644 index 00000000..8ba54919 --- /dev/null +++ b/pkg/config/version/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Vincent Batts, Raleigh, NC, USA + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/pkg/config/version/gen.go b/pkg/config/version/gen.go new file mode 100644 index 00000000..334ed50a --- /dev/null +++ b/pkg/config/version/gen.go @@ -0,0 +1,3 @@ +package main + +//go:generate go run . -output version.go diff --git a/pkg/config/version/main.go b/pkg/config/version/main.go new file mode 100644 index 00000000..a86b6196 --- /dev/null +++ b/pkg/config/version/main.go @@ -0,0 +1,95 @@ +package main + +import ( + "flag" + "io" + "log" + "os" + "os/exec" + "path/filepath" + "strings" + "text/template" + "time" +) + +var ( + flPackageName = flag.String("package", "main", "name for the generated golang package") + flVariableName = flag.String("variable", "VERSION", "variable name in the generated golang package") + flOutputFile = flag.String("output", "", "output filename (default stdout)") +) + +func main() { + flag.Parse() + dir := "." + if flag.NArg() > 0 { + dir = flag.Args()[0] + } + dir, err := filepath.Abs(dir) + if err != nil { + log.Fatal(err) + } + + var output io.Writer + if len(*flOutputFile) > 0 { + fh, err := os.Create(*flOutputFile) + if err != nil { + log.Fatal(err) + } + defer fh.Close() + output = fh + } else { + output = os.Stdout + } + + vers, err := GitDescribe(dir) + if err != nil { + log.Fatal(err) + } + vp := VersionPackage{ + Name: *flPackageName, + Path: dir, + Date: time.Now(), + Variable: *flVariableName, + Version: vers, + } + + packageTemplate.Execute(output, vp) +} + +// VersionPackage is the needed information to template a version package +type VersionPackage struct { + Name string + Path string + Date time.Time + Variable string + Version string +} + +var packageTemplate = template.Must(template.New("default").Parse(packageLayout)) +var packageLayout = `package {{.Name}} +// AUTO-GENERATED. DO NOT EDIT +// {{.Date}} + +// {{.Variable}} is generated by git-describe from gen.go +var {{.Variable}} = "{{.Version}}" + ` + +// GitDescribe calls `git describe` in the provided path +func GitDescribe(path string) (string, error) { + cwd, err := os.Getwd() + if err != nil { + return "", err + } + // TODO check if this is a directory + if err := os.Chdir(path); err != nil { + return "", err + } + defer os.Chdir(cwd) + + buf, err := exec.Command("git", "describe").CombinedOutput() + if err != nil { + return "", err + } + + return strings.TrimSpace(string(buf)), nil +} From df91e06fc1d5978d6c7065b91910fb5e840ea31e Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 17 Jun 2020 13:17:16 +0200 Subject: [PATCH 044/174] [feat] working about dialog --- build.sh | 2 +- gui/gui.qrc | 2 + gui/qml/AboutDialog.qml | 26 +++++++++++++ gui/qml/DonateDialog.qml | 6 +-- gui/qml/LoginConfirmation.qml | 11 ++++++ gui/qml/LoginDialog.qml | 28 ++++++++++++++ gui/qml/main.qml | 51 +++++++++++++------------ pkg/backend/bitmask.go | 2 + pkg/backend/status.go | 1 + pkg/config/version/gen.go | 3 -- pkg/config/version/genver/gen.go | 3 ++ pkg/config/version/{ => genver}/main.go | 2 +- 12 files changed, 105 insertions(+), 32 deletions(-) create mode 100644 gui/qml/AboutDialog.qml create mode 100644 gui/qml/LoginConfirmation.qml create mode 100644 gui/qml/LoginDialog.qml delete mode 100644 pkg/config/version/gen.go create mode 100644 pkg/config/version/genver/gen.go rename pkg/config/version/{ => genver}/main.go (95%) diff --git a/build.sh b/build.sh index 4ce1e777..c7085a69 100755 --- a/build.sh +++ b/build.sh @@ -28,7 +28,7 @@ function init { function buildGoLib { echo "[+] Using go in" $GO "[`go version`]" - $GO generate ./pkg/config/version/gen.go + $GO generate ./pkg/config/version/genver/gen.go if [ "$XBUILD" == "no" ] then echo "[+] Building Go library with standard Go compiler" diff --git a/gui/gui.qrc b/gui/gui.qrc index b0cd72c9..28fcf7f4 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -1,7 +1,9 @@ qml/main.qml + qml/AboutDialog.qml qml/DonateDialog.qml + qml/LoginDialog.qml assets/icon/png/black/vpn_off.png assets/icon/png/black/vpn_on.png diff --git a/gui/qml/AboutDialog.qml b/gui/qml/AboutDialog.qml new file mode 100644 index 00000000..98cacdc5 --- /dev/null +++ b/gui/qml/AboutDialog.qml @@ -0,0 +1,26 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 + +MessageDialog { + title: qsTr("About") + text: getText() + informativeText: getVersion() + + function getText() { + var _name = ctx ? ctx.appName : "vpn" + var _provider = ctx ? ctx.provider : "unknown" + var _donateURL= ctx ? ctx.donateURL : "..." + var _tosURL = ctx ? ctx.tosURL : "..." + var _txt = qsTr( + "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

This service is paid for entirely by donations from users like you. Please donate.

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

").arg(_name).arg(_provider).arg(_donateURL).arg(_tosURL) + return _txt + } + + function getVersion() { + var _name = ctx ? ctx.appName : "vpn" + var _ver = ctx ? ctx.version : "unknown" + var _txt = "%1 version: %2".arg(_name).arg(_ver) + return _txt + } +} + diff --git a/gui/qml/DonateDialog.qml b/gui/qml/DonateDialog.qml index eb761a4a..fd27a6bf 100644 --- a/gui/qml/DonateDialog.qml +++ b/gui/qml/DonateDialog.qml @@ -3,15 +3,15 @@ import QtQuick.Dialogs 1.2 MessageDialog { standardButtons: StandardButton.No | StandardButton.Yes - title: "Donate" + title: qsTr("Donate") icon: StandardIcon.Warning text: getText() function getText() { var _name = ctx ? ctx.appName : "vpn" - var donateTxt = qsTr( + var _txt = qsTr( "The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\nDo you want to donate now?").arg(_name) - return donateTxt + return _txt } onAccepted: { diff --git a/gui/qml/LoginConfirmation.qml b/gui/qml/LoginConfirmation.qml new file mode 100644 index 00000000..476cdadb --- /dev/null +++ b/gui/qml/LoginConfirmation.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 +import QtQuick.Controls 1.4 + +Dialog { + standardButtons: StandardButton.Ok + title: "Login Success" + text: "You are now logged in, connecting now" + + visible: ctxSystray.loginConfirmationDialog == true +} diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml new file mode 100644 index 00000000..fbe5ce12 --- /dev/null +++ b/gui/qml/LoginDialog.qml @@ -0,0 +1,28 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 +import QtQuick.Controls 1.4 + +Dialog { + standardButtons: StandardButton.Ok + title: "Login" + Column { + anchors.fill: parent + Text { + text: "Log in with your library credentials" + } + TextField { + id: username + placeholderText: "patron id" + } + TextField { + id: password + placeholderText: "password" + echoMode: TextInput.PasswordEchoOnEdit + } + } + + visible: false + //visible: ctx.showLogin == true + //onAccepted: backend.login(username.text, password.text) + onRejected: backend.quit() // TODO: it doesn't close +} diff --git a/gui/qml/main.qml b/gui/qml/main.qml index b9b844a6..8d756c6c 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -175,7 +175,7 @@ ApplicationWindow { MenuItem { text: qsTr("About...") - //onTriggered: { about.visible = true } + onTriggered: { about.visible = true } } MenuSeparator {} @@ -188,48 +188,51 @@ ApplicationWindow { } DonateDialog { - visible: false id: donate + visible: false } -} + AboutDialog { + id: about + visible: false + } - /* LoginDialog { id: login + visible: false } - MessageDialog { - id: about - buttons: MessageDialog.Ok - title: "About" - text: "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

-

This service is paid for entirely by donations from users like you. Please donate.

-

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

".arg(ctxSystray.applicationName).arg(ctxSystray.provider).arg(ctxSystray.donateURL).arg(ctxSystray.tosURL) - informativeText: "%1 version: %2".arg(ctxSystray.applicationName).arg(ctxSystray.version) - } + MessageDialog { id: errorStartingVPN buttons: MessageDialog.Ok modality: Qt.NonModal - title: "Error starting VPN" - text: "Can't connect to %1".arg(ctxSystray.applicationName) - detailedText: ctxSystray.errorStartingMsg - visible: ctxSystray.errorStartingMsg != "" + title: qsTr("Error starting VPN") + text: "" + detailedText: "" + visible: false + //text: ctx ? qsTr("Can't connect to %1").arg(ctx.appName) : "" + //detailedText: ctx ? ctx.errorStartingMsg : "" + //visible: ctx.errorStartingMsg != "" } + MessageDialog { id: authAgent buttons: MessageDialog.Ok modality: Qt.NonModal - title: "Missing authentication agent" - text: "Could not find a polkit authentication agent. Please run one and try again." - visible: ctxSystray.authAgent == true + title: qsTr("Missing authentication agent") + text: qsTr("Could not find a polkit authentication agent. Please run one and try again.") + visible: false + //visible: ctx.missingAuthAgent == "true" } + MessageDialog { id: initFailure buttons: MessageDialog.Ok modality: Qt.NonModal - title: "Initialization Error" - text: ctxSystray.errorInitMsg - visible: ctxSystray.errorInitMsg != "" + title: qsTr("Initialization Error") + text: "" + visible: false + //text: ctx ? ctx.errorInitMsg : "" + //visible: ctx.errorInitMsg != "" } - */ +} diff --git a/pkg/backend/bitmask.go b/pkg/backend/bitmask.go index feff1152..2b588596 100644 --- a/pkg/backend/bitmask.go +++ b/pkg/backend/bitmask.go @@ -6,6 +6,7 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/bitmask" "0xacab.org/leap/bitmask-vpn/pkg/config" + "0xacab.org/leap/bitmask-vpn/pkg/config/version" ) func initializeBitmask() { @@ -58,6 +59,7 @@ func initializeContext(provider, appName string) { DonateURL: config.DonateURL, AskForDonations: wantDonations(), DonateDialog: false, + Version: version.VERSION, Status: st, } go trigger(OnStatusChanged) diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 6b13dd30..84b27b7c 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -34,6 +34,7 @@ type connectionCtx struct { AskForDonations bool `json:"askForDonations"` DonateDialog bool `json:"donateDialog"` DonateURL string `json:"donateURL"` + Version string `json:"version"` Status status `json:"status"` bm bitmask.Bitmask cfg *config.Config diff --git a/pkg/config/version/gen.go b/pkg/config/version/gen.go deleted file mode 100644 index 334ed50a..00000000 --- a/pkg/config/version/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -//go:generate go run . -output version.go diff --git a/pkg/config/version/genver/gen.go b/pkg/config/version/genver/gen.go new file mode 100644 index 00000000..e4538240 --- /dev/null +++ b/pkg/config/version/genver/gen.go @@ -0,0 +1,3 @@ +package main + +//go:generate go run . -output ../version.go diff --git a/pkg/config/version/main.go b/pkg/config/version/genver/main.go similarity index 95% rename from pkg/config/version/main.go rename to pkg/config/version/genver/main.go index a86b6196..e0d80b01 100644 --- a/pkg/config/version/main.go +++ b/pkg/config/version/genver/main.go @@ -13,7 +13,7 @@ import ( ) var ( - flPackageName = flag.String("package", "main", "name for the generated golang package") + flPackageName = flag.String("package", "version", "name for the generated golang package") flVariableName = flag.String("variable", "VERSION", "variable name in the generated golang package") flOutputFile = flag.String("output", "", "output filename (default stdout)") ) From 0fa2d729d4b812f8c54db82caccaa8537371b982 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 17 Jun 2020 18:54:54 +0200 Subject: [PATCH 045/174] [feat] quit signal handler --- gui/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gui/main.cpp b/gui/main.cpp index 5ecd4add..eca834a9 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,10 +1,12 @@ +#include +#include + #include #include #include #include #include #include -#include #include "handlers.h" #include "qjsonmodel.h" @@ -32,7 +34,13 @@ std::string getEnv(std::string const& key) return val == NULL ? std::string() : std::string(val); } +void signalHandler(int signum) { + Quit(); + exit(0); +} + int main(int argc, char **argv) { + signal(SIGINT, signalHandler); bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; @@ -80,6 +88,7 @@ int main(int argc, char **argv) { QGuiApplication::quit(); }); + /* register statusChanged callback with CGO */ const char *stCh = "OnStatusChanged"; GoString statusChangedEvt = {stCh, (long int)strlen(stCh)}; From ca70e7a8cc07a1feecd731c9a7b1d131d7a5861a Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 17 Jun 2020 19:40:24 +0200 Subject: [PATCH 046/174] [feat] cleanup temp dirs on quit --- pkg/backend/actions.go | 21 +++++++++++++++++++++ pkg/backend/api.go | 10 ++++------ pkg/backend/cleanup.go | 16 ++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 pkg/backend/actions.go create mode 100644 pkg/backend/cleanup.go diff --git a/pkg/backend/actions.go b/pkg/backend/actions.go new file mode 100644 index 00000000..725a550f --- /dev/null +++ b/pkg/backend/actions.go @@ -0,0 +1,21 @@ +package backend + +import ( + "log" + "os" +) + +func startVPN() { + err := ctx.bm.StartVPN(ctx.Provider) + if err != nil { + log.Println(err) + os.Exit(1) + } +} + +func stopVPN() { + err := ctx.bm.StopVPN() + if err != nil { + log.Println(err) + } +} diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 5cb0304d..74220eda 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -1,4 +1,4 @@ -/* All the exported functions live here */ +/* All the exported functions should be added here */ package backend @@ -24,7 +24,7 @@ func SwitchOff() { } func Unblock() { - //TODO + //TODO - fmt.Println("unblock... [not implemented]") } @@ -34,6 +34,7 @@ func Quit() { ctx.cfg.SetUserStoppedVPN(true) stopVPN() } + cleanupTempDirs() } func DonateAccepted() { @@ -51,10 +52,7 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { func InitializeBitmaskContext() { p := bitmask.GetConfiguredProvider() - initOnce.Do(func() { - initializeContext( - p.Provider, p.AppName) - }) + initOnce.Do(func() { initializeContext(p.Provider, p.AppName) }) go ctx.updateStatus() go func() { diff --git a/pkg/backend/cleanup.go b/pkg/backend/cleanup.go new file mode 100644 index 00000000..77c55e69 --- /dev/null +++ b/pkg/backend/cleanup.go @@ -0,0 +1,16 @@ +package backend + +import ( + "log" + "os" + "path" + "path/filepath" +) + +func cleanupTempDirs() { + dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) + for _, d := range dirs { + log.Println("removing temp dir:", d) + os.RemoveAll(d) + } +} From 5aec1358e3f3dd92849712207542234100b3d00b Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 17 Jun 2020 21:14:35 +0200 Subject: [PATCH 047/174] [feat] pass initialization errors to gui --- gui/backend.go | 1 - gui/main.cpp | 2 +- gui/qml/main.qml | 22 +++++--- pkg/backend/callbacks.go | 2 +- pkg/backend/donate.go | 9 ++++ pkg/backend/{bitmask.go => init.go} | 83 ++++++++++++++++------------- pkg/backend/status.go | 1 + pkg/bitmask/init.go | 39 ++++---------- pkg/config/gui.go | 1 - pkg/vpn/launcher_linux.go | 53 +++++++++++------- pkg/vpn/main.go | 11 ++-- pkg/vpn/openvpn.go | 5 +- 12 files changed, 127 insertions(+), 102 deletions(-) rename pkg/backend/{bitmask.go => init.go} (64%) diff --git a/gui/backend.go b/gui/backend.go index edb2b173..92cda6e2 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -30,7 +30,6 @@ func Unblock() { //export Quit func Quit() { backend.Quit() - } //export DonateAccepted diff --git a/gui/main.cpp b/gui/main.cpp index eca834a9..670e6649 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -34,7 +34,7 @@ std::string getEnv(std::string const& key) return val == NULL ? std::string() : std::string(val); } -void signalHandler(int signum) { +void signalHandler(int) { Quit(); exit(0); } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 8d756c6c..efcfef21 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -11,7 +11,6 @@ ApplicationWindow { property var ctx - Connections { target: jsonModel onDataChanged: { @@ -20,9 +19,24 @@ ApplicationWindow { console.debug(jsonModel.getJson()) donate.visible = true } + if (ctx.errors ) { + // TODO consider disabling on/off buttons, or quit after closing the dialog + if ( ctx.errors == "nohelpers" ) { + showInitFailure(qsTr("Could not find helpers. Check your installation")) + } else if ( ctx.errors == "nopolkit" ) { + showInitFailure(qsTr("Could not find polkit agent.")) + } else { + console.debug(ctx.errors) + } + } } } + function showInitFailure(msg) { + initFailure.text = msg + initFailure.visible = true + } + Component.onCompleted: { /* stupid as it sounds, windows doesn't like to have the systray icon not being attached to an actual application window. @@ -210,9 +224,6 @@ ApplicationWindow { text: "" detailedText: "" visible: false - //text: ctx ? qsTr("Can't connect to %1").arg(ctx.appName) : "" - //detailedText: ctx ? ctx.errorStartingMsg : "" - //visible: ctx.errorStartingMsg != "" } MessageDialog { @@ -222,7 +233,6 @@ ApplicationWindow { title: qsTr("Missing authentication agent") text: qsTr("Could not find a polkit authentication agent. Please run one and try again.") visible: false - //visible: ctx.missingAuthAgent == "true" } MessageDialog { @@ -232,7 +242,5 @@ ApplicationWindow { title: qsTr("Initialization Error") text: "" visible: false - //text: ctx ? ctx.errorInitMsg : "" - //visible: ctx.errorInitMsg != "" } } diff --git a/pkg/backend/callbacks.go b/pkg/backend/callbacks.go index 5ea3b048..f3bb39fb 100644 --- a/pkg/backend/callbacks.go +++ b/pkg/backend/callbacks.go @@ -7,7 +7,7 @@ import ( "unsafe" ) -/* NOTE! ATCHUNG! what follow are not silly comments. Well, *this one* is, but +/* ATCHUNG! what follow are not silly comments. Well, *this one* is, but the lines after this are not. Those are inline C functions, that are invoked by CGO later on. it's also crucial that you don't any extra space between the function diff --git a/pkg/backend/donate.go b/pkg/backend/donate.go index d2166876..608128f4 100644 --- a/pkg/backend/donate.go +++ b/pkg/backend/donate.go @@ -3,8 +3,17 @@ package backend import ( "log" "time" + + "0xacab.org/leap/bitmask-vpn/pkg/config" ) +func wantDonations() bool { + if config.AskForDonations == "true" { + return true + } + return false +} + func needsDonationReminder() bool { return ctx.cfg.NeedsDonationReminder() } diff --git a/pkg/backend/bitmask.go b/pkg/backend/init.go similarity index 64% rename from pkg/backend/bitmask.go rename to pkg/backend/init.go index 2b588596..5abb05ec 100644 --- a/pkg/backend/bitmask.go +++ b/pkg/backend/init.go @@ -9,43 +9,6 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/config/version" ) -func initializeBitmask() { - if ctx == nil { - log.Println("error: cannot initialize bitmask, ctx is nil") - os.Exit(1) - } - bitmask.InitializeLogger() - - b, err := bitmask.InitializeBitmask() - if err != nil { - log.Println("error: cannot initialize bitmask") - } - ctx.bm = b - ctx.cfg = config.ParseConfig() -} - -func startVPN() { - err := ctx.bm.StartVPN(ctx.Provider) - if err != nil { - log.Println(err) - os.Exit(1) - } -} - -func stopVPN() { - err := ctx.bm.StopVPN() - if err != nil { - log.Println(err) - } -} - -func wantDonations() bool { - if config.AskForDonations == "true" { - return true - } - return false -} - // initializeContext initializes an empty connStatus and assigns it to the // global ctx holder. This is expected to be called only once, so the public // api uses the sync.Once primitive to call this. @@ -62,6 +25,50 @@ func initializeContext(provider, appName string) { Version: version.VERSION, Status: st, } + errCh := make(chan string) go trigger(OnStatusChanged) - initializeBitmask() + go checkErrors(errCh) + initializeBitmask(errCh) +} + +func checkErrors(errCh chan string) { + for { + err := <-errCh + ctx.Errors = err + go trigger(OnStatusChanged) + } +} + +func initializeBitmask(errCh chan string) { + if ctx == nil { + log.Println("bug: cannot initialize bitmask, ctx is nil!") + os.Exit(1) + } + bitmask.InitializeLogger() + + b, err := bitmask.InitializeBitmask() + if err != nil { + log.Println("error: cannot initialize bitmask") + errCh <- err.Error() + return + } + + helpers, privilege, err := b.VPNCheck() + + if err != nil { + log.Println("error doing vpn check") + errCh <- err.Error() + } + + if helpers == false { + log.Println("no helpers") + errCh <- "nohelpers" + } + if privilege == false { + log.Println("no polkit") + errCh <- "nopolkit" + } + + ctx.bm = b + ctx.cfg = config.ParseConfig() } diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 84b27b7c..2e9c282d 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -35,6 +35,7 @@ type connectionCtx struct { DonateDialog bool `json:"donateDialog"` DonateURL string `json:"donateURL"` Version string `json:"version"` + Errors string `json:"errors"` Status status `json:"status"` bm bitmask.Bitmask cfg *config.Config diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index 7f10ab9d..33a5911f 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -68,15 +68,17 @@ func InitializeBitmask() (Bitmask, error) { defer pid.ReleasePID() conf := config.ParseConfig() - conf.Version = "unknown" conf.Printer = initPrinter() b, err := initBitmask(conf.Printer) if err != nil { - // TODO notify failure - log.Fatal(err) + return nil, err + } + + err = checkAndStartBitmask(b, conf) + if err != nil { + return nil, err } - go checkAndStartBitmask(b, conf) var as Autostart if conf.DisableAustostart { @@ -84,6 +86,7 @@ func InitializeBitmask() (Bitmask, error) { } else { as = newAutostart(config.ApplicationName, "") } + err = as.Enable() if err != nil { log.Printf("Error enabling autostart: %v", err) @@ -100,40 +103,20 @@ func initPrinter() *message.Printer { return message.NewPrinter(message.MatchLanguage(locale, "en")) } -func checkAndStartBitmask(b Bitmask, conf *config.Config) { +func checkAndStartBitmask(b Bitmask, conf *config.Config) error { if conf.Obfs4 { err := b.UseTransport("obfs4") if err != nil { log.Printf("Error setting transport: %v", err) + return err } } - err := checkAndInstallHelpers(b) - if err != nil { - log.Printf("Is bitmask running? %v", err) - os.Exit(1) - } - err = maybeStartVPN(b, conf) + + err := maybeStartVPN(b, conf) if err != nil { log.Println("Error starting VPN: ", err) - } -} - -func checkAndInstallHelpers(b Bitmask) error { - helpers, privilege, err := b.VPNCheck() - if (err != nil && err.Error() == "nopolkit") || (err == nil && !privilege) { - log.Printf("No polkit found") - os.Exit(1) - } else if err != nil { - log.Printf("Error checking vpn: %v", err) return err } - - if !helpers { - err = b.InstallHelpers() - if err != nil { - log.Println("Error installing helpers: ", err) - } - } return nil } diff --git a/pkg/config/gui.go b/pkg/config/gui.go index 5fa4886f..7f2515ce 100644 --- a/pkg/config/gui.go +++ b/pkg/config/gui.go @@ -48,7 +48,6 @@ type Config struct { Obfs4 bool DisableAustostart bool StartVPN bool - Version string Printer *message.Printer } diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go index 71a74eaf..f92cf6ff 100644 --- a/pkg/vpn/launcher_linux.go +++ b/pkg/vpn/launcher_linux.go @@ -1,5 +1,5 @@ // +build linux -// Copyright (C) 2018 LEAP +// Copyright (C) 2018-2020 LEAP // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -53,32 +53,49 @@ func (l *launcher) close() error { return nil } -func (l *launcher) check() (helpers bool, priviledge bool, err error) { +func (l *launcher) check() (helpers bool, privilege bool, err error) { + hasHelpers, err := hasHelpers() + if err != nil { + return + } + if !hasHelpers { + return false, true, nil + } - /* - isRunning, err := isPolkitRunning() + isRunning, err := isPolkitRunning() + if err != nil { + return + } + + if !isRunning { + polkitPath := getPolkitPath() + if polkitPath == "" { + return true, false, nil + } + cmd := exec.Command("setsid", polkitPath) + err = cmd.Start() if err != nil { return } - if !isRunning { - polkitPath := getPolkitPath() - if polkitPath == "" { - return true, false, nil - } - cmd := exec.Command("setsid", polkitPath) - err = cmd.Start() - if err != nil { - return - } - isRunning, err = isPolkitRunning() - return true, isRunning, err - } - */ + isRunning, err = isPolkitRunning() + return true, isRunning, err + } return true, true, nil } +func hasHelpers() (bool, error) { + /* TODO add polkit file too */ + for _, f := range bitmaskRootPaths { + if _, err := os.Stat(f); err == nil { + return true, nil + } + } + return false, nil +} + func isPolkitRunning() (bool, error) { + // TODO shouldn't we also check for polkitd running? var polkitProcNames = [...]string{ "polkit-gnome-authentication-agent-1", "polkit-kde-authentication-agent-1", diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go index ce599c94..9d59131b 100644 --- a/pkg/vpn/main.go +++ b/pkg/vpn/main.go @@ -51,10 +51,13 @@ func Init() (*Bitmask, error) { } b := Bitmask{tempdir, statusCh, nil, bonafide, launch, "", nil} - err = b.StopVPN() - if err != nil { - return nil, err - } + /* + err = b.StopVPN() + if err != nil { + return nil, err + } + */ + err = ioutil.WriteFile(b.getCaCertPath(), config.CaCert, 0600) go b.openvpnManagement() diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index a75b830a..984aa09c 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -207,14 +207,13 @@ func (b *Bitmask) GetStatus() (string, error) { return status, nil } -// InstallHelpers into the system func (b *Bitmask) InstallHelpers() error { - // TODO + // TODO use pickle module from here return nil } // VPNCheck returns if the helpers are installed and up to date and if polkit is running -func (b *Bitmask) VPNCheck() (helpers bool, priviledge bool, err error) { +func (b *Bitmask) VPNCheck() (helpers bool, privilege bool, err error) { return b.launch.check() } From 10e3342d44fb84f66271c0a4f6e456e8db82c6b1 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 22 Jun 2020 22:00:23 +0200 Subject: [PATCH 048/174] [refactor] several simplifications after review - simplify notification routine (we dont need no rejected action). we just check every hour, as in the original code. - open links directly from Qt - rename some global variables to make them less cryptic - move cleanup function to the same module that created them --- go.mod | 2 ++ go.sum | 4 ++++ gui/backend.go | 5 ----- gui/handlers.cpp | 10 ---------- gui/handlers.h | 2 -- gui/qml/DonateDialog.qml | 7 +------ gui/qml/main.qml | 2 +- pkg/backend/api.go | 18 ++---------------- pkg/backend/callbacks.go | 20 ++++++++++---------- pkg/backend/cleanup.go | 13 +++---------- pkg/backend/donate.go | 31 +++++++++++++++++-------------- pkg/backend/status.go | 11 +++++++---- pkg/vpn/main.go | 23 +++++++++++++++++++---- 13 files changed, 66 insertions(+), 82 deletions(-) diff --git a/go.mod b/go.mod index b89aa45f..7b6e6150 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,14 @@ require ( github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2 github.com/dchest/siphash v1.2.1 // indirect + github.com/godoctor/godoctor v0.0.0-20181123222458-69df17f3a6f6 // indirect github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61 github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 github.com/rakyll/statik v0.1.7 github.com/sevlyar/go-daemon v0.1.5 github.com/stretchr/testify v1.3.0 // indirect + github.com/willf/bitset v1.1.10 // indirect golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 // indirect golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 golang.org/x/text v0.3.2 diff --git a/go.sum b/go.sum index b449a895..0ef2264b 100644 --- a/go.sum +++ b/go.sum @@ -16,6 +16,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= +github.com/godoctor/godoctor v0.0.0-20181123222458-69df17f3a6f6 h1:iRn4qXDcqlb2sFqTdyTdYKjaPoLka7tvcyF+FZA9/qw= +github.com/godoctor/godoctor v0.0.0-20181123222458-69df17f3a6f6/go.mod h1:+tyhT8jBF8E0XvdlSXOSL7Iko7DlNiongHq3q+wcsPs= github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61 h1:9vsXCXRCUb82jJKv4O+R8Hyo4oPJsOjVwT0pWvHgeyc= github.com/jmshal/go-locale v0.0.0-20190124211249-eb00fb25cc61/go.mod h1:+Ny9b1U6p4zX0L9w+k3hSkz3puupLFP14Mion+rGNF8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= @@ -31,6 +33,8 @@ github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= +github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/gui/backend.go b/gui/backend.go index 92cda6e2..f7816ee8 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -37,11 +37,6 @@ func DonateAccepted() { backend.DonateAccepted() } -//export DonateRejected -func DonateRejected() { - backend.DonateRejected() -} - //export SubscribeToEvent func SubscribeToEvent(event string, f unsafe.Pointer) { backend.SubscribeToEvent(event, f) diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 39a57469..9ce268d2 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -30,16 +30,6 @@ void Backend::donateAccepted() DonateAccepted(); } -void Backend::donateRejected() -{ - DonateRejected(); -} - -void Backend::openURL(QString link) -{ - QDesktopServices::openUrl(QUrl(link)); -} - void Backend::quit() { Quit(); diff --git a/gui/handlers.h b/gui/handlers.h index e65fd5eb..0dc4c1ea 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -34,8 +34,6 @@ public slots: void switchOff(); void unblock(); void donateAccepted(); - void donateRejected(); - void openURL(QString link); void quit(); }; diff --git a/gui/qml/DonateDialog.qml b/gui/qml/DonateDialog.qml index fd27a6bf..de7ab5ba 100644 --- a/gui/qml/DonateDialog.qml +++ b/gui/qml/DonateDialog.qml @@ -16,13 +16,8 @@ MessageDialog { onAccepted: { if (backend) { - backend.openURL(ctx.donateURL) + Qt.openUrlExternally(ctx.donateURL) backend.donateAccepted() } } - onRejected: { - if (backend) { - backend.donateRejected() - } - } } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index efcfef21..efe0111a 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -178,7 +178,7 @@ ApplicationWindow { MenuItem { text: qsTr("Help...") - onTriggered: backend.openURL(ctx.helpURL) + onTriggered: Qt.openUrlExternally(ctx.helpURL) } MenuItem { diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 74220eda..cf9ec5c8 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -6,7 +6,6 @@ import ( "C" "fmt" "log" - "time" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" @@ -34,17 +33,13 @@ func Quit() { ctx.cfg.SetUserStoppedVPN(true) stopVPN() } - cleanupTempDirs() + cleanup() } func DonateAccepted() { donateAccepted() } -func DonateRejected() { - donateRejected() -} - func SubscribeToEvent(event string, f unsafe.Pointer) { subscribe(event, f) } @@ -53,17 +48,8 @@ func InitializeBitmaskContext() { p := bitmask.GetConfiguredProvider() initOnce.Do(func() { initializeContext(p.Provider, p.AppName) }) + runDonationReminder() go ctx.updateStatus() - - go func() { - if needsDonationReminder() { - // wait a bit before launching reminder - timer := time.NewTimer(time.Minute * 5) - <-timer.C - showDonate() - } - - }() } func RefreshContext() *C.char { diff --git a/pkg/backend/callbacks.go b/pkg/backend/callbacks.go index f3bb39fb..5fb8642d 100644 --- a/pkg/backend/callbacks.go +++ b/pkg/backend/callbacks.go @@ -19,11 +19,11 @@ import ( // } import "C" -/* callbacks into C-land */ +/* callbacks into C-land. We keep a registry, and protect its updates with a mutex. */ + +var callbacks = make(map[string](*[0]byte)) +var callbackMutex sync.Mutex -var mut sync.Mutex -var stmut sync.Mutex -var cbs = make(map[string](*[0]byte)) var initOnce sync.Once // Events are just a enumeration of all the posible events that C functions can @@ -38,23 +38,23 @@ const OnStatusChanged string = "OnStatusChanged" // subscribe registers a callback from C-land. // This callback needs to be passed as a void* C function pointer. func subscribe(event string, fp unsafe.Pointer) { - mut.Lock() - defer mut.Unlock() + callbackMutex.Lock() + defer callbackMutex.Unlock() e := &Events{} v := reflect.Indirect(reflect.ValueOf(&e)) hf := v.Elem().FieldByName(event) if reflect.ValueOf(hf).IsZero() { fmt.Println("ERROR: not a valid event:", event) } else { - cbs[event] = (*[0]byte)(fp) + callbacks[event] = (*[0]byte)(fp) } } // trigger fires a callback from C-land. func trigger(event string) { - mut.Lock() - defer mut.Unlock() - cb := cbs[event] + callbackMutex.Lock() + defer callbackMutex.Unlock() + cb := callbacks[event] if cb != nil { C._do_callback(cb) } else { diff --git a/pkg/backend/cleanup.go b/pkg/backend/cleanup.go index 77c55e69..16f36e47 100644 --- a/pkg/backend/cleanup.go +++ b/pkg/backend/cleanup.go @@ -1,16 +1,9 @@ package backend import ( - "log" - "os" - "path" - "path/filepath" + "0xacab.org/leap/bitmask-vpn/pkg/vpn" ) -func cleanupTempDirs() { - dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) - for _, d := range dirs { - log.Println("removing temp dir:", d) - os.RemoveAll(d) - } +func cleanup() { + vpn.Cleanup() } diff --git a/pkg/backend/donate.go b/pkg/backend/donate.go index 608128f4..20d56130 100644 --- a/pkg/backend/donate.go +++ b/pkg/backend/donate.go @@ -1,12 +1,24 @@ package backend import ( - "log" "time" "0xacab.org/leap/bitmask-vpn/pkg/config" ) +// runDonationReminder checks every hour if we need to show the reminder, +// and trigger the launching of the dialog if needed. +func runDonationReminder() { + go func() { + for { + time.Sleep(time.Hour) + if needsDonationReminder() { + showDonate() + } + } + }() +} + func wantDonations() bool { if config.AskForDonations == "true" { return true @@ -19,25 +31,16 @@ func needsDonationReminder() bool { } func donateAccepted() { - stmut.Lock() - defer stmut.Unlock() + statusMutex.Lock() + defer statusMutex.Unlock() ctx.DonateDialog = false - log.Println("marking as donated") ctx.cfg.SetDonated() go trigger(OnStatusChanged) } -func donateRejected() { - timer := time.NewTimer(time.Hour) - go func() { - <-timer.C - showDonate() - }() -} - func showDonate() { - stmut.Lock() - defer stmut.Unlock() + statusMutex.Lock() + defer statusMutex.Unlock() ctx.DonateDialog = true ctx.cfg.SetLastReminded() go trigger(OnStatusChanged) diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 2e9c282d..2bfb52da 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "log" + "sync" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" "0xacab.org/leap/bitmask-vpn/pkg/config" @@ -17,6 +18,8 @@ const ( failedStr = "failed" ) +var statusMutex sync.Mutex + // ctx will be our glorious global object. // if we ever switch again to a provider-agnostic app, we should keep a map here. var ctx *connectionCtx @@ -42,8 +45,8 @@ type connectionCtx struct { } func (c connectionCtx) toJson() ([]byte, error) { - stmut.Lock() - defer stmut.Unlock() + statusMutex.Lock() + defer statusMutex.Unlock() b, err := json.Marshal(c) if err != nil { log.Println(err) @@ -69,8 +72,8 @@ func (c connectionCtx) updateStatus() { } func setStatus(st status) { - stmut.Lock() - defer stmut.Unlock() + statusMutex.Lock() + defer statusMutex.Unlock() ctx.Status = st go trigger(OnStatusChanged) } diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go index 9d59131b..f3c5b833 100644 --- a/pkg/vpn/main.go +++ b/pkg/vpn/main.go @@ -19,6 +19,8 @@ import ( "io/ioutil" "log" "os" + "path" + "path/filepath" "0xacab.org/leap/bitmask-vpn/pkg/config" "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" @@ -52,10 +54,15 @@ func Init() (*Bitmask, error) { b := Bitmask{tempdir, statusCh, nil, bonafide, launch, "", nil} /* - err = b.StopVPN() - if err != nil { - return nil, err - } + TODO -- we still want to do this, since it resets the fw/vpn if running + from a previous one, but first we need to complete all the + system/helper checks that we can do. otherwise this times out with an + error that's captured badly as of today. + + err = b.StopVPN() + if err != nil { + return nil, err + } */ err = ioutil.WriteFile(b.getCaCertPath(), config.CaCert, 0600) @@ -87,3 +94,11 @@ func (b *Bitmask) Close() { func (b *Bitmask) Version() (string, error) { return "", nil } + +func Cleanup() { + dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) + for _, d := range dirs { + log.Println("removing temp dir:", d) + os.RemoveAll(d) + } +} From 03e76c6d832e20dc45e128a909fccd503da8edc4 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 23 Jun 2020 19:51:00 +0200 Subject: [PATCH 049/174] [refactor] cleanup function was unneeded --- pkg/backend/actions.go | 4 ++++ pkg/backend/api.go | 5 +++-- pkg/backend/cleanup.go | 9 --------- pkg/vpn/main.go | 12 +----------- 4 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 pkg/backend/cleanup.go diff --git a/pkg/backend/actions.go b/pkg/backend/actions.go index 725a550f..ca453475 100644 --- a/pkg/backend/actions.go +++ b/pkg/backend/actions.go @@ -19,3 +19,7 @@ func stopVPN() { log.Println(err) } } + +func closeVPN() { + ctx.bm.Close() +} diff --git a/pkg/backend/api.go b/pkg/backend/api.go index cf9ec5c8..58e0a426 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -30,10 +30,11 @@ func Unblock() { func Quit() { if ctx.Status != off { go setStatus(stopping) + ctx.cfg.SetUserStoppedVPN(false) + } else { ctx.cfg.SetUserStoppedVPN(true) - stopVPN() } - cleanup() + closeVPN() } func DonateAccepted() { diff --git a/pkg/backend/cleanup.go b/pkg/backend/cleanup.go deleted file mode 100644 index 16f36e47..00000000 --- a/pkg/backend/cleanup.go +++ /dev/null @@ -1,9 +0,0 @@ -package backend - -import ( - "0xacab.org/leap/bitmask-vpn/pkg/vpn" -) - -func cleanup() { - vpn.Cleanup() -} diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go index f3c5b833..4bf43950 100644 --- a/pkg/vpn/main.go +++ b/pkg/vpn/main.go @@ -19,8 +19,6 @@ import ( "io/ioutil" "log" "os" - "path" - "path/filepath" "0xacab.org/leap/bitmask-vpn/pkg/config" "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" @@ -76,7 +74,7 @@ func (b *Bitmask) GetStatusCh() <-chan string { return b.statusCh } -// Close the connection to bitmask +// Close the connection to bitmask, and does cleanup of temporal files func (b *Bitmask) Close() { log.Printf("Close: cleanup and vpn shutdown...") b.StopVPN() @@ -94,11 +92,3 @@ func (b *Bitmask) Close() { func (b *Bitmask) Version() (string, error) { return "", nil } - -func Cleanup() { - dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) - for _, d := range dirs { - log.Println("removing temp dir:", d) - os.RemoveAll(d) - } -} From 3b554ad803dcf52b7c1f14d8213ccbb52e9febbf Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 25 Jun 2020 18:33:52 +0200 Subject: [PATCH 050/174] [refactor] remove silly function --- pkg/backend/actions.go | 4 ---- pkg/backend/api.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/backend/actions.go b/pkg/backend/actions.go index ca453475..725a550f 100644 --- a/pkg/backend/actions.go +++ b/pkg/backend/actions.go @@ -19,7 +19,3 @@ func stopVPN() { log.Println(err) } } - -func closeVPN() { - ctx.bm.Close() -} diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 58e0a426..a19fd404 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -34,7 +34,7 @@ func Quit() { } else { ctx.cfg.SetUserStoppedVPN(true) } - closeVPN() + ctx.bm.Close() } func DonateAccepted() { From ddb94a54d5e679d5321253b139541245c6680bff Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 18 Jun 2020 20:42:29 +0200 Subject: [PATCH 051/174] [test] minimal qml tests just a minimal boilerplate. the idea is to import the qml files and assert that the states/widgets change accordingly if we mock the backend status. - Closes: #300 --- Makefile | 13 +++++++++-- README.md | 8 +++++++ bitmask.pro | 1 - gui/backend.go | 11 +++++++++- gui/qml/main.qml | 2 +- pkg/backend/api.go | 18 ++++++++++----- pkg/backend/init.go | 12 +++++----- pkg/backend/mocks.go | 15 +++++++------ pkg/bitmask/init.go | 28 ++++++++++++++---------- test.pro | 26 ++++++++++++++++++++++ tests/.gitignore | 10 +++++++++ tests/test_ui.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++ tests/tst_smoke.qml | 28 ++++++++++++++++++++++++ 13 files changed, 190 insertions(+), 34 deletions(-) create mode 100644 test.pro create mode 100644 tests/.gitignore create mode 100644 tests/test_ui.cpp create mode 100644 tests/tst_smoke.qml diff --git a/Makefile b/Makefile index 3b0fb74d..c8b4872b 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ VERSION ?= $(shell git describe) # go paths GOPATH = $(shell go env GOPATH) -SYSTRAY = 0xacab.org/leap/bitmask-vpn -GOSYSTRAY = ${GOPATH}/src/${SYSTRAY} +TARGET_GOLIB=lib/libgoshim.a +SOURCE_GOLIB=gui/backend.go # detect OS, we use it for dependencies UNAME = $(shell uname -s) @@ -81,6 +81,15 @@ build_%: test: @go test -tags "integration $(TAGS)" ./... +golib: + CGO_ENABLED=1 go build -buildmode=c-archive -o ${TARGET_GOLIB} ${SOURCE_GOLIB} + +test_ui: golib + @qmake -o tests/Makefile test.pro + @make -C tests clean + @make -C tests + @./tests/build/test_ui + build_win: powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*' diff --git a/README.md b/README.md index 5ab3d9c9..1ac02fea 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,14 @@ Run it: ./build.sh +Running tests +------------- + +sudo apt install qml-module-qttest +make test +make test_ui + + i18n ---- diff --git a/bitmask.pro b/bitmask.pro index 115aec71..7a294838 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -33,7 +33,6 @@ MOC_DIR = release/.moc RCC_DIR = release/.rcc UI_DIR = release/.ui -Release:DESTDIR = release Release:DESTDIR = release Release:OBJECTS_DIR = release/.obj Release:MOC_DIR = release/.moc diff --git a/gui/backend.go b/gui/backend.go index f7816ee8..4a73cc26 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -44,7 +44,16 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { //export InitializeBitmaskContext func InitializeBitmaskContext() { - backend.InitializeBitmaskContext() + opts := &backend.InitOpts{} + backend.InitializeBitmaskContext(opts) +} + +//export InitializeTestBitmaskContext +func InitializeTestBitmaskContext() { + opts := &backend.InitOpts{} + opts.SkipLaunch = true + backend.InitializeBitmaskContext(opts) + backend.EnableMockBackend() } //export RefreshContext diff --git a/gui/qml/main.qml b/gui/qml/main.qml index efe0111a..4aab7f19 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -9,7 +9,7 @@ ApplicationWindow { id: app visible: false - property var ctx + property var ctx Connections { target: jsonModel diff --git a/pkg/backend/api.go b/pkg/backend/api.go index a19fd404..fea38dbc 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -45,10 +45,18 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { subscribe(event, f) } -func InitializeBitmaskContext() { +type InitOpts struct { + Provider string + AppName string + SkipLaunch bool +} + +func InitializeBitmaskContext(opts *InitOpts) { p := bitmask.GetConfiguredProvider() + opts.Provider = p.Provider + opts.AppName = p.AppName - initOnce.Do(func() { initializeContext(p.Provider, p.AppName) }) + initOnce.Do(func() { initializeContext(opts) }) runDonationReminder() go ctx.updateStatus() } @@ -62,7 +70,7 @@ func InstallHelpers() { pickle.InstallHelpers() } -func MockUIInteraction() { - log.Println("mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") - go mockUI() +func EnableMockBackend() { + log.Println("[+] Mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") + go enableMockBackend() } diff --git a/pkg/backend/init.go b/pkg/backend/init.go index 5abb05ec..79efdc78 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -12,11 +12,11 @@ import ( // initializeContext initializes an empty connStatus and assigns it to the // global ctx holder. This is expected to be called only once, so the public // api uses the sync.Once primitive to call this. -func initializeContext(provider, appName string) { +func initializeContext(opts *InitOpts) { var st status = off ctx = &connectionCtx{ - AppName: appName, - Provider: provider, + AppName: opts.AppName, + Provider: opts.Provider, TosURL: config.TosURL, HelpURL: config.HelpURL, DonateURL: config.DonateURL, @@ -28,7 +28,7 @@ func initializeContext(provider, appName string) { errCh := make(chan string) go trigger(OnStatusChanged) go checkErrors(errCh) - initializeBitmask(errCh) + initializeBitmask(errCh, opts) } func checkErrors(errCh chan string) { @@ -39,14 +39,14 @@ func checkErrors(errCh chan string) { } } -func initializeBitmask(errCh chan string) { +func initializeBitmask(errCh chan string, opts *InitOpts) { if ctx == nil { log.Println("bug: cannot initialize bitmask, ctx is nil!") os.Exit(1) } bitmask.InitializeLogger() - b, err := bitmask.InitializeBitmask() + b, err := bitmask.InitializeBitmask(opts.SkipLaunch) if err != nil { log.Println("error: cannot initialize bitmask") errCh <- err.Error() diff --git a/pkg/backend/mocks.go b/pkg/backend/mocks.go index a8ede736..226fa4e6 100644 --- a/pkg/backend/mocks.go +++ b/pkg/backend/mocks.go @@ -9,6 +9,14 @@ import ( * should also show a good way of writing functionality tests just for the Qml * layer */ +func enableMockBackend() { + log.Println("[+] You should not use this in production!") + http.HandleFunc("/on", mockUIOn) + http.HandleFunc("/off", mockUIOff) + http.HandleFunc("/failed", mockUIFailed) + http.ListenAndServe(":8080", nil) +} + func mockUIOn(w http.ResponseWriter, r *http.Request) { log.Println("changing status: on") setStatus(on) @@ -23,10 +31,3 @@ func mockUIFailed(w http.ResponseWriter, r *http.Request) { log.Println("changing status: failed") setStatus(failed) } - -func mockUI() { - http.HandleFunc("/on", mockUIOn) - http.HandleFunc("/off", mockUIOff) - http.HandleFunc("/failed", mockUIFailed) - http.ListenAndServe(":8080", nil) -} diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index 33a5911f..a96ab870 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -56,14 +56,18 @@ func initBitmask(printer *message.Printer) (Bitmask, error) { return b, err } -func InitializeBitmask() (Bitmask, error) { +func InitializeBitmask(skipLaunch bool) (Bitmask, error) { + if skipLaunch { + log.Println("Initializing bitmask, but not launching it...") + } if _, err := os.Stat(config.Path); os.IsNotExist(err) { os.MkdirAll(config.Path, os.ModePerm) } err := pid.AcquirePID() if err != nil { - log.Fatal(err) + log.Println("Error acquiring PID:", err) + return nil, err } defer pid.ReleasePID() @@ -75,13 +79,21 @@ func InitializeBitmask() (Bitmask, error) { return nil, err } - err = checkAndStartBitmask(b, conf) + err = setTransport(b, conf) if err != nil { return nil, err } + if !skipLaunch { + err := maybeStartVPN(b, conf) + if err != nil { + log.Println("Error starting VPN: ", err) + return nil, err + } + } + var as Autostart - if conf.DisableAustostart { + if skipLaunch || conf.DisableAustostart { as = &dummyAutostart{} } else { as = newAutostart(config.ApplicationName, "") @@ -103,7 +115,7 @@ func initPrinter() *message.Printer { return message.NewPrinter(message.MatchLanguage(locale, "en")) } -func checkAndStartBitmask(b Bitmask, conf *config.Config) error { +func setTransport(b Bitmask, conf *config.Config) error { if conf.Obfs4 { err := b.UseTransport("obfs4") if err != nil { @@ -111,12 +123,6 @@ func checkAndStartBitmask(b Bitmask, conf *config.Config) error { return err } } - - err := maybeStartVPN(b, conf) - if err != nil { - log.Println("Error starting VPN: ", err) - return err - } return nil } diff --git a/test.pro b/test.pro new file mode 100644 index 00000000..099e18fa --- /dev/null +++ b/test.pro @@ -0,0 +1,26 @@ +TEMPLATE = app +TARGET = test_ui +CONFIG += warn_on qmltestcase + +SOURCES += \ + tests/test_ui.cpp \ + gui/qjsonmodel.cpp \ + gui/handlers.cpp + +HEADERS += \ + lib/libgoshim.h \ + gui/qjsonmodel.h \ + gui/handlers.h + + +LIBS += -L../lib -lgoshim -lpthread + +DESTDIR = build +OBJECTS_DIR = build/.obj +RCC_DIR = build/.rcc +UI_DIR = build/.ui + +Release:DESTDIR = build +Release:OBJECTS_DIR = build/.obj +Release:RCC_DIR = build/.rcc +Release:UI_DIR = build/.ui diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..65af933b --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,10 @@ +build/* +*.h +*.sh +*.moc +*.o +*.stash +Makefile +test_ui +moc_handlers.cpp +moc_qjsonmodel.cpp diff --git a/tests/test_ui.cpp b/tests/test_ui.cpp new file mode 100644 index 00000000..f9f960a1 --- /dev/null +++ b/tests/test_ui.cpp @@ -0,0 +1,52 @@ +// test_ui.cpp +#include +#include +#include + +#include "../gui/qjsonmodel.h" +#include "../lib/libgoshim.h" + +class Helper : public QObject +{ + Q_OBJECT + +public: + explicit Helper(QObject *parent = 0); + +public slots: + Q_INVOKABLE QString refreshContext(); +}; + +Helper::Helper(QObject *parent) : QObject(parent) +{ +} + +Q_INVOKABLE QString Helper::refreshContext() +{ + return QString(RefreshContext()); +} + +class Setup : public QObject +{ + Q_OBJECT + +public: + Setup() {} + +public slots: + void qmlEngineAvailable(QQmlEngine *engine) + { + QQmlContext *ctx = engine->rootContext(); + QJsonModel *model = new QJsonModel; + Helper *helper = new Helper(this); + + InitializeTestBitmaskContext(); + + ctx->setContextProperty("jsonModel", model); + ctx->setContextProperty("helper", helper); + } +}; + +QUICK_TEST_MAIN_WITH_SETUP(ui, Setup) + +#include "test_ui.moc" diff --git a/tests/tst_smoke.qml b/tests/tst_smoke.qml new file mode 100644 index 00000000..19904a61 --- /dev/null +++ b/tests/tst_smoke.qml @@ -0,0 +1,28 @@ +import QtQuick 2.3 +import QtTest 1.0 + + +TestCase { + name: "SmokeTests" + + property var ctx + + function refresh() { + ctx = JSON.parse(helper.refreshContext()) + } + + function test_helper() { + compare(Boolean(helper), true, "does helper exist?") + } + + function test_model() { + compare(Boolean(jsonModel), true, "does model exist?") + } + + function test_loadCtx() { + refresh() + compare(ctx.appName, "RiseupVPN", "can read appName?") + compare(ctx.tosURL, "https://riseup.net/tos", "can read tosURL?") + compare(ctx.status, "off", "is initial status off?") + } +} From 21991922dc6216612f44346592f5435f32311521 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 10 Jul 2020 11:04:49 +0200 Subject: [PATCH 052/174] Add support for internationalization - Resolves: #243 --- .gitignore | 1 + Makefile | 21 +---- bitmask.pro | 5 + build.sh | 1 + gui/i18n/base.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_ar.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_es.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_es_ES.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_nl.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_pl.ts | 172 ++++++++++++++++++++++++++++++++++ gui/i18n/main_pt_BR.ts | 172 ++++++++++++++++++++++++++++++++++ gui/main.cpp | 5 + gui/qml/AboutDialog.qml | 9 +- gui/qml/DonateDialog.qml | 2 + gui/qml/LoginConfirmation.qml | 4 +- gui/qml/LoginDialog.qml | 8 +- gui/qml/main.qml | 16 ++-- tools/transifex/Makefile | 8 -- tools/transifex/main.go | 124 ------------------------ tools/transifex/messages.json | 28 ------ 20 files changed, 1247 insertions(+), 189 deletions(-) create mode 100644 gui/i18n/base.ts create mode 100644 gui/i18n/main_ar.ts create mode 100644 gui/i18n/main_es.ts create mode 100644 gui/i18n/main_es_ES.ts create mode 100644 gui/i18n/main_nl.ts create mode 100644 gui/i18n/main_pl.ts create mode 100644 gui/i18n/main_pt_BR.ts delete mode 100644 tools/transifex/Makefile delete mode 100644 tools/transifex/main.go delete mode 100644 tools/transifex/messages.json diff --git a/.gitignore b/.gitignore index 5cb4e9ee..7c8e96bb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ cmd/bitmask-vpn/bitmask-vpn cmd/bitmask-helper/bitmask-helper /bitmask-connect cmd/bitmask-connect/bitmask-connect +gui/i18n/*.qm locales/*/out.gotext.json tools/transifex/transifex diff --git a/Makefile b/Makefile index c8b4872b..9c0843d2 100644 --- a/Makefile +++ b/Makefile @@ -251,23 +251,12 @@ icon: @make -C icon -LANGS ?= $(foreach path,$(wildcard locales/*),$(patsubst locales/%,%,$(path))) -empty := -space := $(empty) $(empty) -lang_list := $(subst $(space),,$(foreach lang,$(LANGS),$(lang),)) +LANGS ?= $(foreach path,$(wildcard gui/i18n/main_*.ts),$(patsubst gui/i18n/main_%.ts,%,$(path))) -locales: $(foreach lang,$(LANGS),get_$(lang)) cmd/bitmask-vpn/catalog.go +locales: $(foreach lang,$(LANGS),get_$(lang)) generate_locales: - @gotext update -lang=$(lang_list) ./pkg/systray ./pkg/bitmask - @make -C tools/transifex + @lupdate bitmask.pro -locales/%/out.gotext.json: pkg/systray/systray.go pkg/systray/notificator.go pkg/bitmask/standalone.go - @gotext update -lang=$* ./pkg/systray ./pkg/bitmask - -cmd/bitmask-vpn/catalog.go: $(foreach lang,$(LANGS),locales/$(lang)/messages.gotext.json) - @gotext update -lang=$(lang_list) -out cmd/bitmask-vpn/catalog.go ./pkg/systray ./pkg/bitmask - -get_%: locales/%/out.gotext.json - @make -C tools/transifex build - @curl -L -X GET --user "api:${API_TOKEN}" "https://www.transifex.com/api/2/project/bitmask/resource/RiseupVPN/translation/${subst -,_,$*}/?file" | tools/transifex/transifex t2g locales/$*/ +get_%: + @curl -L -X GET --user "api:${API_TOKEN}" "https://www.transifex.com/api/2/project/bitmask/resource/riseupvpn-test/translation/${subst -,_,$*}/?file" > gui/i18n/main_$*.ts diff --git a/bitmask.pro b/bitmask.pro index 7a294838..fcedd75f 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -47,3 +47,8 @@ Debug:UI_DIR = debug/.ui DISTFILES += \ README.md + +CONFIG += lrelease embed_translations + +TRANSLATIONS += $$files(gui/i18n/*.ts, true) +RESOURCES += $$files(gui/i18n/*.qm, true) diff --git a/build.sh b/build.sh index c7085a69..94f77b3d 100755 --- a/build.sh +++ b/build.sh @@ -51,6 +51,7 @@ function buildQmake { echo "[+] Building BitmaskVPN" +lrelease bitmask.pro buildGoLib buildQmake make -C qtbuild clean diff --git a/gui/i18n/base.ts b/gui/i18n/base.ts new file mode 100644 index 00000000..9110c362 --- /dev/null +++ b/gui/i18n/base.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + + + + + Reconnect + + + + + Turn on + + + + + Cancel + + + + + Turn off + + + + + Help... + + + + + Donate... + + + + + About... + + + + + Quit + + + + + Error starting VPN + + + + + Missing authentication agent + + + + + Could not find a polkit authentication agent. Please run one and try again. + + + + + Initialization Error + + + + diff --git a/gui/i18n/main_ar.ts b/gui/i18n/main_ar.ts new file mode 100644 index 00000000..5a8869af --- /dev/null +++ b/gui/i18n/main_ar.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + حول + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + تبرَّع + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + تسجيل الدخول + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + جارى التحقق من الوضع... + + + + Reconnect + إعادة الاتصال + + + + Turn on + تشغيل + + + + Cancel + إلغاء + + + + Turn off + إغلاق + + + + Help... + المساعدة... + + + + Donate... + تبرع... + + + + About... + عن الخدمة... + + + + Quit + خروج + + + + Error starting VPN + حدث خطأ فى تشغيل VPN + + + + Missing authentication agent + أداة الدخول للحساب مفقودة + + + + Could not find a polkit authentication agent. Please run one and try again. + لم يجد البرنامج أداة الدخول (polkit). من فضلك شغل واحدة وحاول ثانية. + + + + Initialization Error + + + + diff --git a/gui/i18n/main_es.ts b/gui/i18n/main_es.ts new file mode 100644 index 00000000..48e98ef0 --- /dev/null +++ b/gui/i18n/main_es.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + Acerca de + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + Dona + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + Acceder + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + Comprobando el estado... + + + + Reconnect + Volver a conectar + + + + Turn on + Encender + + + + Cancel + Cancelar + + + + Turn off + Apagar + + + + Help... + Ayuda... + + + + Donate... + Dona... + + + + About... + Acerca de... + + + + Quit + Cerrar + + + + Error starting VPN + Error al iniciar la VPN + + + + Missing authentication agent + Falta un agente de autenticación + + + + Could not find a polkit authentication agent. Please run one and try again. + No se pudo encontrar ningún agente de autenticacion de polkit. Por favor lanza uno y prueba de nuevo. + + + + Initialization Error + + + + diff --git a/gui/i18n/main_es_ES.ts b/gui/i18n/main_es_ES.ts new file mode 100644 index 00000000..48ca2c2f --- /dev/null +++ b/gui/i18n/main_es_ES.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + Acerca de + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + Donar + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + Iniciar Sesión + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + Comprobando estado... + + + + Reconnect + Reconectar + + + + Turn on + Activar + + + + Cancel + Cancelar + + + + Turn off + Desactivar + + + + Help... + Ayuda... + + + + Donate... + Donar... + + + + About... + Acerca de... + + + + Quit + Salir + + + + Error starting VPN + Error iniciando VPN + + + + Missing authentication agent + Falta agente de autenticación + + + + Could not find a polkit authentication agent. Please run one and try again. + No se pudo encontrar un agente de autenticación polkit. Por favor corre uno e intenta de nuevo. + + + + Initialization Error + + + + diff --git a/gui/i18n/main_nl.ts b/gui/i18n/main_nl.ts new file mode 100644 index 00000000..4709f71d --- /dev/null +++ b/gui/i18n/main_nl.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + Over + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + Doneren + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + Inloggen + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + Status controleren... + + + + Reconnect + Opnieuw verbinden + + + + Turn on + Inschakelen + + + + Cancel + Annuleren + + + + Turn off + Uitschakelen + + + + Help... + Hulp... + + + + Donate... + Doneren... + + + + About... + Over... + + + + Quit + Stoppen + + + + Error starting VPN + Fout bij het opstarten van de VPN + + + + Missing authentication agent + Authenticatieagent ontbreekt + + + + Could not find a polkit authentication agent. Please run one and try again. + Kan geen polkit authenticatieagent vinden. Voer er een uit en probeer opnieuw. + + + + Initialization Error + + + + diff --git a/gui/i18n/main_pl.ts b/gui/i18n/main_pl.ts new file mode 100644 index 00000000..768b3832 --- /dev/null +++ b/gui/i18n/main_pl.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + O programie... + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + Darowizna + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + Login + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + Sprawdzanie statusu + + + + Reconnect + Połącz ponownie + + + + Turn on + Włącz + + + + Cancel + Anuluj + + + + Turn off + Wyłącz + + + + Help... + Pomoc... + + + + Donate... + Wesprzyj... + + + + About... + O programie... + + + + Quit + Zamknij + + + + Error starting VPN + Błąd przy uruchamianiu VPN'a + + + + Missing authentication agent + Brakujący agent autoryzacji + + + + Could not find a polkit authentication agent. Please run one and try again. + Nie znaleziono agenta autentykacji polkit. Proszę uruchom go i spróbuj ponownie. + + + + Initialization Error + + + + diff --git a/gui/i18n/main_pt_BR.ts b/gui/i18n/main_pt_BR.ts new file mode 100644 index 00000000..ad04d47c --- /dev/null +++ b/gui/i18n/main_pt_BR.ts @@ -0,0 +1,172 @@ + + + + + AboutDialog + + + About + Sobre + + + + <p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> <p>This service is paid for entirely by donations from users like you. <a href="%3">Please donate</a>.</p> <p>By using this application, you agree to the <a href="%4">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p> + about dialog %1 -> application name %2 -> provider name %3 -> donation URL %4 -> TOS URL + + + + + %1 version: %2 + %1 -> application name %2 -> version string + + + + + DonateDialog + + + Donate + Fazer uma doação + + + + The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month. + +Do you want to donate now? + donate dialog %1 -> application name + + + + + LoginDialog + + + Login + Conectar + + + + Log in with your library credentials + + + + + patron id + + + + + password + + + + + main + + + Could not find helpers. Check your installation + + + + + Could not find polkit agent. + + + + + %1 off + %1 -> application name + + + + + %1 on + %1 -> application name + + + + + Connecting to %1 + %1 -> application name + + + + + Stopping %1 + %1 -> application name + + + + + %1 blocking internet + %1 -> application name + + + + + + Checking status... + Verificando estado... + + + + Reconnect + Reconectar + + + + Turn on + Ligar + + + + Cancel + Cancelar + + + + Turn off + Desligar + + + + Help... + Ajuda... + + + + Donate... + Fazer uma doação... + + + + About... + Sobre... + + + + Quit + Sair + + + + Error starting VPN + Erro ao iniciar a VPN + + + + Missing authentication agent + Um agente de autenticação está faltando + + + + Could not find a polkit authentication agent. Please run one and try again. + Não foi possível encontrar um agente de autenticação polkit. Por favor, execute um agente e tente novamente. + + + + Initialization Error + + + + diff --git a/gui/main.cpp b/gui/main.cpp index 670e6649..73d55ccd 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,10 @@ int main(int argc, char **argv) { if (!QSystemTrayIcon::isSystemTrayAvailable()) { qDebug() << "No systray icon available. Things might not work for now, sorry..."; } + + QTranslator translator; + translator.load(QLocale(), QLatin1String("main"), QLatin1String("_"), QLatin1String(":/i18n")); + app.installTranslator(&translator); app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; diff --git a/gui/qml/AboutDialog.qml b/gui/qml/AboutDialog.qml index 98cacdc5..68e76d30 100644 --- a/gui/qml/AboutDialog.qml +++ b/gui/qml/AboutDialog.qml @@ -11,6 +11,11 @@ MessageDialog { var _provider = ctx ? ctx.provider : "unknown" var _donateURL= ctx ? ctx.donateURL : "..." var _tosURL = ctx ? ctx.tosURL : "..." + //: about dialog + //: %1 -> application name + //: %2 -> provider name + //: %3 -> donation URL + //: %4 -> TOS URL var _txt = qsTr( "

%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.

This service is paid for entirely by donations from users like you. Please donate.

By using this application, you agree to the Terms of Service. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.

").arg(_name).arg(_provider).arg(_donateURL).arg(_tosURL) return _txt @@ -19,7 +24,9 @@ MessageDialog { function getVersion() { var _name = ctx ? ctx.appName : "vpn" var _ver = ctx ? ctx.version : "unknown" - var _txt = "%1 version: %2".arg(_name).arg(_ver) + //: %1 -> application name + //: %2 -> version string + var _txt = qsTr("%1 version: %2").arg(_name).arg(_ver) return _txt } } diff --git a/gui/qml/DonateDialog.qml b/gui/qml/DonateDialog.qml index de7ab5ba..afbd57ba 100644 --- a/gui/qml/DonateDialog.qml +++ b/gui/qml/DonateDialog.qml @@ -9,6 +9,8 @@ MessageDialog { function getText() { var _name = ctx ? ctx.appName : "vpn" + //: donate dialog + //: %1 -> application name var _txt = qsTr( "The %1 service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\nDo you want to donate now?").arg(_name) return _txt diff --git a/gui/qml/LoginConfirmation.qml b/gui/qml/LoginConfirmation.qml index 476cdadb..618b8705 100644 --- a/gui/qml/LoginConfirmation.qml +++ b/gui/qml/LoginConfirmation.qml @@ -4,8 +4,8 @@ import QtQuick.Controls 1.4 Dialog { standardButtons: StandardButton.Ok - title: "Login Success" - text: "You are now logged in, connecting now" + title: qsTr("Login Success") + text: qsTr("You are now logged in, connecting now") visible: ctxSystray.loginConfirmationDialog == true } diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml index fbe5ce12..0c0f18ea 100644 --- a/gui/qml/LoginDialog.qml +++ b/gui/qml/LoginDialog.qml @@ -4,19 +4,19 @@ import QtQuick.Controls 1.4 Dialog { standardButtons: StandardButton.Ok - title: "Login" + title: qsTr("Login") Column { anchors.fill: parent Text { - text: "Log in with your library credentials" + text: qsTr("Log in with your library credentials") } TextField { id: username - placeholderText: "patron id" + placeholderText: qsTr("patron id") } TextField { id: password - placeholderText: "password" + placeholderText: qsTr("password") echoMode: TextInput.PasswordEchoOnEdit } } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 4aab7f19..2ac93984 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -52,16 +52,20 @@ ApplicationWindow { function toHuman(st) { switch(st) { case "off": - // TODO improve string interpolation, give context to translators etc - return qsTr(ctx.appName + " off"); + //: %1 -> application name + return qsTr("%1 off").arg(ctx.appName); case "on": - return qsTr(ctx.appName + " on"); + //: %1 -> application name + return qsTr("%1 on").arg(ctx.appName); case "connecting": - return qsTr("Connecting to " + ctx.appName); + //: %1 -> application name + return qsTr("Connecting to %1").arg(ctx.appName); case "stopping": - return qsTr("Stopping " + ctx.appName); + //: %1 -> application name + return qsTr("Stopping %1").arg(ctx.appName); case "failed": - return qsTr(ctx.appName + " blocking internet"); // TODO failed is not handed yet + //: %1 -> application name + return qsTr("%1 blocking internet").arg(ctx.appName); // TODO failed is not handed yet } } diff --git a/tools/transifex/Makefile b/tools/transifex/Makefile deleted file mode 100644 index bf5bf2bb..00000000 --- a/tools/transifex/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -all: build generate_json - -build: - go build - -generate_json: - ./transifex g2t ../../locales/en-US/out.gotext.json messages.json diff --git a/tools/transifex/main.go b/tools/transifex/main.go deleted file mode 100644 index 37bae976..00000000 --- a/tools/transifex/main.go +++ /dev/null @@ -1,124 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - "path" - - "golang.org/x/text/message/pipeline" -) - -const ( - outGotext = "out.gotext.json" - messagesGotext = "messages.gotext.json" -) - -type transifex map[string]string - -func main() { - if len(os.Args) < 2 { - panic("g2t or t2g should be passed as argument") - } - - switch os.Args[1] { - case "g2t": - g2t(func(m pipeline.Message) string { return m.Message.Msg }) - case "lang2t": - g2t(func(m pipeline.Message) string { return m.Translation.Msg }) - case "t2g": - t2g() - default: - panic("g2t or t2g should be passed as argument") - } -} - -func g2t(getMessage func(pipeline.Message) string) { - if len(os.Args) < 4 { - panic(fmt.Sprintf("usage: %s g2t inFile outFile", os.Args[0])) - } - - inF, err := os.Open(os.Args[2]) - if err != nil { - panic(fmt.Sprintf("Can't open input file %s: %v", os.Args[2], err)) - } - outF, err := os.Create(os.Args[3]) - if err != nil { - panic(fmt.Sprintf("Can't open output file %s: %v", os.Args[3], err)) - } - - toTransifex(inF, outF, getMessage) -} - -func t2g() { - if len(os.Args) < 3 { - panic(fmt.Sprintf("usage: %s t2g localeFolder", os.Args[0])) - } - - origF, err := os.Open(path.Join(os.Args[2], outGotext)) - if err != nil { - panic(fmt.Sprintf("Can't open file %s/%s: %v", os.Args[3], outGotext, err)) - } - outF, err := os.Create(path.Join(os.Args[2], messagesGotext)) - if err != nil { - panic(fmt.Sprintf("Can't open output file %s/%v: %v", os.Args[3], messagesGotext, err)) - } - toGotext(origF, os.Stdin, outF) -} - -func toTransifex(inF, outF *os.File, getMessage func(pipeline.Message) string) { - messages := pipeline.Messages{} - dec := json.NewDecoder(inF) - err := dec.Decode(&messages) - if err != nil { - panic(fmt.Sprintf("An error ocurred decoding json: %v", err)) - } - - transfx := make(transifex) - for _, m := range messages.Messages { - transfx[m.ID[0]] = getMessage(m) - } - enc := json.NewEncoder(outF) - enc.SetIndent("", " ") - err = enc.Encode(transfx) - if err != nil { - panic(fmt.Sprintf("An error ocurred encoding json: %v", err)) - } -} - -func toGotext(origF, inF, outF *os.File) { - transfx := make(transifex) - dec := json.NewDecoder(inF) - err := dec.Decode(&transfx) - if err != nil { - panic(fmt.Sprintf("An error ocurred decoding json: %v", err)) - } - - messages := pipeline.Messages{} - dec = json.NewDecoder(origF) - err = dec.Decode(&messages) - if err != nil { - panic(fmt.Sprintf("An error ocurred decoding orig json: %v", err)) - } - - for k, v := range transfx { - found := false - for i, m := range messages.Messages { - if m.ID[0] == k { - messages.Messages[i].Translation.Msg = v - found = true - break - } - } - if !found { - fmt.Printf("The original document doesn't have id: %s\n", k) - } - } - - enc := json.NewEncoder(outF) - enc.SetIndent("", " ") - err = enc.Encode(messages) - if err != nil { - panic(fmt.Sprintf("An error ocurred encoding json: %v", err)) - } -} diff --git a/tools/transifex/messages.json b/tools/transifex/messages.json deleted file mode 100644 index a8e01117..00000000 --- a/tools/transifex/messages.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "About": "About", - "About...": "About...", - "Cancel": "Cancel", - "Checking status...": "Checking status...", - "Connecting to {ApplicationName}": "Connecting to {ApplicationName}", - "Donate": "Donate", - "Donate...": "Donate...", - "Error starting VPN": "Error starting VPN", - "Help...": "Help...", - "Initialization error": "Initialization error", - "Missing authentication agent": "Missing authentication agent", - "Quit": "Quit", - "Reconnect": "Reconnect", - "Route traffic through:": "Route traffic through:", - "Stopping {ApplicationName}": "Stopping {ApplicationName}", - "Turn off": "Turn off", - "Turn on": "Turn on", - "Use {ApplicationName} {City} gateway": "Use {ApplicationName} {City} gateway", - "aboutText": "{ApplicationName} is an easy, fast, and secure VPN service from {Provider}. {ApplicationName} does not require a user account, keep logs, or track you in any way.\n\t \nThis service is paid for entirely by donations from users like you. Please donate at {DonateURL}.\n\t\t\nBy using this application, you agree to the Terms of Service available at {TosURL}. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.\n\n\n{ApplicationName_1} version: {Version}", - "donationText": "The {ApplicationName} service is expensive to run. Because we don't want to store personal information about you, there are no accounts or billing for this service. But if you want the service to continue, donate at least $5 each month.\n\t\nDo you want to donate now?", - "errorMsg": "An error has ocurred initializing the VPN: {Err}", - "errorStartingVPN": "Can't connect to {ApplicationName}: {Err}", - "missingAuthAgent": "Could not find a polkit authentication agent. Please run one and try again.", - "{ApplicationName} blocking internet": "{ApplicationName} blocking internet", - "{ApplicationName} off": "{ApplicationName} off", - "{ApplicationName} on": "{ApplicationName} on" -} From 0b6af618cc7dd4245e440efb6b90387f41d129e7 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 23 Jun 2020 17:12:42 +0200 Subject: [PATCH 053/174] [refactor] use qt argument parsing --- gui/backend.go | 10 ++++++++++ gui/handlers.cpp | 10 ++++++++++ gui/handlers.h | 2 ++ gui/main.cpp | 31 ++++++++++++++++++++----------- pkg/backend/api.go | 15 +++++++++++++++ 5 files changed, 57 insertions(+), 11 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index 4a73cc26..faf682a4 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -12,6 +12,16 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/backend" ) +//export GetVersion +func GetVersion() *C.char { + return (*C.char)(backend.GetVersion()) +} + +//export GetAppName +func GetAppName() *C.char { + return (*C.char)(backend.GetAppName()) +} + //export SwitchOn func SwitchOn() { backend.SwitchOn() diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 9ce268d2..de54161d 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -10,6 +10,16 @@ Backend::Backend(QObject *parent) : QObject(parent) { } +QString Backend::getAppName() +{ + return QString(GetAppName()); +} + +QString Backend::getVersion() +{ + return QString(GetVersion()); +} + void Backend::switchOn() { SwitchOn(); diff --git a/gui/handlers.h b/gui/handlers.h index 0dc4c1ea..8f89279d 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -30,6 +30,8 @@ class Backend : public QObject { void quitDone(); public slots: + QString getAppName(); + QString getVersion(); void switchOn(); void switchOff(); void unblock(); diff --git a/gui/main.cpp b/gui/main.cpp index 73d55ccd..e5486dfe 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -1,13 +1,11 @@ #include -#include - #include -#include #include #include -#include -#include +#include #include +#include +#include #include "handlers.h" #include "qjsonmodel.h" @@ -42,18 +40,30 @@ void signalHandler(int) { int main(int argc, char **argv) { signal(SIGINT, signalHandler); - bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; - if (argc > 1 && strcmp(argv[1], "install-helpers") == 0) { + Backend backend; + + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication::setApplicationName(backend.getAppName()); + QApplication::setApplicationVersion(backend.getVersion()); + QApplication app(argc, argv); + + + QCommandLineParser parser; + parser.setApplicationDescription(backend.getAppName() + ": a fast and secure VPN. Powered by Bitmask."); + parser.addHelpOption(); + parser.addVersionOption(); + parser.process(app); + + const QStringList args = parser.positionalArguments(); + + if (args.at(0) == "install-helpers") { qDebug() << "Will try to install helpers with sudo"; InstallHelpers(); exit(0); } - QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QApplication app(argc, argv); - if (!QSystemTrayIcon::isSystemTrayAvailable()) { qDebug() << "No systray icon available. Things might not work for now, sorry..."; } @@ -72,7 +82,6 @@ int main(int argc, char **argv) { /* the backend handler has slots for calling back to Go when triggered by signals in Qml. */ - Backend backend; ctx->setContextProperty("backend", &backend); /* set the json model, load the qml */ diff --git a/pkg/backend/api.go b/pkg/backend/api.go index fea38dbc..64dac9d6 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -9,6 +9,7 @@ import ( "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/config/version" "0xacab.org/leap/bitmask-vpn/pkg/pickle" ) @@ -74,3 +75,17 @@ func EnableMockBackend() { log.Println("[+] Mocking ui interaction on port 8080. \nTry 'curl localhost:8080/{on|off|failed}' to toggle status.") go enableMockBackend() } + +/* 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. */ + +func GetVersion() *C.char { + return C.CString(version.VERSION) +} + +func GetAppName() *C.char { + p := bitmask.GetConfiguredProvider() + return C.CString(p.AppName) +} From b4e75a27b7338aacaf1255f24b01d8454f908886 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 23 Jun 2020 18:47:25 +0200 Subject: [PATCH 054/174] [feat] hide systray if -n option is passed --- gui/main.cpp | 37 +++++++++++++++++++++++++++++-------- gui/qml/main.qml | 6 ++++-- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/gui/main.cpp b/gui/main.cpp index e5486dfe..8033dba1 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -48,17 +48,40 @@ int main(int argc, char **argv) { QApplication::setApplicationName(backend.getAppName()); QApplication::setApplicationVersion(backend.getVersion()); QApplication app(argc, argv); - + app.setQuitOnLastWindowClosed(false); QCommandLineParser parser; - parser.setApplicationDescription(backend.getAppName() + ": a fast and secure VPN. Powered by Bitmask."); + parser.setApplicationDescription( + backend.getAppName() + + QApplication::translate( + "main", ": a fast and secure VPN. Powered by Bitmask.")); parser.addHelpOption(); parser.addVersionOption(); + parser.addOptions({ + { + {"n", "no-systray"}, + QApplication::translate("main", + "Do not show the systray icon (useful " + "together with gnome shell " + "extension, or to control VPN by other means)."), + }, + { + {"i", "install-helpers"}, + QApplication::translate( + "main", + "Install helpers (linux only, requires sudo)."), + }, + }); parser.process(app); - const QStringList args = parser.positionalArguments(); + bool hideSystray = parser.isSet("no-systray"); + bool installHelpers = parser.isSet("install-helpers"); - if (args.at(0) == "install-helpers") { + if (hideSystray) { + qDebug() << "Not showing systray icon because --no-systray option is set."; + } + + if (installHelpers) { qDebug() << "Will try to install helpers with sudo"; InstallHelpers(); exit(0); @@ -72,21 +95,19 @@ int main(int argc, char **argv) { translator.load(QLocale(), QLatin1String("main"), QLatin1String("_"), QLatin1String(":/i18n")); app.installTranslator(&translator); - app.setQuitOnLastWindowClosed(false); QQmlApplicationEngine engine; QQmlContext *ctx = engine.rootContext(); QJsonModel *model = new QJsonModel; - std::string json = R"({"appName": "unknown", "provider": "unknown"})"; - model->loadJson(QByteArray::fromStdString(json)); /* the backend handler has slots for calling back to Go when triggered by signals in Qml. */ ctx->setContextProperty("backend", &backend); - /* set the json model, load the qml */ + /* we pass the json model and set some useful flags */ ctx->setContextProperty("jsonModel", model); ctx->setContextProperty("debugQml", debugQml); + ctx->setContextProperty("systrayVisible", !hideSystray); engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 2ac93984..b4aa19af 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -80,7 +80,7 @@ ApplicationWindow { SystemTrayIcon { id: systray - visible: true + visible: systrayVisible onActivated: { // this looks like a widget bug. middle click (reasons 3 or 4) @@ -105,7 +105,9 @@ ApplicationWindow { tooltip = qsTr("Checking status...") console.debug("systray init completed") hide(); - show(); + if (systrayVisible) { + show(); + } } menu: Menu { From 25083d7574daf8b156720c703ac50fc5a56b0077 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 23 Jun 2020 19:12:08 +0200 Subject: [PATCH 055/174] [feat] first simplistic implementation of a rest api It lacks authentication, and I need to debug a segfault/abort when quitting. But kind of useful for demonstration purposes. --- gui/backend.go | 5 +++++ gui/main.cpp | 10 ++++++++++ pkg/backend/api.go | 4 ++++ pkg/backend/webapi.go | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 pkg/backend/webapi.go diff --git a/gui/backend.go b/gui/backend.go index faf682a4..875706d2 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -66,6 +66,11 @@ func InitializeTestBitmaskContext() { backend.EnableMockBackend() } +//export EnableWebAPI +func EnableWebAPI() { + backend.EnableWebAPI() +} + //export RefreshContext func RefreshContext() *C.char { return (*C.char)(backend.RefreshContext()) diff --git a/gui/main.cpp b/gui/main.cpp index 8033dba1..6d01d49a 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -65,6 +65,12 @@ int main(int argc, char **argv) { "together with gnome shell " "extension, or to control VPN by other means)."), }, + { + {"w", "web-api"}, + QApplication::translate( + "main", + "Enable web api (on port 8080)."), + }, { {"i", "install-helpers"}, QApplication::translate( @@ -76,6 +82,7 @@ int main(int argc, char **argv) { bool hideSystray = parser.isSet("no-systray"); bool installHelpers = parser.isSet("install-helpers"); + bool webAPI = parser.isSet("web-api"); if (hideSystray) { qDebug() << "Not showing systray icon because --no-systray option is set."; @@ -132,6 +139,9 @@ int main(int argc, char **argv) { /* let the Go side initialize its internal state */ InitializeBitmaskContext(); + /* if requested, enable web api for controlling the VPN */ + if (webAPI) { EnableWebAPI(); }; + /* kick off your shoes, put your feet up */ return app.exec(); } diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 64dac9d6..f63962cd 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -76,6 +76,10 @@ func EnableMockBackend() { go enableMockBackend() } +func EnableWebAPI() { + go enableWebAPI() +} + /* 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 diff --git a/pkg/backend/webapi.go b/pkg/backend/webapi.go new file mode 100644 index 00000000..e3918c50 --- /dev/null +++ b/pkg/backend/webapi.go @@ -0,0 +1,35 @@ +package backend + +import ( + "fmt" + "log" + "net/http" +) + +func webOn(w http.ResponseWriter, r *http.Request) { + log.Println("Web UI: on") + SwitchOn() +} + +func webOff(w http.ResponseWriter, r *http.Request) { + log.Println("Web UI: off") + SwitchOff() +} + +func webStatus(w http.ResponseWriter, r *http.Request) { + log.Println("Web UI: status") + fmt.Fprintf(w, ctx.Status.String()) +} + +func webQuit(w http.ResponseWriter, r *http.Request) { + log.Println("Web UI: quit") + Quit() +} + +func enableWebAPI() { + http.HandleFunc("/vpn/start", webOn) + http.HandleFunc("/vpn/stop", webOff) + http.HandleFunc("/vpn/status", webStatus) + http.HandleFunc("/vpn/quit", webQuit) + http.ListenAndServe(":8080", nil) +} From 1f209f0065957f8f0f416962e00b77dd75388013 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 23 Jun 2020 19:34:47 +0200 Subject: [PATCH 056/174] [feat] authentication token for webapi --- pkg/backend/webapi.go | 38 +++++++++++++++++++++++++++---- pkg/bitmask/auth.go | 52 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 pkg/bitmask/auth.go diff --git a/pkg/backend/webapi.go b/pkg/backend/webapi.go index e3918c50..a8844e82 100644 --- a/pkg/backend/webapi.go +++ b/pkg/backend/webapi.go @@ -4,8 +4,35 @@ import ( "fmt" "log" "net/http" + "os" + + "0xacab.org/leap/bitmask-vpn/pkg/bitmask" ) +func Adapt(h http.Handler, adapters ...Adapter) http.Handler { + for _, adapter := range adapters { + h = adapter(h) + } + return h +} + +type Adapter func(http.Handler) http.Handler + +func CheckAuth(token string) Adapter { + return func(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + t := r.Header.Get("X-Auth-Token") + if t == token { + h.ServeHTTP(w, r) + } else { + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte("401 - Unauthorized")) + } + + }) + } +} + func webOn(w http.ResponseWriter, r *http.Request) { log.Println("Web UI: on") SwitchOn() @@ -24,12 +51,15 @@ func webStatus(w http.ResponseWriter, r *http.Request) { func webQuit(w http.ResponseWriter, r *http.Request) { log.Println("Web UI: quit") Quit() + os.Exit(0) } func enableWebAPI() { - http.HandleFunc("/vpn/start", webOn) - http.HandleFunc("/vpn/stop", webOff) - http.HandleFunc("/vpn/status", webStatus) - http.HandleFunc("/vpn/quit", webQuit) + bitmask.GenerateAuthToken() + auth := CheckAuth(bitmask.ReadAuthToken()) + http.Handle("/vpn/start", Adapt(http.HandlerFunc(webOn), auth)) + http.Handle("/vpn/stop", Adapt(http.HandlerFunc(webOff), auth)) + http.Handle("/vpn/status", Adapt(http.HandlerFunc(webStatus), auth)) + http.Handle("/vpn/quit", Adapt(http.HandlerFunc(webQuit), auth)) http.ListenAndServe(":8080", nil) } diff --git a/pkg/bitmask/auth.go b/pkg/bitmask/auth.go new file mode 100644 index 00000000..519eaf12 --- /dev/null +++ b/pkg/bitmask/auth.go @@ -0,0 +1,52 @@ +package bitmask + +import ( + "io/ioutil" + "log" + "math/rand" + "os" + "runtime" + "strings" + "time" +) + +/* functions for local authentication of control endpoints */ + +const tokenPath = "/dev/shm/bitmask-token" + +func GenerateAuthToken() { + if runtime.GOOS != "linux" { + log.Println("Authentication token only implemented in linux at the moment.") + return + } + t := getRandomString() + err := ioutil.WriteFile(tokenPath, []byte(t), os.FileMode(int(0600))) + if err != nil { + log.Println("Could not write authentication token.") + } +} + +func ReadAuthToken() string { + if runtime.GOOS != "linux" { + log.Println("Authentication token only implemented in linux at the moment.") + return "" + } + token, err := ioutil.ReadFile(tokenPath) + if err != nil { + log.Println("Error reading token:", err) + } + return string(token) +} + +func getRandomString() string { + rand.Seed(time.Now().UnixNano()) + chars := []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + "abcdefghijklmnopqrstuvwxyz" + + "0123456789") + length := 40 + var b strings.Builder + for i := 0; i < length; i++ { + b.WriteRune(chars[rand.Intn(len(chars))]) + } + return b.String() +} From 015b378c387f51afb73fe4efb8eb05148188dda2 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 11 Aug 2020 22:38:13 +0200 Subject: [PATCH 057/174] [refactor] simplify, make port optional --- gui/backend.go | 4 ++-- gui/main.cpp | 11 ++++++++-- pkg/backend/api.go | 9 +++++++-- pkg/backend/webapi.go | 47 +++++++++++++++++-------------------------- pkg/bitmask/auth.go | 5 ++++- 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index 875706d2..af29ec6c 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -67,8 +67,8 @@ func InitializeTestBitmaskContext() { } //export EnableWebAPI -func EnableWebAPI() { - backend.EnableWebAPI() +func EnableWebAPI(port string) { + backend.EnableWebAPI(port) } //export RefreshContext diff --git a/gui/main.cpp b/gui/main.cpp index 6d01d49a..2a300e21 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -69,7 +69,7 @@ int main(int argc, char **argv) { {"w", "web-api"}, QApplication::translate( "main", - "Enable web api (on port 8080)."), + "Enable web api."), }, { {"i", "install-helpers"}, @@ -78,11 +78,14 @@ int main(int argc, char **argv) { "Install helpers (linux only, requires sudo)."), }, }); + QCommandLineOption webPortOption("web-port", QApplication::translate("main", "Web api port (default: 8080)"), "port", "8080"); + parser.addOption(webPortOption); parser.process(app); bool hideSystray = parser.isSet("no-systray"); bool installHelpers = parser.isSet("install-helpers"); bool webAPI = parser.isSet("web-api"); + QString webPort = parser.value("web-port"); if (hideSystray) { qDebug() << "Not showing systray icon because --no-systray option is set."; @@ -140,7 +143,11 @@ int main(int argc, char **argv) { InitializeBitmaskContext(); /* if requested, enable web api for controlling the VPN */ - if (webAPI) { EnableWebAPI(); }; + if (webAPI) { + char* wp = webPort.toLocal8Bit().data(); + GoString p = {wp, (long int)strlen(wp)}; + EnableWebAPI(p); + }; /* kick off your shoes, put your feet up */ return app.exec(); diff --git a/pkg/backend/api.go b/pkg/backend/api.go index f63962cd..0cab17f7 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -6,6 +6,7 @@ import ( "C" "fmt" "log" + "strconv" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" @@ -76,8 +77,12 @@ func EnableMockBackend() { go enableMockBackend() } -func EnableWebAPI() { - go enableWebAPI() +func EnableWebAPI(port string) { + intPort, err := strconv.Atoi(port) + if err != nil { + log.Fatal("Cannot parse port", port) + } + go enableWebAPI(intPort) } /* these two are a bit redundant since we already add them to ctx. however, we diff --git a/pkg/backend/webapi.go b/pkg/backend/webapi.go index a8844e82..568980d0 100644 --- a/pkg/backend/webapi.go +++ b/pkg/backend/webapi.go @@ -5,31 +5,20 @@ import ( "log" "net/http" "os" + "strconv" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" ) -func Adapt(h http.Handler, adapters ...Adapter) http.Handler { - for _, adapter := range adapters { - h = adapter(h) - } - return h -} - -type Adapter func(http.Handler) http.Handler - -func CheckAuth(token string) Adapter { - return func(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - t := r.Header.Get("X-Auth-Token") - if t == token { - h.ServeHTTP(w, r) - } else { - w.WriteHeader(http.StatusUnauthorized) - w.Write([]byte("401 - Unauthorized")) - } - - }) +func CheckAuth(handler http.HandlerFunc, token string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + t := r.Header.Get("X-Auth-Token") + if t == token { + handler(w, r) + } else { + w.WriteHeader(http.StatusUnauthorized) + w.Write([]byte("401 - Unauthorized")) + } } } @@ -44,7 +33,6 @@ func webOff(w http.ResponseWriter, r *http.Request) { } func webStatus(w http.ResponseWriter, r *http.Request) { - log.Println("Web UI: status") fmt.Fprintf(w, ctx.Status.String()) } @@ -54,12 +42,13 @@ func webQuit(w http.ResponseWriter, r *http.Request) { os.Exit(0) } -func enableWebAPI() { +func enableWebAPI(port int) { + log.Println("Starting WebAPI in port", port) bitmask.GenerateAuthToken() - auth := CheckAuth(bitmask.ReadAuthToken()) - http.Handle("/vpn/start", Adapt(http.HandlerFunc(webOn), auth)) - http.Handle("/vpn/stop", Adapt(http.HandlerFunc(webOff), auth)) - http.Handle("/vpn/status", Adapt(http.HandlerFunc(webStatus), auth)) - http.Handle("/vpn/quit", Adapt(http.HandlerFunc(webQuit), auth)) - http.ListenAndServe(":8080", nil) + token := bitmask.ReadAuthToken() + http.Handle("/vpn/start", CheckAuth(http.HandlerFunc(webOn), token)) + http.Handle("/vpn/stop", CheckAuth(http.HandlerFunc(webOff), token)) + http.Handle("/vpn/status", CheckAuth(http.HandlerFunc(webStatus), token)) + http.Handle("/vpn/quit", CheckAuth(http.HandlerFunc(webQuit), token)) + http.ListenAndServe(":"+strconv.Itoa(port), nil) } diff --git a/pkg/bitmask/auth.go b/pkg/bitmask/auth.go index 519eaf12..a87a2eaa 100644 --- a/pkg/bitmask/auth.go +++ b/pkg/bitmask/auth.go @@ -5,6 +5,7 @@ import ( "log" "math/rand" "os" + "path/filepath" "runtime" "strings" "time" @@ -12,7 +13,7 @@ import ( /* functions for local authentication of control endpoints */ -const tokenPath = "/dev/shm/bitmask-token" +const bitmaskToken = "bitmask-token" func GenerateAuthToken() { if runtime.GOOS != "linux" { @@ -20,6 +21,7 @@ func GenerateAuthToken() { return } t := getRandomString() + tokenPath := filepath.Join(os.TempDir(), bitmaskToken) err := ioutil.WriteFile(tokenPath, []byte(t), os.FileMode(int(0600))) if err != nil { log.Println("Could not write authentication token.") @@ -31,6 +33,7 @@ func ReadAuthToken() string { log.Println("Authentication token only implemented in linux at the moment.") return "" } + tokenPath := filepath.Join(os.TempDir(), bitmaskToken) token, err := ioutil.ReadFile(tokenPath) if err != nil { log.Println("Error reading token:", err) From 62d6da09cee528c037749a3f67209a948e73855d Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 4 Aug 2020 12:55:47 +0200 Subject: [PATCH 058/174] Unblock is not needed switch off does unblock bitmask --- gui/backend.go | 5 ----- gui/handlers.cpp | 5 ----- gui/handlers.h | 1 - pkg/backend/api.go | 5 ----- 4 files changed, 16 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index af29ec6c..536ade34 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -32,11 +32,6 @@ func SwitchOff() { backend.SwitchOff() } -//export Unblock -func Unblock() { - backend.Unblock() -} - //export Quit func Quit() { backend.Quit() diff --git a/gui/handlers.cpp b/gui/handlers.cpp index de54161d..ab64afb4 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -30,11 +30,6 @@ void Backend::switchOff() SwitchOff(); } -void Backend::unblock() -{ - Unblock(); -} - void Backend::donateAccepted() { DonateAccepted(); diff --git a/gui/handlers.h b/gui/handlers.h index 8f89279d..62a733d1 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -34,7 +34,6 @@ public slots: QString getVersion(); void switchOn(); void switchOff(); - void unblock(); void donateAccepted(); void quit(); }; diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 0cab17f7..99e156f3 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -24,11 +24,6 @@ func SwitchOff() { go stopVPN() } -func Unblock() { - //TODO - - fmt.Println("unblock... [not implemented]") -} - func Quit() { if ctx.Status != off { go setStatus(stopping) From 4ab332c375e4517c57a248150b3b7d2a7be5e0b7 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 4 Aug 2020 19:28:43 +0200 Subject: [PATCH 059/174] Quit if there was an initializaton error Let's close properly without segfaults :) --- gui/qml/main.qml | 6 +++++- pkg/backend/api.go | 9 ++++++--- pkg/backend/init.go | 2 +- pkg/vpn/launcher_linux.go | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index b4aa19af..09bbab5c 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -20,12 +20,14 @@ ApplicationWindow { donate.visible = true } if (ctx.errors ) { - // TODO consider disabling on/off buttons, or quit after closing the dialog if ( ctx.errors == "nohelpers" ) { showInitFailure(qsTr("Could not find helpers. Check your installation")) } else if ( ctx.errors == "nopolkit" ) { showInitFailure(qsTr("Could not find polkit agent.")) } else { + //: %1 -> application name + //: %2 -> error string + showInitFailure(qsTr("Got an error starting %1: %2").arg(ctx.appName).arg(ctx.errors)) console.debug(ctx.errors) } } @@ -248,5 +250,7 @@ ApplicationWindow { title: qsTr("Initialization Error") text: "" visible: false + onAccepted: backend.quit() + onRejected: backend.quit() } } diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 99e156f3..ff8c1bbe 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -4,7 +4,6 @@ package backend import ( "C" - "fmt" "log" "strconv" "unsafe" @@ -31,7 +30,9 @@ func Quit() { } else { ctx.cfg.SetUserStoppedVPN(true) } - ctx.bm.Close() + if ctx.bm != nil { + ctx.bm.Close() + } } func DonateAccepted() { @@ -55,7 +56,9 @@ func InitializeBitmaskContext(opts *InitOpts) { initOnce.Do(func() { initializeContext(opts) }) runDonationReminder() - go ctx.updateStatus() + if ctx.bm != nil { + go ctx.updateStatus() + } } func RefreshContext() *C.char { diff --git a/pkg/backend/init.go b/pkg/backend/init.go index 79efdc78..bae9b9b8 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -45,6 +45,7 @@ func initializeBitmask(errCh chan string, opts *InitOpts) { os.Exit(1) } bitmask.InitializeLogger() + ctx.cfg = config.ParseConfig() b, err := bitmask.InitializeBitmask(opts.SkipLaunch) if err != nil { @@ -70,5 +71,4 @@ func initializeBitmask(errCh chan string, opts *InitOpts) { } ctx.bm = b - ctx.cfg = config.ParseConfig() } diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go index f92cf6ff..1280eae8 100644 --- a/pkg/vpn/launcher_linux.go +++ b/pkg/vpn/launcher_linux.go @@ -230,7 +230,8 @@ func bitmaskRootPath() (string, error) { return path, nil } } - return "", errors.New("No bitmask-root found") + log.Println("Can't find bitmask-root") + return "", errors.New("nohelpers") } func getOpenvpnPath() string { From e5a8d4bbd9b1a3079320fcbdbdd558a9ba135bca Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 27 Jan 2020 20:44:34 -0600 Subject: [PATCH 060/174] [feat] add sip authentication initial merge of the sip authentication mechanism --- pkg/vpn/bonafide/auth.go | 21 +++ pkg/vpn/bonafide/auth_anon.go | 45 +++++ pkg/vpn/bonafide/auth_sip.go | 88 +++++++++ pkg/vpn/bonafide/bonafide.go | 41 +++-- pkg/vpn/bonafide/eip_service.go | 24 ++- .../bonafide/testdata/eip-service3-sip.json | 174 ++++++++++++++++++ 6 files changed, 372 insertions(+), 21 deletions(-) create mode 100644 pkg/vpn/bonafide/auth.go create mode 100644 pkg/vpn/bonafide/auth_anon.go create mode 100644 pkg/vpn/bonafide/auth_sip.go create mode 100644 pkg/vpn/bonafide/testdata/eip-service3-sip.json diff --git a/pkg/vpn/bonafide/auth.go b/pkg/vpn/bonafide/auth.go new file mode 100644 index 00000000..b6b3eecd --- /dev/null +++ b/pkg/vpn/bonafide/auth.go @@ -0,0 +1,21 @@ +// Copyright (C) 2018 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package bonafide + +type Credentials struct { + User string + Password string +} diff --git a/pkg/vpn/bonafide/auth_anon.go b/pkg/vpn/bonafide/auth_anon.go new file mode 100644 index 00000000..61916e69 --- /dev/null +++ b/pkg/vpn/bonafide/auth_anon.go @@ -0,0 +1,45 @@ +// Copyright (C) 2018-2020 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package bonafide + +import ( + "fmt" + "io/ioutil" +) + +type AnonymousAuthentication struct { + bonafide *Bonafide +} + +func (a *AnonymousAuthentication) GetPemCertificate() ([]byte, error) { + resp, err := a.bonafide.client.Post(certAPI, "", nil) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode == 404 { + resp, err = a.bonafide.client.Post(certAPI3, "", nil) + if err != nil { + return nil, err + } + defer resp.Body.Close() + } + if resp.StatusCode != 200 { + return nil, fmt.Errorf("Get vpn cert has failed with status: %s", resp.Status) + } + + return ioutil.ReadAll(resp.Body) +} diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go new file mode 100644 index 00000000..d8ebedb9 --- /dev/null +++ b/pkg/vpn/bonafide/auth_sip.go @@ -0,0 +1,88 @@ +// Copyright (C) 2018 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package bonafide + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "log" + "net/http" + "strings" +) + +type SipAuthentication struct { + bonafide *Bonafide +} + +func (a *SipAuthentication) GetPemCertificate() ([]byte, error) { + cred := a.bonafide.credentials + if cred == nil { + return nil, fmt.Errorf("Need bonafide credentials for sip auth") + } + credJson, err := formatCredentials(cred.User, cred.Password) + if err != nil { + return nil, fmt.Errorf("Cannot encode credentials: %s", err) + } + token, err := a.getToken(credJson) + if err != nil { + return nil, fmt.Errorf("Error while getting token: %s", err) + } + cert, err := a.getProtectedCert(string(token)) + if err != nil { + return nil, fmt.Errorf("Error while getting cert: %s", err) + } + return cert, nil +} + +func (a *SipAuthentication) getProtectedCert(token string) ([]byte, error) { + req, err := http.NewRequest("POST", certAPI, strings.NewReader("")) + req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) + resp, err := a.bonafide.client.Do(req) + if err != nil { + return nil, fmt.Errorf("Error while getting token: %s", err) + } + defer resp.Body.Close() + if resp.StatusCode != 200 { + return nil, fmt.Errorf("Cannot get cert: Error %d", resp.StatusCode) + } + return ioutil.ReadAll(resp.Body) +} + +func (a *SipAuthentication) getToken(credJson string) ([]byte, error) { + /* TODO + [ ] get token from disk? + [ ] check if expired? set a goroutine to refresh it periodically? + */ + resp, err := http.Post(authAPI, "text/json", strings.NewReader(credJson)) + if err != nil { + log.Fatal("Error on auth request: ", err) + } + defer resp.Body.Close() + if resp.StatusCode != 200 { + return nil, fmt.Errorf("Cannot get token: Error %d", resp.StatusCode) + } + return ioutil.ReadAll(resp.Body) +} + +func formatCredentials(user, pass string) (string, error) { + c := Credentials{User: user, Password: pass} + credJson, err := json.Marshal(c) + if err != nil { + return "", err + } + return string(credJson), nil +} diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index fd32f2a8..16a900d4 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -32,16 +32,21 @@ import ( const ( certAPI = config.APIURL + "1/cert" certAPI3 = config.APIURL + "3/cert" + authAPI = config.APIURL + "3/auth" secondsPerHour = 60 * 60 retryFetchJSONSeconds = 15 ) +// Bonafide exposes all the methods needed to communicate with the LEAP server. type Bonafide struct { client httpClient eip *eipService tzOffsetHours int + auth Authentication + credentials *Credentials } +// A Gateway is each one of the remotes we can pass to OpenVPN. It contains a description of all the fields that the eip-service advertises. type Gateway struct { Host string IPAddress string @@ -55,6 +60,13 @@ type openvpnConfig map[string]interface{} type httpClient interface { Post(url, contentType string, body io.Reader) (resp *http.Response, err error) + Do(req *http.Request) (*http.Response, error) +} + +// The Authentication interface allows to get a Certificate in Pem format. +// We implement Anonymous Authentication (Riseup et al), and Sip (Libraries). +type Authentication interface { + GetPemCertificate() ([]byte, error) } type geoLocation struct { @@ -66,6 +78,7 @@ type geoLocation struct { SortedGateways []string `json:"gateways"` } +// New Bonafide: Initializes a Bonafide object. By default, no Credentials are passed. func New() *Bonafide { certs := x509.NewCertPool() certs.AppendCertsFromPEM(config.CaCert) @@ -79,31 +92,23 @@ func New() *Bonafide { _, tzOffsetSeconds := time.Now().Zone() tzOffsetHours := tzOffsetSeconds / secondsPerHour - return &Bonafide{ + b := &Bonafide{ client: client, eip: nil, tzOffsetHours: tzOffsetHours, } + auth := AnonymousAuthentication{b} + b.auth = &auth + return b } -func (b *Bonafide) GetCertPem() ([]byte, error) { - resp, err := b.client.Post(certAPI, "", nil) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if resp.StatusCode == 404 { - resp, err = b.client.Post(certAPI3, "", nil) - if err != nil { - return nil, err - } - defer resp.Body.Close() - } - if resp.StatusCode != 200 { - return nil, fmt.Errorf("get vpn cert has failed with status: %s", resp.Status) - } +func (b *Bonafide) SetCredentials(username, password string) { + b.credentials = &Credentials{username, password} +} - return ioutil.ReadAll(resp.Body) +func (b *Bonafide) GetPemCertificate() ([]byte, error) { + cert, err := b.auth.GetPemCertificate() + return cert, err } func (b *Bonafide) GetGateways(transport string) ([]Gateway, error) { diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index c097e8a7..148b0522 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -23,6 +23,7 @@ type eipService struct { Gateways []gatewayV3 Locations map[string]location OpenvpnConfiguration openvpnConfig `json:"openvpn_configuration"` + auth string defaultGateway string } @@ -65,6 +66,22 @@ type transportV3 struct { Options map[string]string } +func (b *Bonafide) setupAuthentication(i interface{}) { + switch i.(type) { + case eipService: + switch auth := b.eip.auth; auth { + case "anon": + // Do nothing, we're set on initialization. + case "sip": + b.auth = &SipAuthentication{b} + default: + log.Printf("BUG: unknown authentication method %s", auth) + } + case eipServiceV1: + // Do nothing, no auth on v1. + } +} + func (b *Bonafide) fetchEipJSON() error { resp, err := b.client.Post(eip3API, "", nil) for err != nil { @@ -80,24 +97,25 @@ func (b *Bonafide) fetchEipJSON() error { case 404: buf := make([]byte, 128) resp.Body.Read(buf) - log.Printf("Error fetching eip v3 json: %s", buf) + log.Printf("Error fetching eip v3 json") resp, err = b.client.Post(eip1API, "", nil) if err != nil { return err } defer resp.Body.Close() if resp.StatusCode != 200 { - return fmt.Errorf("get eip json has failed with status: %s", resp.Status) + return fmt.Errorf("Get eip json has failed with status: %s", resp.Status) } b.eip, err = decodeEIP1(resp.Body) default: - return fmt.Errorf("get eip json has failed with status: %s", resp.Status) + return fmt.Errorf("Get eip json has failed with status: %s", resp.Status) } if err != nil { return err } + b.setupAuthentication(b.eip) b.sortGateways() return nil } diff --git a/pkg/vpn/bonafide/testdata/eip-service3-sip.json b/pkg/vpn/bonafide/testdata/eip-service3-sip.json new file mode 100644 index 00000000..83f80e59 --- /dev/null +++ b/pkg/vpn/bonafide/testdata/eip-service3-sip.json @@ -0,0 +1,174 @@ +{ + "gateways": [ + { + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ + { + "type": "openvpn", + "ports": [ + "443" + ], + "protocols": [ + "tcp" + ] + }, + { + "type": "obfs4", + "ports": [ + "2345" + ], + "protocols": [ + "tcp" + ], + "options": { + "cert": "obfs-cert", + "iat-mode": "0" + } + } + ], + "user_ips": false + }, + "host": "1.example.com", + "ip_address": "1.1.1.1", + "location": "a" + }, + { + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ + { + "type": "openvpn", + "ports": [ + "443" + ], + "protocols": [ + "tcp" + ] + } + ], + "user_ips": false + }, + "host": "2.example.com", + "ip_address": "2.2.2.2", + "location": "b" + }, + { + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ + { + "type": "openvpn", + "ports": [ + "443" + ], + "protocols": [ + "tcp" + ] + }, + { + "type": "obfs4", + "ports": [ + "2345" + ], + "protocols": [ + "tcp" + ], + "options": { + "cert": "obfs-cert", + "iat-mode": "0" + } + } + ], + "user_ips": false + }, + "host": "3.example.com", + "ip_address": "3.3.3.3", + "location": "b" + }, + { + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ + { + "type": "openvpn", + "ports": [ + "443" + ], + "protocols": [ + "tcp" + ] + } + ], + "user_ips": false + }, + "host": "4.example.com", + "ip_address": "4.4.4.4", + "location": "c" + }, + { + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ + { + "type": "obfs4", + "ports": [ + "2345" + ], + "protocols": [ + "tcp" + ], + "options": { + "cert": "obfs-cert", + "iat-mode": "0" + } + } + ], + "user_ips": false + }, + "host": "5.example.com", + "ip_address": "5.5.5.5", + "location": "c" + } + ], + "locations": { + "a": { + "country_code": "AA", + "hemisphere": "N", + "name": "a", + "timezone": "-5" + }, + "b": { + "country_code": "BB", + "hemisphere": "S", + "name": "b", + "timezone": "+1" + }, + "c": { + "country_code": "CC", + "hemisphere": "N", + "name": "c", + "timezone": "+8" + } + }, + "openvpn_configuration": { + "auth": "SHA1", + "cipher": "AES-128-CBC", + "keepalive": "10 30", + "tls-cipher": "DHE-RSA-AES128-SHA", + "tun-ipv6": true + }, + "auth": "sip", + "serial": 1, + "version": 3 +} From 825044cc2bed38f75457b394415b7f84b3d00516 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 27 Jan 2020 23:29:05 -0600 Subject: [PATCH 061/174] [test] sip integration test --- pkg/vpn/bonafide/auth_sip.go | 25 ++++--- pkg/vpn/bonafide/bonafide.go | 42 +++++++++-- pkg/vpn/bonafide/bonafide_integration_test.go | 2 +- .../bonafide/bonafide_sip_integration_test.go | 70 +++++++++++++++++++ pkg/vpn/bonafide/bonafide_test.go | 30 ++++++-- pkg/vpn/openvpn.go | 2 +- 6 files changed, 150 insertions(+), 21 deletions(-) create mode 100644 pkg/vpn/bonafide/bonafide_sip_integration_test.go diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index d8ebedb9..072812f9 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -19,7 +19,6 @@ import ( "encoding/json" "fmt" "io/ioutil" - "log" "net/http" "strings" ) @@ -33,11 +32,11 @@ func (a *SipAuthentication) GetPemCertificate() ([]byte, error) { if cred == nil { return nil, fmt.Errorf("Need bonafide credentials for sip auth") } - credJson, err := formatCredentials(cred.User, cred.Password) + credJSON, err := formatCredentials(cred.User, cred.Password) if err != nil { return nil, fmt.Errorf("Cannot encode credentials: %s", err) } - token, err := a.getToken(credJson) + token, err := a.getToken(credJSON) if err != nil { return nil, fmt.Errorf("Error while getting token: %s", err) } @@ -49,7 +48,11 @@ func (a *SipAuthentication) GetPemCertificate() ([]byte, error) { } func (a *SipAuthentication) getProtectedCert(token string) ([]byte, error) { - req, err := http.NewRequest("POST", certAPI, strings.NewReader("")) + certURL, err := a.bonafide.GetURL("certv3") + if err != nil { + return nil, err + } + req, err := http.NewRequest("POST", certURL, strings.NewReader("")) req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) resp, err := a.bonafide.client.Do(req) if err != nil { @@ -57,7 +60,7 @@ func (a *SipAuthentication) getProtectedCert(token string) ([]byte, error) { } defer resp.Body.Close() if resp.StatusCode != 200 { - return nil, fmt.Errorf("Cannot get cert: Error %d", resp.StatusCode) + return nil, fmt.Errorf("Error %d", resp.StatusCode) } return ioutil.ReadAll(resp.Body) } @@ -67,9 +70,13 @@ func (a *SipAuthentication) getToken(credJson string) ([]byte, error) { [ ] get token from disk? [ ] check if expired? set a goroutine to refresh it periodically? */ - resp, err := http.Post(authAPI, "text/json", strings.NewReader(credJson)) + authURL, err := a.bonafide.GetURL("auth") + if err != nil { + return nil, fmt.Errorf("Error getting auth url") + } + resp, err := http.Post(authURL, "text/json", strings.NewReader(credJson)) if err != nil { - log.Fatal("Error on auth request: ", err) + return nil, fmt.Errorf("Error on auth request: %v", err) } defer resp.Body.Close() if resp.StatusCode != 200 { @@ -80,9 +87,9 @@ func (a *SipAuthentication) getToken(credJson string) ([]byte, error) { func formatCredentials(user, pass string) (string, error) { c := Credentials{User: user, Password: pass} - credJson, err := json.Marshal(c) + credJSON, err := json.Marshal(c) if err != nil { return "", err } - return string(credJson), nil + return string(credJSON), nil } diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 16a900d4..1bc60724 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -30,23 +30,29 @@ import ( ) const ( - certAPI = config.APIURL + "1/cert" - certAPI3 = config.APIURL + "3/cert" - authAPI = config.APIURL + "3/auth" secondsPerHour = 60 * 60 retryFetchJSONSeconds = 15 ) -// Bonafide exposes all the methods needed to communicate with the LEAP server. +const ( + certPathv1 = "1/cert" + certPathv3 = "3/cert" + authPathv3 = "3/auth" + + certAPI = config.APIURL + certPathv1 + certAPI3 = config.APIURL + certPathv3 + authAPI = config.APIURL + authPathv3 +) + type Bonafide struct { client httpClient eip *eipService tzOffsetHours int auth Authentication credentials *Credentials + apiURL string } -// A Gateway is each one of the remotes we can pass to OpenVPN. It contains a description of all the fields that the eip-service advertises. type Gateway struct { Host string IPAddress string @@ -106,7 +112,33 @@ func (b *Bonafide) SetCredentials(username, password string) { b.credentials = &Credentials{username, password} } +func (b *Bonafide) GetURL(object string) (string, error) { + if b.apiURL == "" { + switch object { + case "cert": + return certAPI, nil + case "certv3": + return certAPI3, nil + case "auth": + return authAPI, nil + } + } else { + switch object { + case "cert": + return b.apiURL + certPathv1, nil + case "certv3": + return b.apiURL + certPathv3, nil + case "auth": + return b.apiURL + authPathv3, nil + } + } + return "", fmt.Errorf("ERROR: unknown object for api url") +} + func (b *Bonafide) GetPemCertificate() ([]byte, error) { + if b.auth == nil { + log.Fatal("ERROR: bonafide did not initialize auth") + } cert, err := b.auth.GetPemCertificate() return cert, err } diff --git a/pkg/vpn/bonafide/bonafide_integration_test.go b/pkg/vpn/bonafide/bonafide_integration_test.go index bea00fec..166b2a99 100644 --- a/pkg/vpn/bonafide/bonafide_integration_test.go +++ b/pkg/vpn/bonafide/bonafide_integration_test.go @@ -32,7 +32,7 @@ var ( func TestIntegrationGetCert(t *testing.T) { b := New() - cert, err := b.GetCertPem() + cert, err := b.GetPemCertificate() if err != nil { t.Fatal("getCert returned an error: ", err) } diff --git a/pkg/vpn/bonafide/bonafide_sip_integration_test.go b/pkg/vpn/bonafide/bonafide_sip_integration_test.go new file mode 100644 index 00000000..e5a516cb --- /dev/null +++ b/pkg/vpn/bonafide/bonafide_sip_integration_test.go @@ -0,0 +1,70 @@ +// +build integration +// Copyright (C) 2018 LEAP +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package bonafide + +import ( + "bytes" + "os" + "testing" +) + +type SIPCreds struct { + userOk, passOk string +} + +func getFromEnv(name, defaultVar string) string { + val, ok := os.LookupEnv(name) + if !ok { + return defaultVar + } + return val +} + +func getSIPCreds() SIPCreds { + userOk := getFromEnv("SIP_USER_OK", "test_user_ok") + passOk := getFromEnv("SIP_PASS_OK", "test_pass_ok") + creds := SIPCreds{ + userOk: userOk, + passOk: passOk, + } + return creds +} + +func TestSIPIntegrationGetCert(t *testing.T) { + creds := getSIPCreds() + + b := New() + b.auth = &SipAuthentication{b} + b.SetCredentials(creds.userOk, creds.passOk) + b.apiURL = "http://localhost:8000/" + + cert, err := b.GetPemCertificate() + if err != nil { + t.Fatal("getCert returned an error: ", err) + } + + if !bytes.Contains(cert, privateKeyHeader) { + t.Errorf("No private key present: \n%q", cert) + } + + if !bytes.Contains(cert, certHeader) { + t.Errorf("No cert present: \n%q", cert) + } + + /* TODO -- check we receive 401 for bad credentials */ + /* TODO -- check we receive 4xx for no credentials */ +} diff --git a/pkg/vpn/bonafide/bonafide_test.go b/pkg/vpn/bonafide/bonafide_test.go index 8fb7f72f..0e463e0b 100644 --- a/pkg/vpn/bonafide/bonafide_test.go +++ b/pkg/vpn/bonafide/bonafide_test.go @@ -27,9 +27,10 @@ import ( ) const ( - certPath = "testdata/cert" - eip1Path = "testdata/eip-service.json" - eipPath = "testdata/eip-service3.json" + certPath = "testdata/cert" + eip1Path = "testdata/eip-service.json" + eipPath = "testdata/eip-service3.json" + eipPathSip = "testdata/eip-service3-sip.json" ) type client struct { @@ -44,9 +45,18 @@ func (c client) Post(url, contentType string, body io.Reader) (resp *http.Respon }, err } -func TestGetCert(t *testing.T) { +func (c client) Do(req *http.Request) (*http.Response, error) { + f, err := os.Open(c.path) + return &http.Response{ + Body: f, + StatusCode: 200, + }, err +} + +func TestAnonGetCert(t *testing.T) { b := Bonafide{client: client{certPath}} - cert, err := b.GetCertPem() + b.auth = &AnonymousAuthentication{&b} + cert, err := b.GetPemCertificate() if err != nil { t.Fatal("getCert returned an error: ", err) } @@ -182,6 +192,8 @@ func TestObfs4Gateways(t *testing.T) { } } +/* TODO -- failClient instead? */ + type fallClient struct { path string } @@ -198,6 +210,14 @@ func (c fallClient) Post(url, contentType string, body io.Reader) (resp *http.Re }, err } +func (c fallClient) Do(req *http.Request) (*http.Response, error) { + f, err := os.Open(c.path) + return &http.Response{ + Body: f, + StatusCode: 401, + }, err +} + func TestEipServiceV1Fallback(t *testing.T) { b := Bonafide{ client: fallClient{eip1Path}, diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index 984aa09c..31f87383 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -150,7 +150,7 @@ func (b *Bitmask) getCert() (certPath string, err error) { certPath = b.getCertPemPath() if _, err := os.Stat(certPath); os.IsNotExist(err) { - cert, err := b.bonafide.GetCertPem() + cert, err := b.bonafide.GetPemCertificate() if err != nil { return "", err } From 66e3564db7146179606813798854e8bde27f36f9 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 31 Jan 2020 12:15:06 -0600 Subject: [PATCH 062/174] [refactor] refactor auth files --- branding/config/vendor.conf | 3 + branding/scripts/provider.py | 2 +- branding/templates/bitmaskvpn/config.go | 1 + pkg/config/config.go | 1 + pkg/vpn/bonafide/auth.go | 11 +++- pkg/vpn/bonafide/auth_anon.go | 21 ++++-- pkg/vpn/bonafide/auth_sip.go | 59 ++++++++--------- pkg/vpn/bonafide/bonafide.go | 87 +++++++++++++++++-------- pkg/vpn/bonafide/eip_service.go | 2 +- 9 files changed, 120 insertions(+), 67 deletions(-) diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 0df2503b..a1aca33c 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -10,6 +10,7 @@ applicationName = RiseupVPN binaryName = riseup-vpn providerURL = riseup.net +auth = anon apiURL = https://api.black.riseup.net/ caURL = https://black.riseup.net/ca.crt @@ -30,6 +31,7 @@ applicationName = CalyxVPN binaryName = calyx-vpn providerURL = https://calyx.net +auth = anon apiURL = https://api.calyx.net:4430/ caURL = https://calyx.net/ca.crt @@ -47,6 +49,7 @@ donateURL = http://example.org name = demo applicationName = DemoVPN binaryName = demo-vpn +auth = anon providerURL = pt.demo.bitmask.net apiURL = https://pt.demo.bitmask.net:8000/ diff --git a/branding/scripts/provider.py b/branding/scripts/provider.py index b1beab91..a88179b7 100644 --- a/branding/scripts/provider.py +++ b/branding/scripts/provider.py @@ -18,7 +18,7 @@ def getProviderData(provider, config): c = config[provider] d = dict() - keys = ('name', 'applicationName', 'binaryName', + keys = ('name', 'applicationName', 'binaryName', 'auth', 'providerURL', 'tosURL', 'helpURL', 'askForDonations', 'donateURL', 'apiURL', 'geolocationAPI', 'caCertString') diff --git a/branding/templates/bitmaskvpn/config.go b/branding/templates/bitmaskvpn/config.go index a4dc28cb..e3d70cf4 100644 --- a/branding/templates/bitmaskvpn/config.go +++ b/branding/templates/bitmaskvpn/config.go @@ -10,6 +10,7 @@ const ( Provider = "$providerURL" ApplicationName = "$applicationName" BinaryName = "$binaryName" + Auth = "$auth" DonateURL = "$donateURL" AskForDonations = "$askForDonations" HelpURL = "$helpURL" diff --git a/pkg/config/config.go b/pkg/config/config.go index ad159a12..80f5df48 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -10,6 +10,7 @@ const ( Provider = "riseup.net" ApplicationName = "RiseupVPN" BinaryName = "riseup-vpn" + Auth = "anon" DonateURL = "https://riseup.net/vpn/donate" AskForDonations = "true" HelpURL = "https://riseup.net/support" diff --git a/pkg/vpn/bonafide/auth.go b/pkg/vpn/bonafide/auth.go index b6b3eecd..62d3d8f9 100644 --- a/pkg/vpn/bonafide/auth.go +++ b/pkg/vpn/bonafide/auth.go @@ -15,7 +15,16 @@ package bonafide -type Credentials struct { +type credentials struct { User string Password string } + +// The authentication interface allows to get a Certificate in Pem format. +// We implement Anonymous Authentication (Riseup et al), and Sip (Libraries). + +type authentication interface { + needsCredentials() bool + getToken(cred *credentials) ([]byte, error) + getPemCertificate(cred *credentials) ([]byte, error) +} diff --git a/pkg/vpn/bonafide/auth_anon.go b/pkg/vpn/bonafide/auth_anon.go index 61916e69..3a666a8f 100644 --- a/pkg/vpn/bonafide/auth_anon.go +++ b/pkg/vpn/bonafide/auth_anon.go @@ -16,22 +16,29 @@ package bonafide import ( + "errors" "fmt" "io/ioutil" ) -type AnonymousAuthentication struct { - bonafide *Bonafide +type anonymousAuthentication struct { + client httpClient + authURI string + certURI string } -func (a *AnonymousAuthentication) GetPemCertificate() ([]byte, error) { - resp, err := a.bonafide.client.Post(certAPI, "", nil) +func (a *anonymousAuthentication) needsCredentials() bool { + return true +} + +func (a *anonymousAuthentication) getPemCertificate(cred *credentials) ([]byte, error) { + resp, err := a.client.Post(certAPI, "", nil) if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode == 404 { - resp, err = a.bonafide.client.Post(certAPI3, "", nil) + resp, err = a.client.Post(certAPI3, "", nil) if err != nil { return nil, err } @@ -43,3 +50,7 @@ func (a *AnonymousAuthentication) GetPemCertificate() ([]byte, error) { return ioutil.ReadAll(resp.Body) } + +func (a *anonymousAuthentication) getToken(cred *credentials) ([]byte, error) { + return []byte(""), errors.New("anon authentication should not call getToken") +} diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index 072812f9..b7ab0c88 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -23,70 +23,67 @@ import ( "strings" ) -type SipAuthentication struct { - bonafide *Bonafide +type sipAuthentication struct { + client httpClient + authURI string + certURI string } -func (a *SipAuthentication) GetPemCertificate() ([]byte, error) { - cred := a.bonafide.credentials +func (a *sipAuthentication) needsCredentials() bool { + return true +} + +func (a *sipAuthentication) getPemCertificate(cred *credentials) ([]byte, error) { if cred == nil { return nil, fmt.Errorf("Need bonafide credentials for sip auth") } - credJSON, err := formatCredentials(cred.User, cred.Password) - if err != nil { - return nil, fmt.Errorf("Cannot encode credentials: %s", err) - } - token, err := a.getToken(credJSON) + token, err := a.getToken(cred) if err != nil { return nil, fmt.Errorf("Error while getting token: %s", err) } - cert, err := a.getProtectedCert(string(token)) + cert, err := a.getProtectedCert(a.certURI, string(token)) if err != nil { return nil, fmt.Errorf("Error while getting cert: %s", err) } return cert, nil } -func (a *SipAuthentication) getProtectedCert(token string) ([]byte, error) { - certURL, err := a.bonafide.GetURL("certv3") +func (a *sipAuthentication) getToken(cred *credentials) ([]byte, error) { + /* TODO + [ ] get token from disk? + [ ] check if expired? set a goroutine to refresh it periodically? + */ + credJSON, err := formatCredentials(cred.User, cred.Password) if err != nil { - return nil, err + return nil, fmt.Errorf("Cannot encode credentials: %s", err) } - req, err := http.NewRequest("POST", certURL, strings.NewReader("")) - req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) - resp, err := a.bonafide.client.Do(req) + resp, err := http.Post(a.authURI, "text/json", strings.NewReader(credJSON)) if err != nil { - return nil, fmt.Errorf("Error while getting token: %s", err) + return nil, fmt.Errorf("Error on auth request: %v", err) } defer resp.Body.Close() if resp.StatusCode != 200 { - return nil, fmt.Errorf("Error %d", resp.StatusCode) + return nil, fmt.Errorf("Cannot get token: Error %d", resp.StatusCode) } return ioutil.ReadAll(resp.Body) } -func (a *SipAuthentication) getToken(credJson string) ([]byte, error) { - /* TODO - [ ] get token from disk? - [ ] check if expired? set a goroutine to refresh it periodically? - */ - authURL, err := a.bonafide.GetURL("auth") - if err != nil { - return nil, fmt.Errorf("Error getting auth url") - } - resp, err := http.Post(authURL, "text/json", strings.NewReader(credJson)) +func (a *sipAuthentication) getProtectedCert(uri, token string) ([]byte, error) { + req, err := http.NewRequest("POST", uri, strings.NewReader("")) + req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) + resp, err := a.client.Do(req) if err != nil { - return nil, fmt.Errorf("Error on auth request: %v", err) + return nil, fmt.Errorf("Error while getting token: %s", err) } defer resp.Body.Close() if resp.StatusCode != 200 { - return nil, fmt.Errorf("Cannot get token: Error %d", resp.StatusCode) + return nil, fmt.Errorf("Error %d", resp.StatusCode) } return ioutil.ReadAll(resp.Body) } func formatCredentials(user, pass string) (string, error) { - c := Credentials{User: user, Password: pass} + c := credentials{User: user, Password: pass} credJSON, err := json.Marshal(c) if err != nil { return "", err diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 1bc60724..1b48276e 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -19,6 +19,7 @@ import ( "crypto/tls" "crypto/x509" "encoding/json" + "errors" "fmt" "io" "io/ioutil" @@ -48,8 +49,8 @@ type Bonafide struct { client httpClient eip *eipService tzOffsetHours int - auth Authentication - credentials *Credentials + auth authentication + credentials credentials apiURL string } @@ -69,12 +70,6 @@ type httpClient interface { Do(req *http.Request) (*http.Response, error) } -// The Authentication interface allows to get a Certificate in Pem format. -// We implement Anonymous Authentication (Riseup et al), and Sip (Libraries). -type Authentication interface { - GetPemCertificate() ([]byte, error) -} - type geoLocation struct { IPAddress string `json:"ip"` Country string `json:"cc"` @@ -103,44 +98,80 @@ func New() *Bonafide { eip: nil, tzOffsetHours: tzOffsetHours, } - auth := AnonymousAuthentication{b} - b.auth = &auth + switch auth := config.Auth; auth { + case "sip": + log.Println("Client expects sip auth") + b.auth = &sipAuthentication{client, b.getURL("auth"), b.getURL("certv3")} + case "anon": + log.Println("Client expects anon auth") + b.auth = &anonymousAuthentication{client, "", b.getURL("certv3")} + default: + log.Println("Client expects invalid auth", auth) + b.auth = &anonymousAuthentication{client, "", b.getURL("certv3")} + } + return b } -func (b *Bonafide) SetCredentials(username, password string) { - b.credentials = &Credentials{username, password} +func (b *Bonafide) DoLogin(username, password string) (bool, error) { + if !b.auth.needsCredentials() { + return false, errors.New("Auth method does not need login") + } + + cred := credentials{username, password} + b.credentials = cred + + /* TODO keep this in memory */ + _, err := b.auth.getToken(&cred) + if err != nil { + return false, err + } + + return true, nil } -func (b *Bonafide) GetURL(object string) (string, error) { +func (b *Bonafide) checkCredentialsAreSet() bool { + if b.credentials.User == "" || b.credentials.Password == "" { + log.Println("BUG: expected credentials to be set") + return false + } + return true +} + +func (b *Bonafide) GetPemCertificate() ([]byte, error) { + if b.auth == nil { + log.Fatal("ERROR: bonafide did not initialize auth") + } + if b.auth.needsCredentials() { + b.checkCredentialsAreSet() + } + + cert, err := b.auth.getPemCertificate(&b.credentials) + return cert, err +} + +func (b *Bonafide) getURL(object string) string { if b.apiURL == "" { switch object { case "cert": - return certAPI, nil + return certAPI case "certv3": - return certAPI3, nil + return certAPI3 case "auth": - return authAPI, nil + return authAPI } } else { switch object { case "cert": - return b.apiURL + certPathv1, nil + return b.apiURL + certPathv1 case "certv3": - return b.apiURL + certPathv3, nil + return b.apiURL + certPathv3 case "auth": - return b.apiURL + authPathv3, nil + return b.apiURL + authPathv3 } } - return "", fmt.Errorf("ERROR: unknown object for api url") -} - -func (b *Bonafide) GetPemCertificate() ([]byte, error) { - if b.auth == nil { - log.Fatal("ERROR: bonafide did not initialize auth") - } - cert, err := b.auth.GetPemCertificate() - return cert, err + log.Println("BUG: unknown url object") + return "" } func (b *Bonafide) GetGateways(transport string) ([]Gateway, error) { diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index 148b0522..618eda4d 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -73,7 +73,7 @@ func (b *Bonafide) setupAuthentication(i interface{}) { case "anon": // Do nothing, we're set on initialization. case "sip": - b.auth = &SipAuthentication{b} + b.auth = &sipAuthentication{b.client, b.getURL("auth"), b.getURL("certv3")} default: log.Printf("BUG: unknown authentication method %s", auth) } From 9f879929ccc7c1c21bac2d44cad3007320fe3aed Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 11 Feb 2020 13:43:01 +0100 Subject: [PATCH 063/174] [feat] expose auth API in pkg/vpn Be able to check if it needs auth and then be able to login. Use the logged in token for fetching the cert. --- pkg/bitmask/bitmask.go | 2 ++ pkg/vpn/bonafide/auth.go | 3 +- pkg/vpn/bonafide/auth_anon.go | 28 ++-------------- pkg/vpn/bonafide/auth_sip.go | 34 ++----------------- pkg/vpn/bonafide/bonafide.go | 59 +++++++++++++++++++++------------ pkg/vpn/bonafide/eip_service.go | 2 +- pkg/vpn/main.go | 8 +++++ 7 files changed, 54 insertions(+), 82 deletions(-) diff --git a/pkg/bitmask/bitmask.go b/pkg/bitmask/bitmask.go index df26fc0e..927e4868 100644 --- a/pkg/bitmask/bitmask.go +++ b/pkg/bitmask/bitmask.go @@ -28,4 +28,6 @@ type Bitmask interface { ListGateways(provider string) ([]string, error) UseGateway(name string) error UseTransport(transport string) error + NeedsCredentials() bool + DoLogin(username, password string) (bool, error) } diff --git a/pkg/vpn/bonafide/auth.go b/pkg/vpn/bonafide/auth.go index 62d3d8f9..5a97b3f5 100644 --- a/pkg/vpn/bonafide/auth.go +++ b/pkg/vpn/bonafide/auth.go @@ -25,6 +25,5 @@ type credentials struct { type authentication interface { needsCredentials() bool - getToken(cred *credentials) ([]byte, error) - getPemCertificate(cred *credentials) ([]byte, error) + getToken(user, password string) ([]byte, error) } diff --git a/pkg/vpn/bonafide/auth_anon.go b/pkg/vpn/bonafide/auth_anon.go index 3a666a8f..8a55e3a7 100644 --- a/pkg/vpn/bonafide/auth_anon.go +++ b/pkg/vpn/bonafide/auth_anon.go @@ -17,40 +17,16 @@ package bonafide import ( "errors" - "fmt" - "io/ioutil" ) type anonymousAuthentication struct { - client httpClient - authURI string - certURI string + client httpClient } func (a *anonymousAuthentication) needsCredentials() bool { return true } -func (a *anonymousAuthentication) getPemCertificate(cred *credentials) ([]byte, error) { - resp, err := a.client.Post(certAPI, "", nil) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if resp.StatusCode == 404 { - resp, err = a.client.Post(certAPI3, "", nil) - if err != nil { - return nil, err - } - defer resp.Body.Close() - } - if resp.StatusCode != 200 { - return nil, fmt.Errorf("Get vpn cert has failed with status: %s", resp.Status) - } - - return ioutil.ReadAll(resp.Body) -} - -func (a *anonymousAuthentication) getToken(cred *credentials) ([]byte, error) { +func (a *anonymousAuthentication) getToken(user, password string) ([]byte, error) { return []byte(""), errors.New("anon authentication should not call getToken") } diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index b7ab0c88..1bfef522 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -26,34 +26,18 @@ import ( type sipAuthentication struct { client httpClient authURI string - certURI string } func (a *sipAuthentication) needsCredentials() bool { return true } -func (a *sipAuthentication) getPemCertificate(cred *credentials) ([]byte, error) { - if cred == nil { - return nil, fmt.Errorf("Need bonafide credentials for sip auth") - } - token, err := a.getToken(cred) - if err != nil { - return nil, fmt.Errorf("Error while getting token: %s", err) - } - cert, err := a.getProtectedCert(a.certURI, string(token)) - if err != nil { - return nil, fmt.Errorf("Error while getting cert: %s", err) - } - return cert, nil -} - -func (a *sipAuthentication) getToken(cred *credentials) ([]byte, error) { +func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { /* TODO [ ] get token from disk? [ ] check if expired? set a goroutine to refresh it periodically? */ - credJSON, err := formatCredentials(cred.User, cred.Password) + credJSON, err := formatCredentials(user, password) if err != nil { return nil, fmt.Errorf("Cannot encode credentials: %s", err) } @@ -68,20 +52,6 @@ func (a *sipAuthentication) getToken(cred *credentials) ([]byte, error) { return ioutil.ReadAll(resp.Body) } -func (a *sipAuthentication) getProtectedCert(uri, token string) ([]byte, error) { - req, err := http.NewRequest("POST", uri, strings.NewReader("")) - req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token)) - resp, err := a.client.Do(req) - if err != nil { - return nil, fmt.Errorf("Error while getting token: %s", err) - } - defer resp.Body.Close() - if resp.StatusCode != 200 { - return nil, fmt.Errorf("Error %d", resp.StatusCode) - } - return ioutil.ReadAll(resp.Body) -} - func formatCredentials(user, pass string) (string, error) { c := credentials{User: user, Password: pass} credJSON, err := json.Marshal(c) diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 1b48276e..4561eb1e 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -25,6 +25,7 @@ import ( "io/ioutil" "log" "net/http" + "strings" "time" "0xacab.org/leap/bitmask-vpn/pkg/config" @@ -50,7 +51,7 @@ type Bonafide struct { eip *eipService tzOffsetHours int auth authentication - credentials credentials + token []byte apiURL string } @@ -101,28 +102,29 @@ func New() *Bonafide { switch auth := config.Auth; auth { case "sip": log.Println("Client expects sip auth") - b.auth = &sipAuthentication{client, b.getURL("auth"), b.getURL("certv3")} + b.auth = &sipAuthentication{client, b.getURL("auth")} case "anon": log.Println("Client expects anon auth") - b.auth = &anonymousAuthentication{client, "", b.getURL("certv3")} + b.auth = &anonymousAuthentication{client} default: log.Println("Client expects invalid auth", auth) - b.auth = &anonymousAuthentication{client, "", b.getURL("certv3")} + b.auth = &anonymousAuthentication{client} } return b } +func (b *Bonafide) NeedsCredentials() bool { + return b.auth.needsCredentials() +} + func (b *Bonafide) DoLogin(username, password string) (bool, error) { if !b.auth.needsCredentials() { return false, errors.New("Auth method does not need login") } - cred := credentials{username, password} - b.credentials = cred - - /* TODO keep this in memory */ - _, err := b.auth.getToken(&cred) + var err error + b.token, err = b.auth.getToken(username, password) if err != nil { return false, err } @@ -130,24 +132,39 @@ func (b *Bonafide) DoLogin(username, password string) (bool, error) { return true, nil } -func (b *Bonafide) checkCredentialsAreSet() bool { - if b.credentials.User == "" || b.credentials.Password == "" { - log.Println("BUG: expected credentials to be set") - return false - } - return true -} - func (b *Bonafide) GetPemCertificate() ([]byte, error) { if b.auth == nil { log.Fatal("ERROR: bonafide did not initialize auth") } - if b.auth.needsCredentials() { - b.checkCredentialsAreSet() + if b.auth.needsCredentials() && b.token == nil { + log.Println("BUG: expected token to be set, but is not there") + return nil, errors.New("Needs to login, but it was not logged in. Please, restart the application and report it if it continues happening") + } + + req, err := http.NewRequest("POST", b.getURL("certv3"), strings.NewReader("")) + if err != nil { + return nil, err + } + if b.token != nil { + req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", b.token)) + } + resp, err := b.client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + if resp.StatusCode == 404 { + resp, err = b.client.Post(b.getURL("cert"), "", nil) + if err != nil { + return nil, err + } + defer resp.Body.Close() + } + if resp.StatusCode != 200 { + return nil, fmt.Errorf("Get vpn cert has failed with status: %s", resp.Status) } - cert, err := b.auth.getPemCertificate(&b.credentials) - return cert, err + return ioutil.ReadAll(resp.Body) } func (b *Bonafide) getURL(object string) string { diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index 618eda4d..ff73da9f 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -73,7 +73,7 @@ func (b *Bonafide) setupAuthentication(i interface{}) { case "anon": // Do nothing, we're set on initialization. case "sip": - b.auth = &sipAuthentication{b.client, b.getURL("auth"), b.getURL("certv3")} + b.auth = &sipAuthentication{b.client, b.getURL("auth")} default: log.Printf("BUG: unknown authentication method %s", auth) } diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go index 4bf43950..de8e61f2 100644 --- a/pkg/vpn/main.go +++ b/pkg/vpn/main.go @@ -92,3 +92,11 @@ func (b *Bitmask) Close() { func (b *Bitmask) Version() (string, error) { return "", nil } + +func (b *Bitmask) NeedsCredentials() bool { + return b.bonafide.NeedsCredentials() +} + +func (b *Bitmask) DoLogin(username, password string) (bool, error) { + return b.bonafide.DoLogin(username, password) +} From 577b73b218f9b628069b8373ff3ab89f836a684c Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 26 Feb 2020 19:17:16 +0100 Subject: [PATCH 064/174] [bug] use the right http client to fetch the auth --- pkg/vpn/bonafide/auth_anon.go | 4 +--- pkg/vpn/bonafide/auth_sip.go | 3 +-- pkg/vpn/bonafide/bonafide.go | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/vpn/bonafide/auth_anon.go b/pkg/vpn/bonafide/auth_anon.go index 8a55e3a7..c6c5775a 100644 --- a/pkg/vpn/bonafide/auth_anon.go +++ b/pkg/vpn/bonafide/auth_anon.go @@ -19,9 +19,7 @@ import ( "errors" ) -type anonymousAuthentication struct { - client httpClient -} +type anonymousAuthentication struct{} func (a *anonymousAuthentication) needsCredentials() bool { return true diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index 1bfef522..1f200bbf 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -19,7 +19,6 @@ import ( "encoding/json" "fmt" "io/ioutil" - "net/http" "strings" ) @@ -41,7 +40,7 @@ func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { if err != nil { return nil, fmt.Errorf("Cannot encode credentials: %s", err) } - resp, err := http.Post(a.authURI, "text/json", strings.NewReader(credJSON)) + resp, err := a.client.Post(a.authURI, "text/json", strings.NewReader(credJSON)) if err != nil { return nil, fmt.Errorf("Error on auth request: %v", err) } diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 4561eb1e..87801cca 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -105,10 +105,10 @@ func New() *Bonafide { b.auth = &sipAuthentication{client, b.getURL("auth")} case "anon": log.Println("Client expects anon auth") - b.auth = &anonymousAuthentication{client} + b.auth = &anonymousAuthentication{} default: log.Println("Client expects invalid auth", auth) - b.auth = &anonymousAuthentication{client} + b.auth = &anonymousAuthentication{} } return b From d66ddd5db06be34efb7c35029ed8c3fb02fb347f Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 6 Aug 2020 13:01:22 +0200 Subject: [PATCH 065/174] [pkg] add float-deployed demo libpvn for tests --- branding/assets/demolib | 1 + branding/config/demolib-ca.crt | 10 ++++++ branding/config/vendor.conf | 22 ++++++++++++- gui/backend.go | 5 +++ gui/handlers.cpp | 12 +++++++ gui/handlers.h | 1 + gui/qml/LoginDialog.qml | 5 ++- gui/qml/main.qml | 4 +++ pkg/backend/api.go | 18 +++++++++++ pkg/backend/status.go | 1 + pkg/config/config.go | 59 +++++++++++----------------------- 11 files changed, 93 insertions(+), 45 deletions(-) create mode 120000 branding/assets/demolib create mode 100644 branding/config/demolib-ca.crt diff --git a/branding/assets/demolib b/branding/assets/demolib new file mode 120000 index 00000000..efd261bf --- /dev/null +++ b/branding/assets/demolib @@ -0,0 +1 @@ +demo \ No newline at end of file diff --git a/branding/config/demolib-ca.crt b/branding/config/demolib-ca.crt new file mode 100644 index 00000000..ae726f4f --- /dev/null +++ b/branding/config/demolib-ca.crt @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- +MIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v +dCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT +DExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK +kTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3 +1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB +MAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7 +6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p +-----END CERTIFICATE----- + diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index a1aca33c..ac0f4b12 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -1,6 +1,6 @@ [default] -provider = riseup +provider = demolib [riseup] @@ -63,3 +63,23 @@ geolocationAPI = askForDonations = false donateURL = + +[demolib] + +name = demolib +applicationName = DemoLib +binaryName = demo-lib +auth = sip + +providerURL = vpnlib.bitmask.net +apiURL = https://api.vpnlib.bitmask.net/ +caURL = https://api.vpnlib.bitmask.net/ca.crt + +infoURL = https://libraryvpn.org/ +tosURL = https://libraryvpn.org/ +helpURL = https://libraryvpn.org/ + +geolocationAPI = https://getmyip.vpnlib.bitmask.net/ + +askForDonations = false +donateURL = diff --git a/gui/backend.go b/gui/backend.go index 536ade34..a5cb3abe 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -22,6 +22,11 @@ func GetAppName() *C.char { return (*C.char)(backend.GetAppName()) } +//export Login +func Login(username, password *C.char) { + backend.Login(C.GoString(username), C.GoString(password)) +} + //export SwitchOn func SwitchOn() { backend.SwitchOn() diff --git a/gui/handlers.cpp b/gui/handlers.cpp index ab64afb4..3959964b 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -35,6 +35,18 @@ void Backend::donateAccepted() DonateAccepted(); } +void Backend::login(QString username, QString password) +{ + // TODO: there has to be a cleaner way to do the conversion + char * u = new char [username.length()+1]; + char * p = new char [password.length()+1]; + strcpy(u, username.toStdString().c_str()); + strcpy(p, password.toStdString().c_str()); + Login(u, p); + delete [] u; + delete [] p; +} + void Backend::quit() { Quit(); diff --git a/gui/handlers.h b/gui/handlers.h index 62a733d1..656a4516 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -35,6 +35,7 @@ public slots: void switchOn(); void switchOff(); void donateAccepted(); + void login(QString username, QString password); void quit(); }; diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml index 0c0f18ea..1724769d 100644 --- a/gui/qml/LoginDialog.qml +++ b/gui/qml/LoginDialog.qml @@ -22,7 +22,6 @@ Dialog { } visible: false - //visible: ctx.showLogin == true - //onAccepted: backend.login(username.text, password.text) - onRejected: backend.quit() // TODO: it doesn't close + onAccepted: backend.login(username.text, password.text) + onRejected: backend.quit() } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 09bbab5c..02424934 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -19,6 +19,10 @@ ApplicationWindow { console.debug(jsonModel.getJson()) donate.visible = true } + if (ctx.loginDialog == 'true') { + console.debug(jsonModel.getJson()) + login.visible = true + } if (ctx.errors ) { if ( ctx.errors == "nohelpers" ) { showInitFailure(qsTr("Could not find helpers. Check your installation")) diff --git a/pkg/backend/api.go b/pkg/backend/api.go index ff8c1bbe..7b48906e 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -13,6 +13,21 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/pickle" ) +func Login(username, password string) { + success, err := ctx.bm.DoLogin(username, password) + if err != nil { + // TODO + log.Printf("Error login: %v", err) + } else if success { + // TODO: Notify success + log.Printf("Logged in as %s", username) + } else { + // TODO: display login again with an err + log.Printf("Failed to login as %s", username) + ctx.LoginDialog = true + } +} + func SwitchOn() { go setStatus(starting) go startVPN() @@ -57,6 +72,9 @@ func InitializeBitmaskContext(opts *InitOpts) { initOnce.Do(func() { initializeContext(opts) }) runDonationReminder() if ctx.bm != nil { + if ctx.bm.NeedsCredentials() { + ctx.LoginDialog = true + } go ctx.updateStatus() } } diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 2bfb52da..5e9a0f80 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -37,6 +37,7 @@ type connectionCtx struct { AskForDonations bool `json:"askForDonations"` DonateDialog bool `json:"donateDialog"` DonateURL string `json:"donateURL"` + LoginDialog bool `json:"loginDialog"` Version string `json:"version"` Errors string `json:"errors"` Status status `json:"status"` diff --git a/pkg/config/config.go b/pkg/config/config.go index 80f5df48..e9866d26 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-06-16 21:44:41 +// At 2020-08-13 22:38:42 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/" + GeolocationAPI = "https://getmyip.vpnlib.bitmask.net/" ) 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 -iw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK -5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx -HUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20Ppt6ei0zazkUPwxld3hgyw58 -m/4UIjG3PInWTNf293GngK2Bnz8Qx9e/6TueMSAn/3JBLem56E0WtmbLVjvko+LF -PM5xA+m0BmuSJtrD1MUCXMhqYTtiOvgLBlUm5zkNxALzG+cXB28k6XikXt6MRG7q -hzIPG38zwkooM55yy5i1YfcIi5NjMH6A+t4IJxxwb67MSb6UFOwg5kFokdONZcwj -shczHdG9gLKSBIvrKa03Nd3W2dF9hMbRu//STcQxOailDBQCnXXfAATj9pYzdY4k -ha8VCAREGAKTDAex9oXf1yRuktES4QIDAQABo2AwXjAdBgNVHQ4EFgQUC4tdmLVu -f9hwfK4AGliaet5KkcgwDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwQFMAMBAf8wHwYD -VR0jBBgwFoAUC4tdmLVuf9hwfK4AGliaet5KkcgwDQYJKoZIhvcNAQENBQADggIB -AGzL+GRnYu99zFoy0bXJKOGCF5XUXP/3gIXPRDqQf5g7Cu/jYMID9dB3No4Zmf7v -qHjiSXiS8jx1j/6/Luk6PpFbT7QYm4QLs1f4BlfZOti2KE8r7KRDPIecUsUXW6P/ -3GJAVYH/+7OjA39za9AieM7+H5BELGccGrM5wfl7JeEz8in+V2ZWDzHQO4hMkiTQ -4ZckuaL201F68YpiItBNnJ9N5nHr1MRiGyApHmLXY/wvlrOpclh95qn+lG6/2jk7 -3AmihLOKYMlPwPakJg4PYczm3icFLgTpjV5sq2md9bRyAg3oPGfAuWHmKj2Ikqch -Td5CHKGxEEWbGUWEMP0s1A/JHWiCbDigc4Cfxhy56CWG4q0tYtnc2GMw8OAUO6Wf -Xu5pYKNkzKSEtT/MrNJt44tTZWbKV/Pi/N2Fx36my7TgTUj7g3xcE9eF4JV2H/sg -tsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF -tGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ -UN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp -0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO +MIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v +dCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT +DExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK +kTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3 +1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB +MAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7 +6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p -----END CERTIFICATE-----`) From 4e7519998486cd9639e3298525a5b281714c0c0a Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 17 Aug 2020 19:42:15 +0200 Subject: [PATCH 066/174] [feat] login feedback - Resolves: #334 --- branding/config/vendor.conf | 2 +- gui/gui.qrc | 1 + gui/qml/LoginConfirmation.qml | 11 ----------- gui/qml/LoginOKDialog.qml | 23 +++++++++++++++++++++++ gui/qml/main.qml | 11 +++++++++++ pkg/backend/api.go | 9 ++++++--- pkg/backend/status.go | 1 + pkg/bitmask/bitmask.go | 1 + pkg/bitmask/init.go | 9 ++++++--- pkg/config/config.go | 4 ++-- pkg/vpn/bonafide/bonafide.go | 2 +- pkg/vpn/openvpn.go | 16 ++++++++++++++++ 12 files changed, 69 insertions(+), 21 deletions(-) delete mode 100644 gui/qml/LoginConfirmation.qml create mode 100644 gui/qml/LoginOKDialog.qml diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index ac0f4b12..90ef36cf 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -72,7 +72,7 @@ binaryName = demo-lib auth = sip providerURL = vpnlib.bitmask.net -apiURL = https://api.vpnlib.bitmask.net/ +apiURL = https://api.vpnlib.bitmask.net:4430/ caURL = https://api.vpnlib.bitmask.net/ca.crt infoURL = https://libraryvpn.org/ diff --git a/gui/gui.qrc b/gui/gui.qrc index 28fcf7f4..6bc3d8de 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -4,6 +4,7 @@ qml/AboutDialog.qml qml/DonateDialog.qml qml/LoginDialog.qml + qml/LoginOKDialog.qml assets/icon/png/black/vpn_off.png assets/icon/png/black/vpn_on.png diff --git a/gui/qml/LoginConfirmation.qml b/gui/qml/LoginConfirmation.qml deleted file mode 100644 index 618b8705..00000000 --- a/gui/qml/LoginConfirmation.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Dialogs 1.2 -import QtQuick.Controls 1.4 - -Dialog { - standardButtons: StandardButton.Ok - title: qsTr("Login Success") - text: qsTr("You are now logged in, connecting now") - - visible: ctxSystray.loginConfirmationDialog == true -} diff --git a/gui/qml/LoginOKDialog.qml b/gui/qml/LoginOKDialog.qml new file mode 100644 index 00000000..52b37701 --- /dev/null +++ b/gui/qml/LoginOKDialog.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 +import QtQuick.Controls 1.4 + +Dialog { + standardButtons: StandardButton.Ok + title: qsTr("Login Successful") + Column { + anchors.fill: parent + Text { + text: qsTr("Login successful. You can now start the VPN.") + } + } + + // TODO implement cleanNotifications on backend + function _loginOk() { + loginDone = true; + } + + visible: false + onAccepted: _loginOk() + onRejected: _loginOk() +} diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 02424934..f22bdf36 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -10,6 +10,7 @@ ApplicationWindow { visible: false property var ctx + property var loginDone Connections { target: jsonModel @@ -23,6 +24,9 @@ ApplicationWindow { console.debug(jsonModel.getJson()) login.visible = true } + if (ctx.loginOk == 'true' && loginDone == false) { + loginOk.visible = true + } if (ctx.errors ) { if ( ctx.errors == "nohelpers" ) { showInitFailure(qsTr("Could not find helpers. Check your installation")) @@ -44,6 +48,8 @@ ApplicationWindow { } Component.onCompleted: { + loginDone = false; + /* stupid as it sounds, windows doesn't like to have the systray icon not being attached to an actual application window. We can still use this quirk, and can use the AppWindow with deferred @@ -228,6 +234,11 @@ ApplicationWindow { visible: false } + LoginOKDialog{ + id: loginOk + visible: false + } + MessageDialog { id: errorStartingVPN buttons: MessageDialog.Ok diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 7b48906e..6609b1b7 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -16,16 +16,19 @@ import ( func Login(username, password string) { success, err := ctx.bm.DoLogin(username, password) if err != nil { - // TODO - log.Printf("Error login: %v", err) + log.Printf("Error on login: %v", err) + ctx.Errors = "bad_auth_unknown" } else if success { - // TODO: Notify success log.Printf("Logged in as %s", username) + ctx.LoginOk = true + ctx.LoginDialog = false } else { // TODO: display login again with an err log.Printf("Failed to login as %s", username) ctx.LoginDialog = true + ctx.Errors = "bad_auth" } + go ctx.updateStatus() } func SwitchOn() { diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 5e9a0f80..f06d26df 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -38,6 +38,7 @@ type connectionCtx struct { DonateDialog bool `json:"donateDialog"` DonateURL string `json:"donateURL"` LoginDialog bool `json:"loginDialog"` + LoginOk bool `json:"loginOk"` Version string `json:"version"` Errors string `json:"errors"` Status status `json:"status"` diff --git a/pkg/bitmask/bitmask.go b/pkg/bitmask/bitmask.go index 927e4868..adfc8491 100644 --- a/pkg/bitmask/bitmask.go +++ b/pkg/bitmask/bitmask.go @@ -20,6 +20,7 @@ type Bitmask interface { Close() Version() (string, error) StartVPN(provider string) error + CanStartVPN() bool StopVPN() error ReloadFirewall() error GetStatus() (string, error) diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index a96ab870..b86deb82 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -131,7 +131,10 @@ func maybeStartVPN(b Bitmask, conf *config.Config) error { return nil } - err := b.StartVPN(config.Provider) - conf.SetUserStoppedVPN(false) - return err + if b.CanStartVPN() { + err := b.StartVPN(config.Provider) + conf.SetUserStoppedVPN(false) + return err + } + return nil } diff --git a/pkg/config/config.go b/pkg/config/config.go index e9866d26..f3f9e6e0 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,6 +1,6 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by vendorize.py -// At 2020-08-13 22:38:42 +// At 2020-08-15 20:39:01 package config @@ -15,7 +15,7 @@ const ( AskForDonations = "false" HelpURL = "https://libraryvpn.org/" TosURL = "https://libraryvpn.org/" - APIURL = "https://api.vpnlib.bitmask.net/" + APIURL = "https://api.vpnlib.bitmask.net:4430/" GeolocationAPI = "https://getmyip.vpnlib.bitmask.net/" ) diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 87801cca..dd8c597c 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -137,7 +137,7 @@ func (b *Bonafide) GetPemCertificate() ([]byte, error) { log.Fatal("ERROR: bonafide did not initialize auth") } if b.auth.needsCredentials() && b.token == nil { - log.Println("BUG: expected token to be set, but is not there") + log.Println("Needs token, but token is empty") return nil, errors.New("Needs to login, but it was not logged in. Please, restart the application and report it if it continues happening") } diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index 31f87383..11bba69a 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -16,6 +16,7 @@ package vpn import ( + "errors" "fmt" "io/ioutil" "log" @@ -43,9 +44,23 @@ func (b *Bitmask) StartVPN(provider string) error { } } + if !b.CanStartVPN() { + return errors.New("BUG: cannot start vpn") + } return b.startOpenVPN(proxy) } +func (b *Bitmask) CanStartVPN() bool { + if !b.bonafide.NeedsCredentials() { + return true + } + _, err := b.getCert() + if err != nil { + return false + } + return true +} + func (b *Bitmask) startTransport() (proxy string, err error) { proxy = "127.0.0.1:4430" if b.shapes != nil { @@ -150,6 +165,7 @@ func (b *Bitmask) getCert() (certPath string, err error) { certPath = b.getCertPemPath() if _, err := os.Stat(certPath); os.IsNotExist(err) { + log.Println("Cert does not exist in ", certPath, "...fetching") cert, err := b.bonafide.GetPemCertificate() if err != nil { return "", err From c8cbeb15056a6918e4113555e8dd691c16e0a108 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 18 Aug 2020 18:05:45 +0200 Subject: [PATCH 067/174] [feat] cache authentication token --- pkg/config/unix.go | 3 +- pkg/vpn/bonafide/auth_sip.go | 59 +++++++++++++++++++++++++++++++++--- pkg/vpn/bonafide/bonafide.go | 22 +++++++++++--- pkg/vpn/openvpn.go | 9 +----- 4 files changed, 75 insertions(+), 18 deletions(-) diff --git a/pkg/config/unix.go b/pkg/config/unix.go index 7425f5ba..f96f6a65 100644 --- a/pkg/config/unix.go +++ b/pkg/config/unix.go @@ -18,7 +18,8 @@ package config import ( "os" + "path" ) // Path for the config files -var Path = os.Getenv("HOME") + "/.config/leap" +var Path = path.Join(os.Getenv("HOME"), ".config", "leap") diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index 1f200bbf..e00252f3 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -19,7 +19,13 @@ import ( "encoding/json" "fmt" "io/ioutil" + "log" + "os" + "path" "strings" + "time" + + "0xacab.org/leap/bitmask-vpn/pkg/config" ) type sipAuthentication struct { @@ -32,10 +38,11 @@ func (a *sipAuthentication) needsCredentials() bool { } func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { - /* TODO - [ ] get token from disk? - [ ] check if expired? set a goroutine to refresh it periodically? - */ + /* TODO refresh session token periodically */ + if hasRecentToken() { + log.Println("Got cached token") + return readToken() + } credJSON, err := formatCredentials(user, password) if err != nil { return nil, fmt.Errorf("Cannot encode credentials: %s", err) @@ -48,7 +55,49 @@ func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { if resp.StatusCode != 200 { return nil, fmt.Errorf("Cannot get token: Error %d", resp.StatusCode) } - return ioutil.ReadAll(resp.Body) + token, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + writeToken(token) + return token, nil +} + +func getTokenPath() string { + return path.Join(config.Path, config.ApplicationName+".token") +} + +func writeToken(token []byte) { + tp := getTokenPath() + err := ioutil.WriteFile(tp, token, 0600) + if err != nil { + log.Println("BUG: cannot write token to", tp) + } +} + +func readToken() ([]byte, error) { + f, err := os.Open(getTokenPath()) + if err != nil { + log.Println("Error: cannot open token file") + return nil, err + } + token, err := ioutil.ReadAll(f) + if err != nil { + log.Println("Error: cannot read token") + return nil, err + } + return token, nil +} + +func hasRecentToken() bool { + statinfo, err := os.Stat(getTokenPath()) + if err != nil { + return false + } + lastWrote := statinfo.ModTime().Unix() + /* in vpnweb we set the duration of the token to 24 hours */ + old := time.Now().Add(-time.Hour * 20).Unix() + return lastWrote >= old } func formatCredentials(user, pass string) (string, error) { diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index dd8c597c..b81fd841 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -114,8 +114,18 @@ func New() *Bonafide { return b } +/* NeedsCredentials signals if we have to ask user for credentials. If false, it can be that we have a cached token */ func (b *Bonafide) NeedsCredentials() bool { - return b.auth.needsCredentials() + if !b.auth.needsCredentials() { + return false + } + /* try cached */ + /* TODO cleanup this call - maybe expose getCachedToken instead of relying on empty creds? */ + _, err := b.auth.getToken("", "") + if err != nil { + return true + } + return false } func (b *Bonafide) DoLogin(username, password string) (bool, error) { @@ -136,9 +146,13 @@ func (b *Bonafide) GetPemCertificate() ([]byte, error) { if b.auth == nil { log.Fatal("ERROR: bonafide did not initialize auth") } - if b.auth.needsCredentials() && b.token == nil { - log.Println("Needs token, but token is empty") - return nil, errors.New("Needs to login, but it was not logged in. Please, restart the application and report it if it continues happening") + if b.auth.needsCredentials() { + /* try cached token */ + token, err := b.auth.getToken("", "") + if err != nil { + return nil, errors.New("BUG: This service needs login, but we were not logged in.") + } + b.token = token } req, err := http.NewRequest("POST", b.getURL("certv3"), strings.NewReader("")) diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index 11bba69a..6055e6a5 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -51,14 +51,7 @@ func (b *Bitmask) StartVPN(provider string) error { } func (b *Bitmask) CanStartVPN() bool { - if !b.bonafide.NeedsCredentials() { - return true - } - _, err := b.getCert() - if err != nil { - return false - } - return true + return !b.bonafide.NeedsCredentials() } func (b *Bitmask) startTransport() (proxy string, err error) { From 2e7309edf6562002c6bc85fcb4a6d7ba2cbd9dbf Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 19 Aug 2020 17:40:36 +0200 Subject: [PATCH 068/174] [debug] improve error handling for geolocation --- branding/config/vendor.conf | 4 +-- pkg/config/config.go | 59 +++++++++++++++++++++++---------- pkg/vpn/bonafide/auth_sip.go | 1 - pkg/vpn/bonafide/bonafide.go | 19 +++++++++-- pkg/vpn/bonafide/eip_service.go | 13 +++++++- pkg/vpn/openvpn.go | 2 +- 6 files changed, 72 insertions(+), 26 deletions(-) diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 90ef36cf..4b3d4a94 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -1,6 +1,6 @@ [default] -provider = demolib +provider = riseup [riseup] @@ -79,7 +79,7 @@ infoURL = https://libraryvpn.org/ tosURL = https://libraryvpn.org/ helpURL = https://libraryvpn.org/ -geolocationAPI = https://getmyip.vpnlib.bitmask.net/ +geolocationAPI = https://getmyip.vpnlib.bitmask.net/json askForDonations = false donateURL = diff --git a/pkg/config/config.go b/pkg/config/config.go index f3f9e6e0..e7991761 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-15 20:39:01 +// At 2020-08-19 17:38:43 package config /* All these constants are defined in the vendor.conf file */ const ( - 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/" + 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" ) var Version string @@ -29,11 +29,34 @@ CaCert : a string containing a representation of the provider CA, used to */ var CaCert = []byte(`-----BEGIN CERTIFICATE----- -MIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v -dCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT -DExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK -kTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3 -1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB -MAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7 -6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p +MIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl +dXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE +AwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw +NDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaXNldXAgTmV0d29ya3MxGzAZBgNVBAsM +Emh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UEAwwXUmlzZXVwIE5ldHdvcmtzIFJv +b3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC76J4ciMJ8Sg0m +TP7DF2DT9zNe0Csk4myoMFC57rfJeqsAlJCv1XMzBmXrw8wq/9z7XHv6n/0sWU7a +7cF2hLR33ktjwODlx7vorU39/lXLndo492ZBhXQtG1INMShyv+nlmzO6GT7ESfNE +LliFitEzwIegpMqxCIHXFuobGSCWF4N0qLHkq/SYUMoOJ96O3hmPSl1kFDRMtWXY +iw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK +5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx +HUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20Ppt6ei0zazkUPwxld3hgyw58 +m/4UIjG3PInWTNf293GngK2Bnz8Qx9e/6TueMSAn/3JBLem56E0WtmbLVjvko+LF +PM5xA+m0BmuSJtrD1MUCXMhqYTtiOvgLBlUm5zkNxALzG+cXB28k6XikXt6MRG7q +hzIPG38zwkooM55yy5i1YfcIi5NjMH6A+t4IJxxwb67MSb6UFOwg5kFokdONZcwj +shczHdG9gLKSBIvrKa03Nd3W2dF9hMbRu//STcQxOailDBQCnXXfAATj9pYzdY4k +ha8VCAREGAKTDAex9oXf1yRuktES4QIDAQABo2AwXjAdBgNVHQ4EFgQUC4tdmLVu +f9hwfK4AGliaet5KkcgwDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwQFMAMBAf8wHwYD +VR0jBBgwFoAUC4tdmLVuf9hwfK4AGliaet5KkcgwDQYJKoZIhvcNAQENBQADggIB +AGzL+GRnYu99zFoy0bXJKOGCF5XUXP/3gIXPRDqQf5g7Cu/jYMID9dB3No4Zmf7v +qHjiSXiS8jx1j/6/Luk6PpFbT7QYm4QLs1f4BlfZOti2KE8r7KRDPIecUsUXW6P/ +3GJAVYH/+7OjA39za9AieM7+H5BELGccGrM5wfl7JeEz8in+V2ZWDzHQO4hMkiTQ +4ZckuaL201F68YpiItBNnJ9N5nHr1MRiGyApHmLXY/wvlrOpclh95qn+lG6/2jk7 +3AmihLOKYMlPwPakJg4PYczm3icFLgTpjV5sq2md9bRyAg3oPGfAuWHmKj2Ikqch +Td5CHKGxEEWbGUWEMP0s1A/JHWiCbDigc4Cfxhy56CWG4q0tYtnc2GMw8OAUO6Wf +Xu5pYKNkzKSEtT/MrNJt44tTZWbKV/Pi/N2Fx36my7TgTUj7g3xcE9eF4JV2H/sg +tsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF +tGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ +UN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp +0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO -----END CERTIFICATE-----`) diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index e00252f3..0c8ee4f1 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -40,7 +40,6 @@ func (a *sipAuthentication) needsCredentials() bool { func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { /* TODO refresh session token periodically */ if hasRecentToken() { - log.Println("Got cached token") return readToken() } credJSON, err := formatCredentials(user, password) diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index b81fd841..99634483 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -232,23 +232,36 @@ func (b *Bonafide) GetOpenvpnArgs() ([]string, error) { } func (b *Bonafide) fetchGeolocation() ([]string, error) { + /* FIXME in float deployments, geolocation is served on gemyip.domain/json, with a LE certificate. + So this is a workaround until we streamline that behavior */ resp, err := b.client.Post(config.GeolocationAPI, "", nil) if err != nil { - return nil, err + client := &http.Client{} + _resp, err := client.Post(config.GeolocationAPI, "", nil) + if err != nil { + log.Println("ERROR: could not fetch geolocation:", fmt.Errorf("%s", err)) + return nil, err + } + resp = _resp } + defer resp.Body.Close() if resp.StatusCode != 200 { - return nil, fmt.Errorf("get geolocation failed with status: %s", resp.Status) + log.Println("ERROR: bad status code while fetching geolocation:", fmt.Errorf("%s", resp.Status)) + return nil, fmt.Errorf("Get geolocation failed with status: %s", resp.Status) } geo := &geoLocation{} dataJSON, err := ioutil.ReadAll(resp.Body) err = json.Unmarshal(dataJSON, &geo) if err != nil { - _ = fmt.Errorf("get vpn cert has failed with status: %s", resp.Status) + log.Println("ERROR: cannot parse geolocation json", fmt.Errorf("%s", err)) + log.Println(string(dataJSON)) + _ = fmt.Errorf("bad json") return nil, err } + log.Println("Got sorted gateways:", geo.SortedGateways) return geo.SortedGateways, nil } diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index ff73da9f..49f4bb1f 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -214,6 +214,7 @@ func (eip *eipService) sortGatewaysByGeolocation(geolocatedGateways []string) { } } } + for _, host := range geolocatedGateways { for _, gw := range eip.Gateways { if gw.Host == host { @@ -221,7 +222,17 @@ func (eip *eipService) sortGatewaysByGeolocation(geolocatedGateways []string) { } } } - eip.Gateways = gws + + if len(gws) == 0 { + log.Println("ERROR: avoiding to replace eip.Gateways will null list. Is the geolocation service properly configured?") + } else { + if len(gws) > 2 { + eip.Gateways = gws[:3] + } else { + eip.Gateways = gws + } + log.Println("Picked best gateways for location:", eip.Gateways) + } } type gatewayDistance struct { diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index 6055e6a5..4997a34d 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -158,7 +158,7 @@ func (b *Bitmask) getCert() (certPath string, err error) { certPath = b.getCertPemPath() if _, err := os.Stat(certPath); os.IsNotExist(err) { - log.Println("Cert does not exist in ", certPath, "...fetching") + log.Println("Fetching certificate to", certPath) cert, err := b.bonafide.GetPemCertificate() if err != nil { return "", err From 90a30a403b798907fc17a5cfe172187168b26813 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 19 Aug 2020 17:51:34 +0200 Subject: [PATCH 069/174] [bug] anon needs no credentials --- gui/qml/main.qml | 2 +- pkg/backend/api.go | 8 +++----- pkg/vpn/bonafide/auth_anon.go | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index f22bdf36..fe69a3bc 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -24,7 +24,7 @@ ApplicationWindow { console.debug(jsonModel.getJson()) login.visible = true } - if (ctx.loginOk == 'true' && loginDone == false) { + if (ctx.loginOk == 'true') { loginOk.visible = true } if (ctx.errors ) { diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 6609b1b7..7c049fc2 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -17,7 +17,7 @@ func Login(username, password string) { success, err := ctx.bm.DoLogin(username, password) if err != nil { log.Printf("Error on login: %v", err) - ctx.Errors = "bad_auth_unknown" + ctx.Errors = "bad_auth" } else if success { log.Printf("Logged in as %s", username) ctx.LoginOk = true @@ -73,13 +73,11 @@ func InitializeBitmaskContext(opts *InitOpts) { opts.AppName = p.AppName initOnce.Do(func() { initializeContext(opts) }) - runDonationReminder() if ctx.bm != nil { - if ctx.bm.NeedsCredentials() { - ctx.LoginDialog = true - } + ctx.LoginDialog = ctx.bm.NeedsCredentials() go ctx.updateStatus() } + runDonationReminder() } func RefreshContext() *C.char { diff --git a/pkg/vpn/bonafide/auth_anon.go b/pkg/vpn/bonafide/auth_anon.go index c6c5775a..9fc95870 100644 --- a/pkg/vpn/bonafide/auth_anon.go +++ b/pkg/vpn/bonafide/auth_anon.go @@ -22,7 +22,7 @@ import ( type anonymousAuthentication struct{} func (a *anonymousAuthentication) needsCredentials() bool { - return true + return false } func (a *anonymousAuthentication) getToken(user, password string) ([]byte, error) { From fd71729558e4ca0f07eac73e4caa231ddbdeb9a8 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 19 Aug 2020 18:21:37 +0200 Subject: [PATCH 070/174] [feat] pick only the top 3 gateways fixes bug: do not initialize an empty list of gateways --- pkg/vpn/bonafide/bonafide.go | 2 +- pkg/vpn/bonafide/eip_service.go | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 99634483..9916b55e 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -232,7 +232,7 @@ func (b *Bonafide) GetOpenvpnArgs() ([]string, error) { } func (b *Bonafide) fetchGeolocation() ([]string, error) { - /* FIXME in float deployments, geolocation is served on gemyip.domain/json, with a LE certificate. + /* FIXME in float deployments, geolocation is served on gemyip.domain/json, with a LE certificate, but in riseup is served behind the api certificate. So this is a workaround until we streamline that behavior */ resp, err := b.client.Post(config.GeolocationAPI, "", nil) if err != nil { diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index 49f4bb1f..961ac403 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -116,6 +116,9 @@ func (b *Bonafide) fetchEipJSON() error { } b.setupAuthentication(b.eip) + /* TODO we could launch the looping call from here. + but smells: calls a bonafide method that in turn calls methods in this file + */ b.sortGateways() return nil } @@ -204,8 +207,9 @@ func (eip eipService) getOpenvpnArgs() []string { } func (eip *eipService) sortGatewaysByGeolocation(geolocatedGateways []string) { - gws := make([]gatewayV3, len(eip.Gateways)) + gws := make([]gatewayV3, 0) + /* TODO this probably should be moved out of this method */ if eip.defaultGateway != "" { for _, gw := range eip.Gateways { if gw.Location == eip.defaultGateway { @@ -213,6 +217,8 @@ func (eip *eipService) sortGatewaysByGeolocation(geolocatedGateways []string) { break } } + // a manually selected gateway means we do want exactly one remote + return } for _, host := range geolocatedGateways { @@ -224,7 +230,9 @@ func (eip *eipService) sortGatewaysByGeolocation(geolocatedGateways []string) { } if len(gws) == 0 { - log.Println("ERROR: avoiding to replace eip.Gateways will null list. Is the geolocation service properly configured?") + // this can happen if a misconfigured geoip service does not match the + // providers list we got. + log.Println("ERROR: avoiding to nullify eip.Gateways. Is the geolocation service properly configured?") } else { if len(gws) > 2 { eip.Gateways = gws[:3] From c0b04dcb06c84b1cb4160ebf25a58f6c2b96eaf7 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 20 Aug 2020 14:54:31 +0200 Subject: [PATCH 071/174] [feat] reset error --- branding/config/vendor.conf | 2 +- gui/backend.go | 9 ++++-- gui/handlers.cpp | 21 ++++++++----- gui/handlers.h | 4 +++ gui/main.cpp | 4 +-- gui/qml/LoginOKDialog.qml | 3 +- pkg/backend/api.go | 7 ++++- pkg/backend/init.go | 8 +++++ pkg/config/config.go | 59 +++++++++++-------------------------- 9 files changed, 59 insertions(+), 58 deletions(-) diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 4b3d4a94..687caadd 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -1,6 +1,6 @@ [default] -provider = riseup +provider = demolib [riseup] diff --git a/gui/backend.go b/gui/backend.go index a5cb3abe..c953d182 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -23,8 +23,8 @@ func GetAppName() *C.char { } //export Login -func Login(username, password *C.char) { - backend.Login(C.GoString(username), C.GoString(password)) +func Login(username, password string) { + backend.Login(username, password) } //export SwitchOn @@ -76,6 +76,11 @@ func RefreshContext() *C.char { return (*C.char)(backend.RefreshContext()) } +//export ResetError +func ResetError(errname string) { + backend.ResetError(errname) +} + //export InstallHelpers func InstallHelpers() { backend.InstallHelpers() diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 3959964b..f34133e2 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -6,6 +6,13 @@ #include "handlers.h" #include "lib/libgoshim.h" +GoString toGoStr(QString s) +{ + char *c = s.toLocal8Bit().data(); + return (GoString){c, (long int)strlen(c)}; +} + + Backend::Backend(QObject *parent) : QObject(parent) { } @@ -37,14 +44,12 @@ void Backend::donateAccepted() void Backend::login(QString username, QString password) { - // TODO: there has to be a cleaner way to do the conversion - char * u = new char [username.length()+1]; - char * p = new char [password.length()+1]; - strcpy(u, username.toStdString().c_str()); - strcpy(p, password.toStdString().c_str()); - Login(u, p); - delete [] u; - delete [] p; + Login(toGoStr(username), toGoStr(password)); +} + +void Backend::resetError(QString errlabel) +{ + ResetError(toGoStr(errlabel)); } void Backend::quit() diff --git a/gui/handlers.h b/gui/handlers.h index 656a4516..9299827f 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -4,6 +4,9 @@ #include #include #include "qjsonmodel.h" +#include "lib/libgoshim.h" + +GoString toGoStr(QString s); class QJsonWatch : public QObject { @@ -36,6 +39,7 @@ public slots: void switchOff(); void donateAccepted(); void login(QString username, QString password); + void resetError(QString errlabel); void quit(); }; diff --git a/gui/main.cpp b/gui/main.cpp index 2a300e21..e3b8530f 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -144,9 +144,7 @@ int main(int argc, char **argv) { /* if requested, enable web api for controlling the VPN */ if (webAPI) { - char* wp = webPort.toLocal8Bit().data(); - GoString p = {wp, (long int)strlen(wp)}; - EnableWebAPI(p); + EnableWebAPI(toGoStr(webPort)); }; /* kick off your shoes, put your feet up */ diff --git a/gui/qml/LoginOKDialog.qml b/gui/qml/LoginOKDialog.qml index 52b37701..be023dd9 100644 --- a/gui/qml/LoginOKDialog.qml +++ b/gui/qml/LoginOKDialog.qml @@ -12,9 +12,8 @@ Dialog { } } - // TODO implement cleanNotifications on backend function _loginOk() { - loginDone = true; + backend.resetError("bad_auth") } visible: false diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 7c049fc2..7aa55279 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 bae9b9b8..af43bab4 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 e7991761..908409ad 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 -iw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK -5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx -HUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20Ppt6ei0zazkUPwxld3hgyw58 -m/4UIjG3PInWTNf293GngK2Bnz8Qx9e/6TueMSAn/3JBLem56E0WtmbLVjvko+LF -PM5xA+m0BmuSJtrD1MUCXMhqYTtiOvgLBlUm5zkNxALzG+cXB28k6XikXt6MRG7q -hzIPG38zwkooM55yy5i1YfcIi5NjMH6A+t4IJxxwb67MSb6UFOwg5kFokdONZcwj -shczHdG9gLKSBIvrKa03Nd3W2dF9hMbRu//STcQxOailDBQCnXXfAATj9pYzdY4k -ha8VCAREGAKTDAex9oXf1yRuktES4QIDAQABo2AwXjAdBgNVHQ4EFgQUC4tdmLVu -f9hwfK4AGliaet5KkcgwDgYDVR0PAQH/BAQDAgIEMAwGA1UdEwQFMAMBAf8wHwYD -VR0jBBgwFoAUC4tdmLVuf9hwfK4AGliaet5KkcgwDQYJKoZIhvcNAQENBQADggIB -AGzL+GRnYu99zFoy0bXJKOGCF5XUXP/3gIXPRDqQf5g7Cu/jYMID9dB3No4Zmf7v -qHjiSXiS8jx1j/6/Luk6PpFbT7QYm4QLs1f4BlfZOti2KE8r7KRDPIecUsUXW6P/ -3GJAVYH/+7OjA39za9AieM7+H5BELGccGrM5wfl7JeEz8in+V2ZWDzHQO4hMkiTQ -4ZckuaL201F68YpiItBNnJ9N5nHr1MRiGyApHmLXY/wvlrOpclh95qn+lG6/2jk7 -3AmihLOKYMlPwPakJg4PYczm3icFLgTpjV5sq2md9bRyAg3oPGfAuWHmKj2Ikqch -Td5CHKGxEEWbGUWEMP0s1A/JHWiCbDigc4Cfxhy56CWG4q0tYtnc2GMw8OAUO6Wf -Xu5pYKNkzKSEtT/MrNJt44tTZWbKV/Pi/N2Fx36my7TgTUj7g3xcE9eF4JV2H/sg -tsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF -tGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ -UN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp -0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO +MIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v +dCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT +DExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK +kTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3 +1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB +MAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7 +6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p -----END CERTIFICATE-----`) From b76baaeeb8cc63c6b4646bb3fc2c1a588227d549 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 20 Aug 2020 20:22:48 +0200 Subject: [PATCH 072/174] [feat] reset notification --- gui/backend.go | 5 +++++ gui/handlers.cpp | 5 +++++ gui/handlers.h | 1 + gui/qml/LoginOKDialog.qml | 3 ++- gui/qml/main.qml | 2 +- pkg/backend/api.go | 16 ++++++++++++++-- pkg/backend/init.go | 7 ------- 7 files changed, 28 insertions(+), 11 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index c953d182..5fa6134a 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -81,6 +81,11 @@ func ResetError(errname string) { backend.ResetError(errname) } +//export ResetNotification +func ResetNotification(label string) { + backend.ResetNotification(label) +} + //export InstallHelpers func InstallHelpers() { backend.InstallHelpers() diff --git a/gui/handlers.cpp b/gui/handlers.cpp index f34133e2..71e5d38b 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -52,6 +52,11 @@ void Backend::resetError(QString errlabel) ResetError(toGoStr(errlabel)); } +void Backend::resetNotification(QString label) +{ + ResetNotification(toGoStr(label)); +} + void Backend::quit() { Quit(); diff --git a/gui/handlers.h b/gui/handlers.h index 9299827f..e3d0e2a9 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -40,6 +40,7 @@ public slots: void donateAccepted(); void login(QString username, QString password); void resetError(QString errlabel); + void resetNotification(QString label); void quit(); }; diff --git a/gui/qml/LoginOKDialog.qml b/gui/qml/LoginOKDialog.qml index be023dd9..bceda186 100644 --- a/gui/qml/LoginOKDialog.qml +++ b/gui/qml/LoginOKDialog.qml @@ -13,7 +13,8 @@ Dialog { } function _loginOk() { - backend.resetError("bad_auth") + visible: false; + backend.resetNotification("login_ok"); } visible: false diff --git a/gui/qml/main.qml b/gui/qml/main.qml index fe69a3bc..9f8bea3f 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -16,12 +16,12 @@ ApplicationWindow { target: jsonModel onDataChanged: { ctx = JSON.parse(jsonModel.getJson()); + if (ctx.donateDialog == 'true') { console.debug(jsonModel.getJson()) donate.visible = true } if (ctx.loginDialog == 'true') { - console.debug(jsonModel.getJson()) login.visible = true } if (ctx.loginOk == 'true') { diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 7aa55279..125f7f58 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -86,8 +86,20 @@ func RefreshContext() *C.char { } func ResetError(errname string) { - log.Println("DEBUG: resetting error", errname) - resetErrors(errname) + if ctx.Errors == errname { + ctx.Errors = "" + } +} + +func ResetNotification(label string) { + switch label { + case "login_ok": + ctx.LoginOk = false + break + default: + break + } + go trigger(OnStatusChanged) } func InstallHelpers() { diff --git a/pkg/backend/init.go b/pkg/backend/init.go index af43bab4..be4427af 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -40,13 +40,6 @@ func checkErrors(errCh chan string) { } } -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!") From 4ee05a0a6946d3f7aadf3e69eddc3fe977553b97 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 19:24:25 +0200 Subject: [PATCH 073/174] [refactor] fix error handling after review --- pkg/vpn/bonafide/auth_sip.go | 8 +++++--- pkg/vpn/bonafide/bonafide.go | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index 0c8ee4f1..5da562d5 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -70,25 +70,27 @@ func writeToken(token []byte) { tp := getTokenPath() err := ioutil.WriteFile(tp, token, 0600) if err != nil { - log.Println("BUG: cannot write token to", tp) + log.Println("BUG: cannot write token to", tp, err) } } func readToken() ([]byte, error) { f, err := os.Open(getTokenPath()) if err != nil { - log.Println("Error: cannot open token file") + log.Println("Error: cannot open token file", err) return nil, err } token, err := ioutil.ReadAll(f) if err != nil { - log.Println("Error: cannot read token") + log.Println("Error: cannot read token", err) return nil, err } return token, nil } func hasRecentToken() bool { + /* See https://0xacab.org/leap/bitmask-vpn/-/issues/346 for ability to refresh tokens, + when implemented that should be tried in a goroutine */ statinfo, err := os.Stat(getTokenPath()) if err != nil { return false diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 9916b55e..6630352f 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -239,7 +239,7 @@ func (b *Bonafide) fetchGeolocation() ([]string, error) { client := &http.Client{} _resp, err := client.Post(config.GeolocationAPI, "", nil) if err != nil { - log.Println("ERROR: could not fetch geolocation:", fmt.Errorf("%s", err)) + log.Printf("ERROR: could not fetch geolocation: %s\n", err) return nil, err } resp = _resp @@ -247,15 +247,15 @@ func (b *Bonafide) fetchGeolocation() ([]string, error) { defer resp.Body.Close() if resp.StatusCode != 200 { - log.Println("ERROR: bad status code while fetching geolocation:", fmt.Errorf("%s", resp.Status)) - return nil, fmt.Errorf("Get geolocation failed with status: %s", resp.Status) + log.Println("ERROR: bad status code while fetching geolocation:", resp.StatusCode) + return nil, fmt.Errorf("Get geolocation failed with status: %s", resp.StatusCode) } geo := &geoLocation{} dataJSON, err := ioutil.ReadAll(resp.Body) err = json.Unmarshal(dataJSON, &geo) if err != nil { - log.Println("ERROR: cannot parse geolocation json", fmt.Errorf("%s", err)) + log.Printf("ERROR: cannot parse geolocation json: %s\n", err) log.Println(string(dataJSON)) _ = fmt.Errorf("bad json") return nil, err From 5383f54a22260679d56aff0a7d738f9cfa9bc0b8 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 24 Aug 2020 21:06:34 +0200 Subject: [PATCH 074/174] [docs] wording very minor picks --- branding/README.rst | 2 +- branding/config/vendor.conf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/branding/README.rst b/branding/README.rst index e52160b1..87d80851 100644 --- a/branding/README.rst +++ b/branding/README.rst @@ -2,7 +2,7 @@ Branding for BitmaskVPN ================================================================================ This folder contains everything that is needed to generate a customized built of -BitmaskVPN for your provider. +the Desktop BitmaskVPN app for a given provider. Configure diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 687caadd..09921285 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -10,7 +10,7 @@ applicationName = RiseupVPN binaryName = riseup-vpn providerURL = riseup.net -auth = anon +auth = anon apiURL = https://api.black.riseup.net/ caURL = https://black.riseup.net/ca.crt @@ -31,7 +31,7 @@ applicationName = CalyxVPN binaryName = calyx-vpn providerURL = https://calyx.net -auth = anon +auth = anon apiURL = https://api.calyx.net:4430/ caURL = https://calyx.net/ca.crt @@ -49,7 +49,7 @@ donateURL = http://example.org name = demo applicationName = DemoVPN binaryName = demo-vpn -auth = anon +auth = anon providerURL = pt.demo.bitmask.net apiURL = https://pt.demo.bitmask.net:8000/ From 5b99b48aa97feda549662393116ceb9b71004f98 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Wed, 5 Aug 2020 19:01:12 +0200 Subject: [PATCH 075/174] [feat] load provider json in qml --- gui/gui.qrc | 8 +++++--- gui/main.cpp | 16 +++++++++++----- gui/providers/providers.json | 4 ++++ gui/qml/main.qml | 3 +++ 4 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 gui/providers/providers.json diff --git a/gui/gui.qrc b/gui/gui.qrc index 6bc3d8de..112a1ce6 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -1,11 +1,12 @@ + qml/main.qml qml/AboutDialog.qml qml/DonateDialog.qml qml/LoginDialog.qml qml/LoginOKDialog.qml - + assets/icon/png/black/vpn_off.png assets/icon/png/black/vpn_on.png assets/icon/png/black/vpn_wait_0.png @@ -19,7 +20,8 @@ assets/icon/png/white/vpn_wait_1.png assets/icon/png/white/vpn_wait_2.png assets/icon/png/white/vpn_wait_3.png - - + providers/providers.json +
+
diff --git a/gui/main.cpp b/gui/main.cpp index e3b8530f..8c7de4f5 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -40,7 +40,6 @@ void signalHandler(int) { int main(int argc, char **argv) { signal(SIGINT, signalHandler); - bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; Backend backend; @@ -104,19 +103,27 @@ int main(int argc, char **argv) { QTranslator translator; translator.load(QLocale(), QLatin1String("main"), QLatin1String("_"), QLatin1String(":/i18n")); app.installTranslator(&translator); - + QQmlApplicationEngine engine; QQmlContext *ctx = engine.rootContext(); QJsonModel *model = new QJsonModel; + /* load providers json */ + QFile providerJson (":/providers.json"); + providerJson.open(QIODevice::ReadOnly | QIODevice::Text); + QJsonModel *providers = new QJsonModel; + providers->loadJson(providerJson.readAll()); + /* the backend handler has slots for calling back to Go when triggered by signals in Qml. */ ctx->setContextProperty("backend", &backend); - /* we pass the json model and set some useful flags */ + /* set the json model, load providers.json */ ctx->setContextProperty("jsonModel", model); - ctx->setContextProperty("debugQml", debugQml); + ctx->setContextProperty("providers", providers); + + /* set some useful flags */ ctx->setContextProperty("systrayVisible", !hideSystray); engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); @@ -133,7 +140,6 @@ int main(int argc, char **argv) { QGuiApplication::quit(); }); - /* register statusChanged callback with CGO */ const char *stCh = "OnStatusChanged"; GoString statusChangedEvt = {stCh, (long int)strlen(stCh)}; diff --git a/gui/providers/providers.json b/gui/providers/providers.json new file mode 100644 index 00000000..7ba0ef97 --- /dev/null +++ b/gui/providers/providers.json @@ -0,0 +1,4 @@ +[ + {"name": "provider1", "url": "https://example.com"}, + {"name": "provider2", "url": "https://foobar.com"} +] diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 9f8bea3f..da6b9ee7 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -56,6 +56,9 @@ ApplicationWindow { Loaders as a placeholder for all the many dialogs, or to load a nice splash screen etc... */ + console.debug("Pre-seeded providers:"); + console.debug(providers.getJson()); + app.visible = true; show(); hide(); From 9da3dd5e0daf62fdb67e02835ce599bfb9af1530 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 24 Aug 2020 21:25:33 +0200 Subject: [PATCH 076/174] [feat] generate providers.json --- Makefile | 5 ++ branding/README.rst | 9 ++-- branding/config/vendor.conf | 3 +- branding/scripts/gen-providers-json.py | 70 ++++++++++++++++++++++++++ branding/scripts/vendorize.py | 2 + 5 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 branding/scripts/gen-providers-json.py diff --git a/Makefile b/Makefile index 9c0843d2..6d83acc6 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,11 @@ build_all_providers: # packaging templates ######################################################################### +vendor: gen_providers_json + +gen_providers_json: + @python3 branding/scripts/gen-providers-json.py branding/config/vendor.conf gui/providers/providers.json + prepare: prepare_templates gen_pkg_win gen_pkg_osx gen_pkg_snap gen_pkg_deb prepare_done prepare_templates: generate relink_default tgz diff --git a/branding/README.rst b/branding/README.rst index 87d80851..7f2f16ac 100644 --- a/branding/README.rst +++ b/branding/README.rst @@ -29,15 +29,14 @@ before the build. If you want to skip this check, pass `SKIP_CACHECK=yes` Run:: - PROVIDER=example make prepare + PROVIDER=example make vendor -You can also specify a custom config file:: +Then you can build the binary:: - PROVIDER=example PROVIDER_CONFIG=/path/to/vendor.conf make prepare + ./build.sh -Then you need to build the package:: - make build +* The following does not work yet! in progress ------------------ Then you can build all the packages:: diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 09921285..3657c2bc 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -1,6 +1,7 @@ [default] provider = demolib +bitmask-providers = [riseup, calyx] [riseup] @@ -42,7 +43,7 @@ helpURL = https://calyx.net/support geolocationAPI = https://api.black.riseup.net:9001/json askForDonations = false -donateURL = http://example.org +donateURL = [demo] diff --git a/branding/scripts/gen-providers-json.py b/branding/scripts/gen-providers-json.py new file mode 100644 index 00000000..b57965b9 --- /dev/null +++ b/branding/scripts/gen-providers-json.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +import configparser +import json +import os +import sys + + +from provider import getDefaultProvider +from provider import getProviderData + +OUTFILE = 'providers.json' +SCRIPT_NAME = 'gen-providers-json' + + +def generateProvidersJSON(configPath, outputJSONPath): + print("output:", outputJSONPath) + config = configparser.ConfigParser() + config.read(configPath) + + # TODO as a first step, we just get the defaultProvider. + # For multi-provider, just add more providers to the dict + + providers = {} + defaultProvider = getDefaultProvider(config) + providers['default'] = defaultProvider + providerData = getProviderData(defaultProvider, config) + addCaData(providerData, configPath) + + providers[defaultProvider] = providerData + with open(outputJSONPath, 'w', encoding='utf-8') as f: + json.dump(providers, f, ensure_ascii=False, indent=4) + +def addCaData(data, configfile): + provider = data.get('name').lower() + folder, f = os.path.split(configfile) + caFile = os.path.join(folder, provider + '-ca.crt') + if not os.path.isfile(caFile): + bail('[!] Cannot find CA file in {path}'.format(path=caFile)) + with open(caFile) as ca: + data['caCertString'] = ca.read().strip() + +def writeOutput(data, infile, outfile): + + with open(infile) as infile: + s = Template(infile.read()) + + with open(outfile, 'w') as outf: + outf.write(s.substitute(data)) + +def bail(msg=None): + if not msg: + print("ERROR: not enough arguments!") + print('Usage: {scriptname}.py '.format( + scriptname=SCRIPT_NAME)) + else: + print(msg) + sys.exit(1) + +if __name__ == "__main__": + print("[+] Generating providers.json...") + if len(sys.argv) != 3: + bail() + # TODO get BITMASK_BRANDING folder - get config from there, if possible. + env_provider_conf = os.environ.get('PROVIDER_CONFIG') + if env_provider_conf: + if os.path.isfile(env_provider_conf): + print("[+] Overriding provider config per " + "PROVIDER_CONFIG variable") + configfile = env_provider_conf + generateProvidersJSON(sys.argv[1], sys.argv[2]) diff --git a/branding/scripts/vendorize.py b/branding/scripts/vendorize.py index ba248b0c..28c5d2a7 100755 --- a/branding/scripts/vendorize.py +++ b/branding/scripts/vendorize.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 +# TODO: to be deprecated! use gen-providers-json.py instead + import os import sys From 64304a97c28e350dbcd3048adec876763624f931 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 02:23:18 +0200 Subject: [PATCH 077/174] [bug] pass json as bytes to go side --- branding/scripts/gen-providers-json.py | 3 ++- gui/backend.go | 8 ++++++-- gui/handlers.cpp | 4 +++- gui/main.cpp | 8 +++++++- gui/providers/providers.json | 24 +++++++++++++++++++---- pkg/backend/api.go | 27 +++++++++++++++++++++++--- 6 files changed, 62 insertions(+), 12 deletions(-) diff --git a/branding/scripts/gen-providers-json.py b/branding/scripts/gen-providers-json.py index b57965b9..8e1c10bd 100644 --- a/branding/scripts/gen-providers-json.py +++ b/branding/scripts/gen-providers-json.py @@ -23,10 +23,11 @@ def generateProvidersJSON(configPath, outputJSONPath): providers = {} defaultProvider = getDefaultProvider(config) providers['default'] = defaultProvider + providers['providers'] = [] providerData = getProviderData(defaultProvider, config) addCaData(providerData, configPath) - providers[defaultProvider] = providerData + providers['providers'].append(providerData) with open(outputJSONPath, 'w', encoding='utf-8') as f: json.dump(providers, f, ensure_ascii=False, indent=4) diff --git a/gui/backend.go b/gui/backend.go index 5fa6134a..a1dafe8c 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -7,6 +7,7 @@ package main import ( "C" + "log" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/backend" @@ -53,8 +54,11 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { } //export InitializeBitmaskContext -func InitializeBitmaskContext() { - opts := &backend.InitOpts{} +func InitializeBitmaskContext(provider string, jsonPtr unsafe.Pointer, jsonLen C.int) { + log.Println("DEBUG: provider=", provider) + json := C.GoBytes(jsonPtr, jsonLen) + log.Println("DEBUG: json=", string(json)) + opts := backend.InitOptsFromJSON(provider, string(json)) backend.InitializeBitmaskContext(opts) } diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 71e5d38b..4910aa29 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -8,7 +8,9 @@ GoString toGoStr(QString s) { - char *c = s.toLocal8Bit().data(); + // TODO verify that it's more correct + // char *c = s.toLocal8Bit().data(); + const char *c = s.toUtf8().constData(); return (GoString){c, (long int)strlen(c)}; } diff --git a/gui/main.cpp b/gui/main.cpp index 8c7de4f5..4ba9dd6f 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -145,8 +145,14 @@ int main(int argc, char **argv) { GoString statusChangedEvt = {stCh, (long int)strlen(stCh)}; SubscribeToEvent(statusChangedEvt, (void *)onStatusChanged); + QJsonValue defaultProvider = providers->json().object().value("default"); + /* we send json as bytes because it breaks as a simple string */ + QString QProvidersJSON(providers->json().toJson(QJsonDocument::Compact)); + /* let the Go side initialize its internal state */ - InitializeBitmaskContext(); + InitializeBitmaskContext( + toGoStr(defaultProvider.toString()), + (char*)QProvidersJSON.toUtf8().data(), strlen(QProvidersJSON.toUtf8().data())); /* if requested, enable web api for controlling the VPN */ if (webAPI) { diff --git a/gui/providers/providers.json b/gui/providers/providers.json index 7ba0ef97..f0132f51 100644 --- a/gui/providers/providers.json +++ b/gui/providers/providers.json @@ -1,4 +1,20 @@ -[ - {"name": "provider1", "url": "https://example.com"}, - {"name": "provider2", "url": "https://foobar.com"} -] +{ + "default": "demolib", + "providers": [ + { + "name": "demolib", + "applicationName": "DemoLib", + "binaryName": "demo-lib", + "auth": "sip", + "providerURL": "vpnlib.bitmask.net", + "tosURL": "https://libraryvpn.org/", + "helpURL": "https://libraryvpn.org/", + "askForDonations": "false", + "donateURL": "", + "apiURL": "https://api.vpnlib.bitmask.net:4430/", + "geolocationAPI": "https://getmyip.vpnlib.bitmask.net/json", + "caCertString": "-----BEGIN CERTIFICATE-----\nMIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v\ndCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT\nDExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK\nkTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3\n1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB\nMAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7\n6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p\n-----END CERTIFICATE-----", + "timeStamp": "2020-09-08 01:01:08" + } + ] +} \ No newline at end of file diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 125f7f58..59b386b4 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -4,6 +4,7 @@ package backend import ( "C" + "encoding/json" "log" "strconv" "unsafe" @@ -61,10 +62,30 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { subscribe(event, f) } +type Providers struct { + Default string `json:"default"` + Data []InitOpts +} + type InitOpts struct { - Provider string - AppName string - SkipLaunch bool + Provider string `json:"name"` + AppName string `json:"applicationName"` + BinaryName string `json:"binaryName"` + Auth string `json:"auth"` + ProviderURL string `json:"providerURL"` + TosURL string `json:"tosURL"` + HelpURL string `json:"helpURL"` + AskForDonations bool `json:"askForDonations"` + SkipLaunch bool +} + +func InitOptsFromJSON(provider, providersJSON string) *InitOpts { + opts := InitOpts{} + err := json.Unmarshal([]byte(providersJSON), &opts) + if err != nil { + log.Println("ERROR: %v", err) + } + return &opts } func InitializeBitmaskContext(opts *InitOpts) { From bca7822057d37b511ebd034bbe0463010c2dea10 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 03:32:46 +0200 Subject: [PATCH 078/174] [feat] lookup the config vars at runtime - Resolves: #326 --- gui/backend.go | 3 --- pkg/backend/api.go | 29 +++++++++++--------------- pkg/backend/donate.go | 9 -------- pkg/backend/init.go | 10 ++++++--- pkg/bitmask/init.go | 35 +++++++++++++++++++++++++++++++ pkg/config/config.go | 37 +++++++++++---------------------- pkg/vpn/bonafide/bonafide.go | 10 +++------ pkg/vpn/bonafide/eip_service.go | 7 ++----- pkg/vpn/launcher_linux.go | 5 ++++- 9 files changed, 75 insertions(+), 70 deletions(-) diff --git a/gui/backend.go b/gui/backend.go index a1dafe8c..7632bb4d 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -7,7 +7,6 @@ package main import ( "C" - "log" "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/backend" @@ -55,9 +54,7 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { //export InitializeBitmaskContext func InitializeBitmaskContext(provider string, jsonPtr unsafe.Pointer, jsonLen C.int) { - log.Println("DEBUG: provider=", provider) json := C.GoBytes(jsonPtr, jsonLen) - log.Println("DEBUG: json=", string(json)) opts := backend.InitOptsFromJSON(provider, string(json)) backend.InitializeBitmaskContext(opts) } diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 59b386b4..1985e6b0 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -63,35 +63,30 @@ func SubscribeToEvent(event string, f unsafe.Pointer) { } type Providers struct { - Default string `json:"default"` - Data []InitOpts + Default string `json:"default"` + Data []bitmask.ProviderOpts `json:"providers"` } type InitOpts struct { - Provider string `json:"name"` - AppName string `json:"applicationName"` - BinaryName string `json:"binaryName"` - Auth string `json:"auth"` - ProviderURL string `json:"providerURL"` - TosURL string `json:"tosURL"` - HelpURL string `json:"helpURL"` - AskForDonations bool `json:"askForDonations"` + ProviderOptions *bitmask.ProviderOpts SkipLaunch bool } func InitOptsFromJSON(provider, providersJSON string) *InitOpts { - opts := InitOpts{} - err := json.Unmarshal([]byte(providersJSON), &opts) + providers := Providers{} + err := json.Unmarshal([]byte(providersJSON), &providers) if err != nil { - log.Println("ERROR: %v", err) + log.Println("ERROR while parsing json:", err) } - return &opts + if len(providers.Data) != 1 { + panic("BUG: we do not support multi-provider yet") + } + providerOpts := &providers.Data[0] + return &InitOpts{providerOpts, false} } func InitializeBitmaskContext(opts *InitOpts) { - p := bitmask.GetConfiguredProvider() - opts.Provider = p.Provider - opts.AppName = p.AppName + bitmask.ConfigureProvider(opts.ProviderOptions) initOnce.Do(func() { initializeContext(opts) }) if ctx.bm != nil { diff --git a/pkg/backend/donate.go b/pkg/backend/donate.go index 20d56130..f87934a9 100644 --- a/pkg/backend/donate.go +++ b/pkg/backend/donate.go @@ -2,8 +2,6 @@ package backend import ( "time" - - "0xacab.org/leap/bitmask-vpn/pkg/config" ) // runDonationReminder checks every hour if we need to show the reminder, @@ -19,13 +17,6 @@ func runDonationReminder() { }() } -func wantDonations() bool { - if config.AskForDonations == "true" { - return true - } - return false -} - func needsDonationReminder() bool { return ctx.cfg.NeedsDonationReminder() } diff --git a/pkg/backend/init.go b/pkg/backend/init.go index be4427af..aabc720b 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -14,13 +14,17 @@ import ( // api uses the sync.Once primitive to call this. func initializeContext(opts *InitOpts) { var st status = off + + // TODO - now there's really no need to dance between opts and config anymore + // but this was the simplest transition. We should probably keep the multi-provider config in the backend too, and just + // switch the "active" here in the ctx, after the user has selected one in the combobox. ctx = &connectionCtx{ - AppName: opts.AppName, - Provider: opts.Provider, + AppName: opts.ProviderOptions.AppName, + Provider: opts.ProviderOptions.Provider, TosURL: config.TosURL, HelpURL: config.HelpURL, DonateURL: config.DonateURL, - AskForDonations: wantDonations(), + AskForDonations: config.AskForDonations, DonateDialog: false, Version: version.VERSION, Status: st, diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index b86deb82..4907b2fb 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -20,6 +20,7 @@ import ( "log" "os" "path" + "strconv" "github.com/jmshal/go-locale" "golang.org/x/text/message" @@ -34,12 +35,46 @@ type ProviderInfo struct { AppName string } +type ProviderOpts struct { + Provider string `json:"name"` + AppName string `json:"applicationName"` + BinaryName string `json:"binaryName"` + Auth string `json:"auth"` + ProviderURL string `json:"providerURL"` + DonateURL string `json:"donateURL"` + ApiURL string `json:"apiURL"` + TosURL string `json:"tosURL"` + HelpURL string `json:"helpURL"` + GeolocationURL string `json:"geolocationAPI"` + AskForDonations string `json:"askForDonations"` + CaCert string `json:"caCertString"` +} + func GetConfiguredProvider() *ProviderInfo { provider := config.Provider appName := config.ApplicationName return &ProviderInfo{provider, appName} } +func ConfigureProvider(opts *ProviderOpts) { + config.Provider = opts.ProviderURL + config.ProviderName = opts.Provider + config.ApplicationName = opts.AppName + config.BinaryName = opts.BinaryName + config.Auth = opts.Auth + config.DonateURL = opts.DonateURL + config.HelpURL = opts.HelpURL + config.TosURL = opts.TosURL + config.APIURL = opts.ApiURL + config.GeolocationAPI = opts.GeolocationURL + config.CaCert = []byte(opts.CaCert) + + wantsDonations, err := strconv.ParseBool(opts.AskForDonations) + if err == nil { + config.AskForDonations = wantsDonations + } +} + func InitializeLogger() { _, err := config.ConfigureLogger(path.Join(config.LogPath)) if err != nil { diff --git a/pkg/config/config.go b/pkg/config/config.go index 908409ad..7815c963 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,22 +1,17 @@ -// Code generated by go generate; DO NOT EDIT. -// This file was generated by vendorize.py -// At 2020-08-20 13:39:50 - package config -/* All these constants are defined in the vendor.conf file - */ -const ( - Provider = "vpnlib.bitmask.net" - ApplicationName = "DemoLib" - BinaryName = "demo-lib" - Auth = "sip" +var ( + Provider = "" + ProviderName = "" + ApplicationName = "" + BinaryName = "" + Auth = "" 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" + AskForDonations = true + HelpURL = "" + TosURL = "" + APIURL = "" + GeolocationAPI = "" ) var Version string @@ -28,12 +23,4 @@ CaCert : a string containing a representation of the provider CA, used to config/[provider]-ca.crt */ -var CaCert = []byte(`-----BEGIN CERTIFICATE----- -MIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v -dCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT -DExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK -kTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3 -1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB -MAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7 -6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p ------END CERTIFICATE-----`) +var CaCert = []byte("") diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 6630352f..e65e193f 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -40,10 +40,6 @@ const ( certPathv1 = "1/cert" certPathv3 = "3/cert" authPathv3 = "3/auth" - - certAPI = config.APIURL + certPathv1 - certAPI3 = config.APIURL + certPathv3 - authAPI = config.APIURL + authPathv3 ) type Bonafide struct { @@ -185,11 +181,11 @@ func (b *Bonafide) getURL(object string) string { if b.apiURL == "" { switch object { case "cert": - return certAPI + return config.APIURL + certPathv1 case "certv3": - return certAPI3 + return config.APIURL + certPathv3 case "auth": - return authAPI + return config.APIURL + authPathv3 } } else { switch object { diff --git a/pkg/vpn/bonafide/eip_service.go b/pkg/vpn/bonafide/eip_service.go index 961ac403..21cc8e80 100644 --- a/pkg/vpn/bonafide/eip_service.go +++ b/pkg/vpn/bonafide/eip_service.go @@ -14,11 +14,6 @@ import ( "0xacab.org/leap/bitmask-vpn/pkg/config" ) -const ( - eip1API = config.APIURL + "1/config/eip-service.json" - eip3API = config.APIURL + "3/config/eip-service.json" -) - type eipService struct { Gateways []gatewayV3 Locations map[string]location @@ -83,6 +78,7 @@ func (b *Bonafide) setupAuthentication(i interface{}) { } func (b *Bonafide) fetchEipJSON() error { + eip3API := config.APIURL + "3/config/eip-service.json" resp, err := b.client.Post(eip3API, "", nil) for err != nil { log.Printf("Error fetching eip v3 json: %v", err) @@ -98,6 +94,7 @@ func (b *Bonafide) fetchEipJSON() error { buf := make([]byte, 128) resp.Body.Read(buf) log.Printf("Error fetching eip v3 json") + eip1API := config.APIURL + "1/config/eip-service.json" resp, err = b.client.Post(eip1API, "", nil) if err != nil { return err diff --git a/pkg/vpn/launcher_linux.go b/pkg/vpn/launcher_linux.go index 1280eae8..3a297893 100644 --- a/pkg/vpn/launcher_linux.go +++ b/pkg/vpn/launcher_linux.go @@ -29,7 +29,10 @@ import ( ) const ( - systemOpenvpnPath = "/usr/sbin/openvpn" + systemOpenvpnPath = "/usr/sbin/openvpn" +) + +var ( snapOpenvpnPath = "/snap/bin/" + config.BinaryName + ".openvpn" snapBitmaskRootPath = "/snap/bin/" + config.BinaryName + ".bitmask-root" ) From f5acefc8f402061d73de62d8766ec77992f3a8f1 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 03:46:07 +0200 Subject: [PATCH 079/174] [feat] expose allowEmptyPass flag for provider config --- branding/config/vendor.conf | 1 + branding/scripts/provider.py | 2 +- gui/providers/providers.json | 3 ++- pkg/bitmask/init.go | 8 ++++++++ pkg/config/config.go | 1 + 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/branding/config/vendor.conf b/branding/config/vendor.conf index 3657c2bc..b519cf8c 100644 --- a/branding/config/vendor.conf +++ b/branding/config/vendor.conf @@ -71,6 +71,7 @@ name = demolib applicationName = DemoLib binaryName = demo-lib auth = sip +authEmptyPass = true providerURL = vpnlib.bitmask.net apiURL = https://api.vpnlib.bitmask.net:4430/ diff --git a/branding/scripts/provider.py b/branding/scripts/provider.py index a88179b7..ffee1b31 100644 --- a/branding/scripts/provider.py +++ b/branding/scripts/provider.py @@ -18,7 +18,7 @@ def getProviderData(provider, config): c = config[provider] d = dict() - keys = ('name', 'applicationName', 'binaryName', 'auth', + keys = ('name', 'applicationName', 'binaryName', 'auth', 'authEmptyPass', 'providerURL', 'tosURL', 'helpURL', 'askForDonations', 'donateURL', 'apiURL', 'geolocationAPI', 'caCertString') diff --git a/gui/providers/providers.json b/gui/providers/providers.json index f0132f51..e0c52b87 100644 --- a/gui/providers/providers.json +++ b/gui/providers/providers.json @@ -6,6 +6,7 @@ "applicationName": "DemoLib", "binaryName": "demo-lib", "auth": "sip", + "authEmptyPass": "true", "providerURL": "vpnlib.bitmask.net", "tosURL": "https://libraryvpn.org/", "helpURL": "https://libraryvpn.org/", @@ -14,7 +15,7 @@ "apiURL": "https://api.vpnlib.bitmask.net:4430/", "geolocationAPI": "https://getmyip.vpnlib.bitmask.net/json", "caCertString": "-----BEGIN CERTIFICATE-----\nMIIBQzCB6aADAgECAgEBMAoGCCqGSM49BAMCMBcxFTATBgNVBAMTDExFQVAgUm9v\ndCBDQTAeFw0yMDA4MDYxOTA3NDRaFw0yNTA4MDYxOTEyNDRaMBcxFTATBgNVBAMT\nDExFQVAgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIG5POr4cAdK\nkTavKpSJr8nW1V7HLpr27qKaShpk1TUy5ipaAlusmavGLxKsPE+i3AMlvf/f6ch3\n1MjAtIf5rYujJjAkMA4GA1UdDwEB/wQEAwICpDASBgNVHRMBAf8ECDAGAQH/AgEB\nMAoGCCqGSM49BAMCA0kAMEYCIQDXj280LNZbSbi0Y2WvtQrJBUw4wdm8qAeOeuH7\n6XiLEwIhAPBRsmst/ujcChsG2t6LpG+p8s4rfIfh8YLo/4qrcc5p\n-----END CERTIFICATE-----", - "timeStamp": "2020-09-08 01:01:08" + "timeStamp": "2020-09-08 03:42:39" } ] } \ No newline at end of file diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index 4907b2fb..bed98e5c 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -40,6 +40,7 @@ type ProviderOpts struct { AppName string `json:"applicationName"` BinaryName string `json:"binaryName"` Auth string `json:"auth"` + AuthEmptyPass string `json:"authEmptyPass"` ProviderURL string `json:"providerURL"` DonateURL string `json:"donateURL"` ApiURL string `json:"apiURL"` @@ -62,6 +63,7 @@ func ConfigureProvider(opts *ProviderOpts) { config.ApplicationName = opts.AppName config.BinaryName = opts.BinaryName config.Auth = opts.Auth + config.DonateURL = opts.DonateURL config.HelpURL = opts.HelpURL config.TosURL = opts.TosURL @@ -73,6 +75,12 @@ func ConfigureProvider(opts *ProviderOpts) { if err == nil { config.AskForDonations = wantsDonations } + + emptyPass, err := strconv.ParseBool(opts.AuthEmptyPass) + if err == nil { + config.AuthEmptyPass = emptyPass + log.Println("DEBUG: provider allows empty pass", emptyPass) + } } func InitializeLogger() { diff --git a/pkg/config/config.go b/pkg/config/config.go index 7815c963..c4961ab9 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -6,6 +6,7 @@ var ( ApplicationName = "" BinaryName = "" Auth = "" + AuthEmptyPass = false DonateURL = "" AskForDonations = true HelpURL = "" From 2e3622fa952750cafe44faad9bfe7dd045e48fb3 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 15:56:25 +0200 Subject: [PATCH 080/174] [bug] show only bad_auth dialog --- gui/qml/main.qml | 15 +++++++++++++-- pkg/bitmask/init.go | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index da6b9ee7..f0a2b5c1 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -17,6 +17,8 @@ ApplicationWindow { onDataChanged: { ctx = JSON.parse(jsonModel.getJson()); + // FIXME -- we need to inform the backend that we've already seen + // this. Otherwise this keeps popping randonmly on state changes. if (ctx.donateDialog == 'true') { console.debug(jsonModel.getJson()) donate.visible = true @@ -28,6 +30,7 @@ ApplicationWindow { loginOk.visible = true } if (ctx.errors ) { + login.visible = false if ( ctx.errors == "nohelpers" ) { showInitFailure(qsTr("Could not find helpers. Check your installation")) } else if ( ctx.errors == "nopolkit" ) { @@ -268,7 +271,15 @@ ApplicationWindow { title: qsTr("Initialization Error") text: "" visible: false - onAccepted: backend.quit() - onRejected: backend.quit() + onAccepted: retryOrQuit() + onRejected: retryOrQuit() + + function retryOrQuit() { + if (ctx.loginDialog == 'true') { + login.visible = true + } else { + backend.quit() + } + } } } diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go index bed98e5c..7ac6f766 100644 --- a/pkg/bitmask/init.go +++ b/pkg/bitmask/init.go @@ -79,7 +79,7 @@ func ConfigureProvider(opts *ProviderOpts) { emptyPass, err := strconv.ParseBool(opts.AuthEmptyPass) if err == nil { config.AuthEmptyPass = emptyPass - log.Println("DEBUG: provider allows empty pass", emptyPass) + log.Println("DEBUG: provider allows empty pass:", emptyPass) } } From 65bb403bb070d163b8b5fc6eb46a8ace17eba258 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 16:19:36 +0200 Subject: [PATCH 081/174] [feat] do not show password field if allowEmptyPass is set --- gui/qml/LoginDialog.qml | 1 + gui/qml/main.qml | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml index 1724769d..897081b7 100644 --- a/gui/qml/LoginDialog.qml +++ b/gui/qml/LoginDialog.qml @@ -18,6 +18,7 @@ Dialog { id: password placeholderText: qsTr("password") echoMode: TextInput.PasswordEchoOnEdit + visible: !allowEmptyPass } } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index f0a2b5c1..f0303452 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -11,6 +11,7 @@ ApplicationWindow { property var ctx property var loginDone + property var allowEmptyPass Connections { target: jsonModel @@ -46,8 +47,20 @@ ApplicationWindow { } function showInitFailure(msg) { - initFailure.text = msg - initFailure.visible = true + initFailure.text = msg + initFailure.visible = true + } + + function shouldAllowEmptyPass() { + let obj = JSON.parse(providers.getJson()) + let active = obj['default'] + let allProviders = obj['providers'] + for (let i = 0; i < allProviders.length; i++) { + if (allProviders[i]['name'] === active) { + return (allProviders[i]['authEmptyPass'] === 'true') + } + } + return false } Component.onCompleted: { @@ -59,9 +72,11 @@ ApplicationWindow { Loaders as a placeholder for all the many dialogs, or to load a nice splash screen etc... */ - console.debug("Pre-seeded providers:"); + console.debug("DEBUG: Pre-seeded providers:"); console.debug(providers.getJson()); + allowEmptyPass = shouldAllowEmptyPass() + app.visible = true; show(); hide(); From eddd64dd25e92f1c7578f28edc05a28a554a3662 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 16:51:32 +0200 Subject: [PATCH 082/174] [feat] improve phrasing for login dialog, split into its own file --- gui/gui.qrc | 1 + gui/providers/providers.json | 2 +- gui/qml/FailDialog.qml | 23 +++++++++++++++++++++ gui/qml/LoginDialog.qml | 19 +++++++++++++++++- gui/qml/main.qml | 39 ++++++++++++++++++------------------ 5 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 gui/qml/FailDialog.qml diff --git a/gui/gui.qrc b/gui/gui.qrc index 112a1ce6..36252dd6 100644 --- a/gui/gui.qrc +++ b/gui/gui.qrc @@ -6,6 +6,7 @@ qml/DonateDialog.qml qml/LoginDialog.qml qml/LoginOKDialog.qml + qml/FailDialog.qml assets/icon/png/black/vpn_off.png assets/icon/png/black/vpn_on.png diff --git a/gui/providers/providers.json b/gui/providers/providers.json index e0c52b87..8cbfbc0f 100644 --- a/gui/providers/providers.json +++ b/gui/providers/providers.json @@ -18,4 +18,4 @@ "timeStamp": "2020-09-08 03:42:39" } ] -} \ No newline at end of file +} diff --git a/gui/qml/FailDialog.qml b/gui/qml/FailDialog.qml new file mode 100644 index 00000000..3da421bf --- /dev/null +++ b/gui/qml/FailDialog.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 +import QtQuick.Dialogs 1.2 + +MessageDialog { + title: qsTr("Initialization Error") + modality: Qt.NonModal + text: "" + onAccepted: retryOrQuit() + onRejected: retryOrQuit() + + Component.onCompleted: { + buttons: MessageDialog.Ok + } + + function retryOrQuit() { + if (ctx.loginDialog == 'true') { + login.visible = true + } else { + backend.quit() + } + } +} + diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml index 897081b7..44a1d793 100644 --- a/gui/qml/LoginDialog.qml +++ b/gui/qml/LoginDialog.qml @@ -5,10 +5,15 @@ import QtQuick.Controls 1.4 Dialog { standardButtons: StandardButton.Ok title: qsTr("Login") + Column { anchors.fill: parent Text { - text: qsTr("Log in with your library credentials") + text: getLoginText() + font.bold: true + } + Text { + text: getDetailedText() } TextField { id: username @@ -25,4 +30,16 @@ Dialog { visible: false onAccepted: backend.login(username.text, password.text) onRejected: backend.quit() + + function getLoginText() { + if (allowEmptyPass) { + return qsTr("Enter your Patron ID") + } else { + return qsTr("Log in with your library credentials") + } + } + + function getDetailedText() { + return qsTr("You can check your Patron ID number in the back of your library card") + } } diff --git a/gui/qml/main.qml b/gui/qml/main.qml index f0303452..4d0e648c 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -37,16 +37,30 @@ ApplicationWindow { } else if ( ctx.errors == "nopolkit" ) { showInitFailure(qsTr("Could not find polkit agent.")) } else { - //: %1 -> application name - //: %2 -> error string - showInitFailure(qsTr("Got an error starting %1: %2").arg(ctx.appName).arg(ctx.errors)) - console.debug(ctx.errors) + showInitFailure() } } } } function showInitFailure(msg) { + console.debug("ERRORS:", ctx.errors) + if (msg == undefined) { + if (ctx.errors == 'bad_auth') { + if (allowEmptyPass) { + // For now, this is a libraryVPN, so we can be explicit about what credentials are here. + // Another option to consider is to customize the error strings while vendoring. + msg = qsTr("Please check your Patron ID") + } else { + msg = qsTr("Could not log in with those credentials, please retry") + } + initFailure.title = qsTr("Login Error") + } else { + //: %1 -> application name + //: %2 -> error string + msg = qsTr("Got an error starting %1: %2").arg(ctx.appName).arg(ctx.errors) + } + } initFailure.text = msg initFailure.visible = true } @@ -249,6 +263,7 @@ ApplicationWindow { id: about visible: false } + LoginDialog { id: login @@ -279,22 +294,8 @@ ApplicationWindow { visible: false } - MessageDialog { + FailDialog { id: initFailure - buttons: MessageDialog.Ok - modality: Qt.NonModal - title: qsTr("Initialization Error") - text: "" visible: false - onAccepted: retryOrQuit() - onRejected: retryOrQuit() - - function retryOrQuit() { - if (ctx.loginDialog == 'true') { - login.visible = true - } else { - backend.quit() - } - } } } From 0c9db951e507488089a4f751b360e09bfaee1dac Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 17:46:09 +0200 Subject: [PATCH 083/174] [feat] be more precise when login gives 502 --- gui/qml/main.qml | 6 +++++- pkg/backend/api.go | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 4d0e648c..fc47be0d 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -46,7 +46,11 @@ ApplicationWindow { function showInitFailure(msg) { console.debug("ERRORS:", ctx.errors) if (msg == undefined) { - if (ctx.errors == 'bad_auth') { + if (ctx.errors == 'bad_auth_502') { + msg = qsTr("Oops! The authentication service seems down. Please try again later") + initFailure.title = qsTr("Service Error") + } + else if (ctx.errors == 'bad_auth') { if (allowEmptyPass) { // For now, this is a libraryVPN, so we can be explicit about what credentials are here. // Another option to consider is to customize the error strings while vendoring. diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 1985e6b0..ea148f77 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -18,7 +18,11 @@ func Login(username, password string) { success, err := ctx.bm.DoLogin(username, password) if err != nil { log.Printf("Error on login: %v", err) - ctx.Errors = "bad_auth" + if err.Error() == "Cannot get token: Error 502" { + ctx.Errors = "bad_auth_502" + } else { + ctx.Errors = "bad_auth" + } } else if success { log.Printf("Logged in as %s", username) ctx.LoginOk = true From 55526b1d6d9cf53e6e761335e37f07c7208a13e6 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 19:55:48 +0200 Subject: [PATCH 084/174] [refactor] remove unused script --- branding/scripts/vendorize.py | 95 ----------------------------------- 1 file changed, 95 deletions(-) delete mode 100755 branding/scripts/vendorize.py diff --git a/branding/scripts/vendorize.py b/branding/scripts/vendorize.py deleted file mode 100755 index 28c5d2a7..00000000 --- a/branding/scripts/vendorize.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python3 - -# TODO: to be deprecated! use gen-providers-json.py instead - -import os -import sys - -from string import Template -import configparser - -from provider import getDefaultProvider -from provider import getProviderData - -OUTFILE = 'config.go' -INFILE = '../templates/bitmaskvpn/config.go' -CONFIGFILE = '../config/vendor.conf' -SCRIPT_NAME = 'vendorize' - - -def addCaData(data, configfile): - provider = data.get('name').lower() - folder, f = os.path.split(configfile) - caFile = os.path.join(folder, provider + '-ca.crt') - if not os.path.isfile(caFile): - bail('[!] Cannot find CA file in {path}'.format(path=caFile)) - with open(caFile) as ca: - data['caCertString'] = ca.read().strip() - - -def writeOutput(data, infile, outfile): - - with open(infile) as infile: - s = Template(infile.read()) - - with open(outfile, 'w') as outf: - outf.write(s.substitute(data)) - - -def bail(msg=None): - if not msg: - print('Usage: {scriptname}.py