Przeglądaj źródła

feat: add version variation to reduce statistical fingerprinting

Co-authored-by: RPRX <[email protected]>
copilot-swe-agent[bot] 4 miesięcy temu
rodzic
commit
79d0d3f184
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      common/utils/browser.go

+ 10 - 0
common/utils/browser.go

@@ -3,6 +3,8 @@ package utils
 import (
 	"strconv"
 	"time"
+
+	"github.com/xtls/xray-core/core"
 )
 
 func ChromeVersion() int {
@@ -11,6 +13,14 @@ func ChromeVersion() int {
 	if ver < 143 {
 		ver = 143
 	}
+	// Add variation based on core version to reduce statistical fingerprinting
+	if (core.Version_x+core.Version_y+core.Version_z)%2 == 1 {
+		if now.Day() < 15 {
+			ver--
+		} else {
+			ver++
+		}
+	}
 	return ver
 }