mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 06:08:34 +00:00
platform: Add http proxy support for Windows
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/sagernet/sing-box/adapter"
|
||||
"github.com/sagernet/sing-box/daemon"
|
||||
)
|
||||
|
||||
type daemonPlatform interface {
|
||||
adapter.PlatformInterface
|
||||
PrepareOwner(identity peerIdentity) error
|
||||
RestoreOwner(state ownerState) error
|
||||
ReleaseOwner() error
|
||||
ResetPlatformOptions() error
|
||||
SetSystemProxyPreference(enabled bool)
|
||||
SystemProxyStatus() (*daemon.SystemProxyStatus, error)
|
||||
SetSystemProxyEnabled(enabled bool) error
|
||||
HandleSessionChange(eventType uint32, sessionID uint32, state ownerState) (uint32, bool, error)
|
||||
Close() error
|
||||
}
|
||||
|
||||
func (d *Daemon) preparePlatformOwnerLocked(identity peerIdentity) error {
|
||||
if d.platform == nil {
|
||||
return nil
|
||||
}
|
||||
return d.platform.PrepareOwner(identity)
|
||||
}
|
||||
Reference in New Issue
Block a user