This repository contains the Niceland VPN desktop application.
Anyone is welcome to contribute, just fork and make a pull request, or you can ask to become a collaborator.
If you are running NicelandVPN on Linux, you might need to disable GPU acceleration. That can be done by running Niceland with the -disableGPU flag
$ ./NicelandVPN -disableGPU
- install nodejs and npm
- install npm packages for the frontend
$ cd [PROJECT_ROOT]/frontend
$ npm install
- install golang
- install wails.io
- build the app
$ cd [PROJECT_ROOT]
wails build -webview2 embed
- the final build product can be found inside the build/bin folder
- install nodejs and npm
- install npm packages for the frontend
$ cd [PROJECT_ROOT]/frontend
$ npm install
- install Golang
- install Wails.io
- start the Wails development server
- NOTE: before starting the server we recommend setting ENABLE_INTERFACE to false in the main.go file. This will prevent Wails from initializing the default tunnel tap interface every time it reloads due to changes in files.
$ cd [PROJECT_ROOT]
wails dev
- Indentation: 1 Tab.
- Naming should follow a Camel Case convention. Some exceptions may apply.
- build/bin: final build products
- build/windows-custom: Windows build staging grounds, build scripts, sign scripts, etc.
- build/darwin-custom: MacOs build staging grounds, sign scripts, .app files, etc.
- core: the code for the VPN client
- frontend/src: The GUI source files
- frontend/Wailsjs: Wails.io generated javascript files
- launcher: MacOS-specific launching mechanism
- parking: code examples that might be interesting to look at/use later.
- Yes, there are race conditions. Most of them are on purpose. If you want to fix race conditions, then please create an issue first so we can discuss it.
- Avoid using Locks or sync maps whenever possible.
- Sacrificing memory for performance is generally accepted, however, we do not want to use up too much memory. Changes that implement this trade-off need to be evaluated.
- Niceland has a few async routines that manage the state, and we would like to keep these routines to a minimum. If you want to implement something that needs to happen on an interval, it should preferably be implemented in the "StateMaintenance" routine.
-
Custom functions and methods should start with an uppercase letter.
-
Import are sorted by type:
- ReactJS imports
- Modules from NPM
- Wails / Golang bindings
- Internal components and libraries
-
We want to keep the complexity of this project to a minimum. Any ReactJS functionality that is not generally accepted will need to be reviewed on a per-case basis.
-
ReactJS functionality that is generally accepted:
- useState
- useEffect
- useNavigate
- No copy/paste from machine learning tools.
Pull requests should have a short descriptive title and a long description when needed, listing everything that has been modified or added, but more importantly why it was modified or added.