Skip to content

Commit

Permalink
Remove QT, use Wails. Prepared a pre release for Windows
Browse files Browse the repository at this point in the history
Removed QT framework due to complex build system.
Use Wails https://github.com/wailsapp/wails
Remove using config files, use Boltdb https://github.com/etcd-io/bbolt to store configuration application

Bugs:
In windows version there is a DNS leak, create issue OpenVPN/openvpn3#253

What need to do:
Notification missing, need merge pull request wailsapp/wails#2206
  • Loading branch information
Vai3soh committed Jan 2, 2023
1 parent 5cf65b0 commit f99ea7c
Show file tree
Hide file tree
Showing 77 changed files with 4,819 additions and 1,621 deletions.
7 changes: 7 additions & 0 deletions .chglog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conventional-commits: false
deb:
distribution: []
urgency: ""
debug: false
owner: ""
package-name: ""
55 changes: 47 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,47 @@
8f915f9 (tag: v1.0.2) Add menu `update configs`, refresh combobox without restart soft
27ae224 Add submodule 'github.com/Vai3soh/go-openvpn/' Correct build app with update library libopenvpn3
284a43b Update readme
8888862 Prepare for v1.0.1 release
272e231 (tag: v1.0.1) Fix bug crash app if use systemd true
89e3746 Update Readme.md
d714ef0 Update Readme.md
b4e1167 Update Readme.md

1.0.2
=============
2022-08-10

* Add menu `update configs`, refresh combobox without restart soft (8f915f95)
* Add submodule 'github.com/Vai3soh/go-openvpn/' (27ae2241)
* Update readme (284a43b2)
* Prepare for v1.0.1 release (88888625)

1.0.1
=============
2022-04-15

* Fix bug crash app if use systemd true (272e2316)
* Update Readme.md (89e37469)
* Update Readme.md (d714ef0f)
* Update Readme.md (b4e1167b)

1.0.0
=============
2022-03-08

* Update Readme.md (ff569857)
* Update Readme.md (9d3bde71)
* Add instruction to run appimage (99a61d51)
* Add make directives, add build packages with nfpm (2f0d6cb1)
* Generate mock test (39799eaf)
* Add files,script to appimage build (920e586e)
* Add dockerfile, license, how to in readme, and more (f6385146)
* Minor changes (7b37d7dc)
* Fix panic negative WaitGroup counter, remove stop sync.WaitGroup (cda909ca)
* Add package openvpn3 from https://github.com/mysteriumnetwork/go-openvpn/tree/master/openvpn3 (188cc871)
* Add package for logging (cf888562)
* Move cmd/goovpn to cmd/app (8d27bb5b)
* Add usecase logics, interfaces, and logics start stop openvpn (4b18ba57)
* Add package, session start disconnect from openvpn server (31305ee3)
* Add logics QT view application (80cc3866)
* Add package for correctly stopping the application (556df8bb)
* Add package - storing profiles in memory. (13657106)
* Add package necessary for config changes(openvpn config). And create test for package. (13889e52)
* Сreating extended versions of modules cmd and file. (5715ca08)
* Create entry point, main() app. (da8bcb1b)
* Add variable icons to application. (0cfdceb8)
* Add entity and create config application. (4ef20cd7)


682 changes: 661 additions & 21 deletions LICENSE.md

Large diffs are not rendered by default.

32 changes: 13 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
CONTAINER_PATH := /home/user/work/src/github.com/Vai3soh/cmd/app/deploy/linux/app
project_name = $(notdir $(shell pwd))
main_path = ./cmd/app
submodule_path := third_party/go-openvpn

generate: mock-gen

mock-gen:
@rm -rf ./test/mocks/packages
@go generate ./...

build_docker:
git submodule update --init
cd $(submodule_path) && git checkout goovpn_dev && \
scripts/xgo_run.sh scripts/build-bridge.sh && cd -
cp $(submodule_path)/openvpn3/bridge/libopenvpn3_linux_amd64.a pkg/openvpn3/bridge/
@docker pull therecipe/qt:linux_static
@docker build -t goovpn:latest -f Dockerfile .
@docker run --name goovpn goovpn:latest
@docker cp goovpn:$(CONTAINER_PATH) $(main_path)/$(project_name)
@docker stop goovpn
@docker rm goovpn
@docker image rm goovpn:latest
@docker image rm therecipe/qt:linux_static
rm -rf $(submodule_path)
build_bin_linux:
cd $(main_path) && wails build -platform linux/amd64

build_bin_windows:
cd $(main_path) && CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++-posix wails build -platform windows/amd64 -skipbindings -ldflags "-linkmode external -extldflags -static"

build_debug_race:
cd $(main_path) && wails build -debug -race

build_package:
@nfpm package -t ./build/package -p deb
Expand All @@ -35,7 +27,9 @@ fmt:
gofmt -s -w .

clean:
@rm -rf $(main_path)/$(project_name)

@rm -rf ./build/bin/goovpn ./build/bin/goovpn.exe
changelog_update:
git log v1.0.0...v1.0.2 --oneline --decorate > CHANGELOG.md
rm -rf changelog.yml
chglog init
chglog format --template repo > CHANGELOG.md
44 changes: 24 additions & 20 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
Goovpn

This gui openvpn client for linux.
This gui openvpn client for linux, windows.
Program uses the following libraries:

| Package | Changes commits
| ----------------------------------------- | ----------------------------------------
| github.com/mysteriumnetwork/go-openvpn | 7ec797ccb0654e1ecc5459b1199471afcf2e9554
| github.com/therecipe/qt |
| github.com/Vai3soh/ovpncli (core) |
| github.com/wailsapp/wails |
| github.com/fangdingjun/go-log/v5 |


Build:

```git clone --recurse-submodules github.com/Vai3soh/goovpn```
```git clone github.com/Vai3soh/goovpn```

Build binary with docker:
```make build_docker```
Build binary:
linux:
```make build_bin_linux```
windows:
```make build_bin_windows```

And then run build(deb/rpm package):
```make build_package```
Expand All @@ -27,23 +31,17 @@ Download deb, rpm, appimage package in realese:
```github.com/Vai3soh/goovpn/releases```

Install package:
```sudo dpkg -i goovpn_1.0.0_amd64.deb or sudo dnf goovpn-1.0.0.x86_64.rpm```
```sudo dpkg -i goovpn_1.0.3_amd64.deb or sudo dnf goovpn-1.0.3.x86_64.rpm```

After install run:
```sudo edit /etc/goovpn/config.yml```

and modify path to configs dir (configs_path: '~/ovpnconfigs/')
Run soft ```goovpn``` and modify path to configs dir (option ```Configs dir path```)
add path to current user aka: ```/home/user/ovpnconfigs```,
create dir ```mkdir /home/user/ovpnconfigs```,
move your openvpn configs files to this dir and run program:

1. From terminal: ```goovpn -config /etc/goovpn/config.yml```
2. From menu in DE

If use Goovpn-x86_64.AppImage, config file is located ```~/.config/goovpn/config.yml```
move your openvpn configs files to this dir.

DNS query:
1. If your distr with systemd, modify config directive ```use_systemd: false``` set ```use_systemd: true``` and install ```systemd-resolve```.
1. If your distr with systemd, enable the option ```Use systemd``` and install ```systemd-resolve```.

After restart unit systemd-resolved, your ```/etc/resolv.conf```
```
Expand Down Expand Up @@ -73,11 +71,17 @@ Current DNS Server: 10.211.254.254
DNS Servers: 10.211.254.254 8.8.8.8
DNS Domain: ~.
```
2. If use ```use_systemd: false``` install ```resolvconf```

2. If system not use systemd disable ```Use systemd``` install ```resolvconf```

For windows OS (dependencies):
install webview2: https://developer.microsoft.com/en-us/microsoft-edge/webview2/
install tap or wintun driver:
go to ```https://swupdate.openvpn.org/community/releases/OpenVPN-2.5.8-I604-amd64.msi``` download installer
run and custom install only tap and wintun driver.

Screenshot:


![Data_Label](https://raw.githubusercontent.com/Vai3soh/goovpn/master/goovpn_screen.png)

![Data_Label](https://raw.githubusercontent.com/Vai3soh/goovpn/master/goovpn_screen1.png)
![Data_Label](https://raw.githubusercontent.com/Vai3soh/goovpn/master/goovpn_screen2.png)

35 changes: 35 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Build Directory

The build directory is used to house all the build files and assets for your application.

The structure is:

* bin - Output directory
* darwin - macOS specific files
* windows - Windows specific files

## Mac

The `darwin` directory holds files specific to Mac builds.
These may be customised and used as part of the build. To return these files to the default state, simply delete them
and
build with `wails build`.

The directory contains the following files:

- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.

## Windows

The `windows` directory contains the manifest and rc files used when building with `wails build`.
These may be customised for your application. To return these files to the default state, simply delete them and
build with `wails build`.

- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
will be created using the `appicon.png` file in the build directory.
- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
as well as the application itself (right click the exe -> properties -> details)
- `wails.exe.manifest` - The main application manifest file.
Binary file added build/appicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions build/darwin/Info.dev.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>{{.Info.ProductName}}</string>
<key>CFBundleExecutable</key>
<string>{{.Name}}</string>
<key>CFBundleIdentifier</key>
<string>com.wails.{{.Name}}</string>
<key>CFBundleVersion</key>
<string>{{.Info.ProductVersion}}</string>
<key>CFBundleGetInfoString</key>
<string>{{.Info.Comments}}</string>
<key>CFBundleShortVersionString</key>
<string>{{.Info.ProductVersion}}</string>
<key>CFBundleIconFile</key>
<string>iconfile</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>{{.Info.Copyright}}</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
</dict>
</plist>
27 changes: 27 additions & 0 deletions build/darwin/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>{{.Info.ProductName}}</string>
<key>CFBundleExecutable</key>
<string>{{.Name}}</string>
<key>CFBundleIdentifier</key>
<string>com.wails.{{.Name}}</string>
<key>CFBundleVersion</key>
<string>{{.Info.ProductVersion}}</string>
<key>CFBundleGetInfoString</key>
<string>{{.Info.Comments}}</string>
<key>CFBundleShortVersionString</key>
<string>{{.Info.ProductVersion}}</string>
<key>CFBundleIconFile</key>
<string>iconfile</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>{{.Info.Copyright}}</string>
</dict>
</plist>
23 changes: 0 additions & 23 deletions build/docker/linux/Dockerfile.linux

This file was deleted.

48 changes: 0 additions & 48 deletions build/docker/windows_64_static/Dockerfile

This file was deleted.

31 changes: 0 additions & 31 deletions build/docker/windows_64_static/Dockerfile.base

This file was deleted.

Loading

0 comments on commit f99ea7c

Please sign in to comment.