Getting Started
This guide explains how to set up the development environment, build the projects, and run the applications.
Prerequisites
- Go: version
1.24.0or higher. - Node.js & npm: version
20or higher (required to build the web interfaces). - Rust: (optional) if compiling or checking FFI components under
rustlib.
Development Environment Setup
-
Clone the Repository:
git clone https://github.com/soda92/vpn-share-tool.git cd vpn-share-tool -
Generate Development Certificates: Before compiling, you need to generate self-signed TLS certificates for development:
go run ./dev certsThis will create a
certs/folder withca.crt,ca.key,server.crt, andserver.key. -
Install Frontend Dependencies: Install npm dependencies for both web dashboards:
# Request Debugger frontend cd core/debug_web npm install cd ../.. # Discovery Dashboard frontend cd discovery_web npm install cd ..
Building the Applications
You can compile all components using the custom development CLI tool:
-
Build the Desktop GUI Application:
go run ./dev buildThis builds the Vue frontend and compiles the final Go binary to
cmd/vpn-share-tool/vpn-share-tool. -
Build the Discovery Server:
go run ./dev build serverThis builds the server dashboard frontend and compiles the server binary to
dist/discovery. -
Build for Windows (Cross-compilation via Docker/fyne-cross):
go run ./dev build windows -
Build Linux FFI Shared Library (for Flutter):
go run ./dev build linux-so
Running the Applications
-
Start the Discovery Server:
# Run the server binary ./dist/discoveryBy default, it will listen for client connections on TCP port
45679and host the web dashboard on port8080. -
Start the Client Application:
# Run the desktop app using the dev CLI go run ./dev runThe client will boot up the cross-platform GUI, search for the local discovery server on your subnet, and establish a secure registration.