From 750abc8c714ba4ea2bbc1b874e348cb2a880bb59 Mon Sep 17 00:00:00 2001
From: kr328 <kr328app@outlook.com>
Date: Sun, 13 Jun 2021 04:22:15 +0800
Subject: [PATCH] Improve: enable system proxy by default

---
 core/src/main/golang/proxy/http.go                            | 4 +++-
 .../java/com/github/kr328/clash/service/store/ServiceStore.kt | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/src/main/golang/proxy/http.go b/core/src/main/golang/proxy/http.go
index 82034cb5..4b6d94ee 100644
--- a/core/src/main/golang/proxy/http.go
+++ b/core/src/main/golang/proxy/http.go
@@ -89,8 +89,10 @@ func (l *httpListener) handleConn(conn net.Conn) {
 	if err != nil || request.URL.Host == "" {
 		if err != nil {
 			log.Warnln("HTTP Connection closed: %s", err.Error())
+		} else {
+			log.Warnln("HTTP Connection closed: unknown host")
 		}
-		
+
 		_ = conn.Close()
 		return
 	}
diff --git a/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt b/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
index 7a997d24..c97d1200 100644
--- a/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
+++ b/service/src/main/java/com/github/kr328/clash/service/store/ServiceStore.kt
@@ -43,7 +43,7 @@ class ServiceStore(context: Context) {
 
     var systemProxy by store.boolean(
         key = "system_proxy",
-        defaultValue = false
+        defaultValue = true
     )
 
     var blockLoopback by store.boolean(
-- 
GitLab