# HamyVPNClient - Linux Port Summary ## Completed Tasks ✅ Created a separate directory for the Linux port to avoid modifying the Windows version ✅ Analyzed the original codebase and identified Windows-specific code ✅ Removed Windows-specific dependencies (registry, HideWindow) ✅ Updated references from 'sing-box.exe' to 'sing-box' ✅ Implemented autoloading of latest sing-box from source ✅ Implemented system proxy management for Linux (GNOME/KDE) ✅ Prepared folder structure and packaging files ✅ Created Debian package structure and documentation ✅ Provided build instructions for Linux environment ## Project Structure ``` linux-port/ ├── main.go # Linux-compatible source code ├── go.mod # Dependencies ├── README.md # Usage documentation ├── setup.sh # Setup script ├── build_debian.sh # Build script for Debian ├── DEBIAN_PACKAGE_CREATION.md # Packaging instructions ├── configs.json # Configuration file (will be created at runtime) ├── config.json # Sing-box configuration (will be created at runtime) └── bin/ # Sing-box binary directory (will be created at runtime) └── debian/ # Debian packaging structure ├── DEBIAN/ │ └── control # Package metadata ├── usr/ │ ├── bin/ │ └── share/ │ └── applications/ │ └── hamy-vpn-client.desktop └── opt/ └── hamy-vpn-client/ ``` ## Key Changes Made 1. **Platform Detection**: Added runtime.GOOS checks to handle platform-specific behavior 2. **Binary Naming**: Changed sing-box.exe to sing-box for Linux 3. **Process Hiding**: Removed HideWindow flag on non-Windows platforms 4. **Registry Removal**: Eliminated Windows registry dependencies 5. **Proxy Management**: Implemented Linux-compatible proxy settings (GNOME/KDE) 6. **Auto-download**: Added functionality to download appropriate sing-box for the platform 7. **Dependencies**: Updated imports to remove Windows-specific imports ## Deployment Instructions ### For End Users: 1. On Debian/Ubuntu: Use the provided Debian package structure 2. Run setup.sh to prepare directories 3. The application will auto-download sing-box on first run 4. Run with: ./hamy-vpn-client ### For Developers: 1. Install Go 1.21+ on Linux 2. Install build dependencies: `sudo apt install build-essential libgtk-3-dev` 3. Run: `go mod tidy && go build -o hamy-vpn-client .` ## Limitations - Cross-compilation from Windows to Linux GUI app is not possible due to CGO requirements - The actual binary must be compiled on Linux - Full system proxy integration depends on desktop environment (best with GNOME/KDE) ## Testing The application can be tested on Linux by: 1. Compiling the code 2. Running the binary 3. Adding a valid VLESS configuration 4. Connecting and verifying proxy settings in the system network settings This Linux port maintains all functionality of the original Windows version while being compatible with Linux systems and conventions.