fix: 优化启动引导、坐标处理和日志管理

This commit is contained in:
xweiba
2026-08-06 16:23:09 +08:00
parent 0e8e83fd33
commit e86909cc2f
30 changed files with 2296 additions and 857 deletions
+12
View File
@@ -41,6 +41,18 @@ func wloccore_generateca() (r0, r1 *C.char) {
return C.CString(string(cert)), C.CString(string(key))
}
//export wloccore_validateca
func wloccore_validateca(certData, keyData *C.char) C.int {
if certData == nil || keyData == nil {
return 0
}
if _, err := parseCA([]byte(C.GoString(certData)), []byte(C.GoString(keyData))); err != nil {
logEvent("validateca failed: " + err.Error())
return 0
}
return 1
}
//export wloccore_startproxy
func wloccore_startproxy(certData, keyData *C.char, lat, lon C.double, enabled C.int, accuracy C.int) C.uintptr_t {
if certData == nil || keyData == nil {
+3 -1
View File
@@ -145,7 +145,9 @@ func newProxy(cert *tls.Certificate) *goproxy.ProxyHttpServer {
logEvent("CONNECT " + host + " -> MITM (verify)")
return mitmAction, host
}
logEvent("CONNECT " + host + " -> passthrough")
// Global Wi-Fi proxy mode sends all HTTPS CONNECT traffic here. Logging
// unrelated passthrough hosts creates high-volume noise and can disclose
// browsing destinations; diagnostics only retain WLOC and verify traffic.
return goproxy.OkConnect, host
})
}