From 0699e5aa70406cfcc8933ac791e06d908776faa4 Mon Sep 17 00:00:00 2001
From: nite07 <admin@nite07.com>
Date: Sun, 20 Oct 2024 19:05:22 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Modify=20templates?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 merge-templates.sh              |  3 +++
 templates/example-linux.json    | 11 ++++++-----
 templates/example-windows.json  | 11 ++++++-----
 templates/linux/dns.json        |  8 +++++---
 templates/linux/inbounds.json   |  1 -
 templates/windows/dns.json      |  8 +++++---
 templates/windows/inbounds.json |  1 -
 7 files changed, 25 insertions(+), 18 deletions(-)
 create mode 100755 merge-templates.sh

diff --git a/merge-templates.sh b/merge-templates.sh
new file mode 100755
index 0000000..3549d3d
--- /dev/null
+++ b/merge-templates.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+sing-box merge -C ./templates/windows ./templates/example-windows.json
+sing-box merge -C ./templates/linux ./templates/example-linux.json
diff --git a/templates/example-linux.json b/templates/example-linux.json
index 18d8a0d..b698cfd 100644
--- a/templates/example-linux.json
+++ b/templates/example-linux.json
@@ -7,8 +7,10 @@
     "servers": [
       {
         "tag": "google",
-        "address": "tls://8.8.8.8",
-        "detour": "default"
+        "address": "https://dns.google/dns-query",
+        "address_resolver": "local",
+        "address_strategy": "prefer_ipv4",
+        "client_subnet": "114.114.114.114/24"
       },
       {
         "tag": "local",
@@ -57,7 +59,7 @@
         "client_subnet": "114.114.114.114/24"
       }
     ],
-    "final": "local"
+    "final": "google"
   },
   "inbounds": [
     {
@@ -70,8 +72,7 @@
       "auto_redirect": true,
       "strict_route": true,
       "exclude_interface": "tailscale0",
-      "sniff": true,
-      "sniff_override_destination": true
+      "sniff": true
     }
   ],
   "outbounds": [
diff --git a/templates/example-windows.json b/templates/example-windows.json
index b3d109b..212ed6f 100644
--- a/templates/example-windows.json
+++ b/templates/example-windows.json
@@ -7,8 +7,10 @@
     "servers": [
       {
         "tag": "google",
-        "address": "tls://8.8.8.8",
-        "detour": "default"
+        "address": "https://dns.google/dns-query",
+        "address_resolver": "local",
+        "address_strategy": "prefer_ipv4",
+        "client_subnet": "114.114.114.114/24"
       },
       {
         "tag": "local",
@@ -57,7 +59,7 @@
         "client_subnet": "114.114.114.114/24"
       }
     ],
-    "final": "local"
+    "final": "google"
   },
   "inbounds": [
     {
@@ -69,8 +71,7 @@
       "auto_route": true,
       "strict_route": true,
       "exclude_interface": "tailscale0",
-      "sniff": true,
-      "sniff_override_destination": true
+      "sniff": true
     }
   ],
   "outbounds": [
diff --git a/templates/linux/dns.json b/templates/linux/dns.json
index 2d51c85..a18b551 100644
--- a/templates/linux/dns.json
+++ b/templates/linux/dns.json
@@ -3,8 +3,10 @@
     "servers": [
       {
         "tag": "google",
-        "address": "tls://8.8.8.8",
-        "detour": "default"
+        "address": "https://dns.google/dns-query",
+        "address_resolver": "local",
+        "address_strategy": "prefer_ipv4",
+        "client_subnet": "114.114.114.114/24"
       },
       {
         "tag": "local",
@@ -53,7 +55,7 @@
         "client_subnet": "114.114.114.114/24"
       }
     ],
-    "final": "local",
+    "final": "google",
     "disable_cache": false,
     "disable_expire": false
   }
diff --git a/templates/linux/inbounds.json b/templates/linux/inbounds.json
index 350dfce..f47a6f8 100644
--- a/templates/linux/inbounds.json
+++ b/templates/linux/inbounds.json
@@ -6,7 +6,6 @@
       "auto_redirect": true,
       "strict_route": true,
       "sniff": true,
-      "sniff_override_destination": true,
       "address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"],
       "exclude_interface": ["tailscale0"]
     }
diff --git a/templates/windows/dns.json b/templates/windows/dns.json
index 2d51c85..a18b551 100644
--- a/templates/windows/dns.json
+++ b/templates/windows/dns.json
@@ -3,8 +3,10 @@
     "servers": [
       {
         "tag": "google",
-        "address": "tls://8.8.8.8",
-        "detour": "default"
+        "address": "https://dns.google/dns-query",
+        "address_resolver": "local",
+        "address_strategy": "prefer_ipv4",
+        "client_subnet": "114.114.114.114/24"
       },
       {
         "tag": "local",
@@ -53,7 +55,7 @@
         "client_subnet": "114.114.114.114/24"
       }
     ],
-    "final": "local",
+    "final": "google",
     "disable_cache": false,
     "disable_expire": false
   }
diff --git a/templates/windows/inbounds.json b/templates/windows/inbounds.json
index ec0d705..4d6b32c 100644
--- a/templates/windows/inbounds.json
+++ b/templates/windows/inbounds.json
@@ -5,7 +5,6 @@
       "auto_route": true,
       "strict_route": true,
       "sniff": true,
-      "sniff_override_destination": true,
       "address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"],
       "exclude_interface": ["tailscale0"]
     }