Enhance VPN health checks and connectivity validation

- **README.md**: Added a 'Fork Features' section to highlight new enhancements like Google health checks, IP validation, and program termination for VPN health checks.
- **main.go**: Integrated new health check logic.
- **http.go**: Added 'responseWith' function and imported 'strconv' for better HTTP response handling.
- **wireguard.go**:
  - Added imports for 'log', 'os', 'strings', and 'time'.
  - Enhanced 'StartWireguard' with handshake verification and Google connectivity checks.
  - Implemented program termination on critical check failures.
- **utils.go**:
  - Renamed from 'util.go'.
  - Added 'CheckGoogleConnectivity' and 'checkIP' functions for external connectivity validation.
- **config.go**: No changes.
- **net.go**: No changes.
- **routine.go**: No changes.

These updates improve the reliability, security, and maintainability of the WireGuard VPN management system by ensuring proper connectivity and health checks.
This commit is contained in:
Yigit Konur 2024-07-05 12:32:12 +01:00
parent e749217090
commit 1805406a04
9 changed files with 154 additions and 31 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@
/.idea
.goreleaser.yml
*.conf
.DS_Store
*/.DS_Store