feat: add security system with system-wide proxy, DNS protection and encryption
- System-wide proxy: automatic Windows proxy configuration for all apps - DNS leak protection: force all DNS queries through VPN - Config encryption: AES-256-GCM encryption for all config files - File protection: strict access permissions for config directory - Leak detection: built-in security check system - Kill Switch: temporarily disabled (will be improved in next version) Security features: ✓ Automatic system proxy setup ✓ DNS leak protection (optional) ✓ AES-256-GCM config encryption ✓ File and directory protection ✓ Security leak checker ⚠ Kill Switch disabled (caused internet blocking issues) Emergency recovery scripts included: - ОТКЛЮЧИТЬ_KILLSWITCH.bat - EMERGENCY_FIX_INTERNET.bat - ЕСЛИ_СЛОМАЛСЯ_ИНТЕРНЕТ.txt Documentation: - Markdown/SECURITY_GUIDE.md - full security guide - БЕЗОПАСНОСТЬ_БЫСТРЫЙ_СТАРТ.md - quick start guide - CHANGELOG_SECURITY.md - detailed changelog
This commit is contained in:
@@ -13,6 +13,22 @@ import (
|
||||
"vpn-client/internal/wireguard"
|
||||
)
|
||||
|
||||
// handleIndex обрабатывает главную страницу
|
||||
func handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprintf(w, `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>VPN Client</title>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<h1>VPN Client GUI</h1>
|
||||
<p>GUI интерфейс в разработке. Используйте CLI режим: <code>vpn-client-gui.exe --cli</code></p>
|
||||
</body>
|
||||
</html>`)
|
||||
}
|
||||
|
||||
// Запуск HTTP сервера
|
||||
func startServer() string {
|
||||
addr := "127.0.0.1:8765"
|
||||
@@ -198,7 +214,7 @@ func handleVLESSConnect(w http.ResponseWriter, r *http.Request) {
|
||||
configs, _ := config.LoadConfigs()
|
||||
if req.Index >= 0 && req.Index < len(configs.VLESS) {
|
||||
name := configs.VLESS[req.Index].Name
|
||||
err := vless.Connect(name, config.LogsDir, config.XrayDir)
|
||||
err := vless.Connect(name, config.LogsDir)
|
||||
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
"success": err == nil,
|
||||
|
||||
Reference in New Issue
Block a user