platform: Improve interface

This commit is contained in:
世界
2026-01-04 02:53:33 +08:00
parent 7d2944eba9
commit 0caebd3171
12 changed files with 213 additions and 908 deletions

View File

@@ -121,6 +121,7 @@ func (r *Router) Start(stage adapter.StartStage) error {
if C.IsAndroid && r.platformInterface != nil {
needFindProcess = true
}
r.needFindProcess = needFindProcess
if needFindProcess {
if r.platformInterface != nil && r.platformInterface.UsePlatformConnectionOwnerFinder() {
r.processSearcher = newPlatformSearcher(r.platformInterface)
@@ -201,6 +202,10 @@ func (r *Router) AppendTracker(tracker adapter.ConnectionTracker) {
r.trackers = append(r.trackers, tracker)
}
func (r *Router) NeedFindProcess() bool {
return r.needFindProcess
}
func (r *Router) ResetNetwork() {
r.network.ResetNetwork()
r.dns.ResetNetwork()