Initial Navis client with NaiveProxy, profiles, ping and git updates
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"vpnclient/internal/config"
|
||||
)
|
||||
|
||||
// Engine runs one protocol backend (e.g. official naive.exe).
|
||||
type Engine interface {
|
||||
Protocol() config.Protocol
|
||||
Start(ctx context.Context, profile config.Profile, binDir string) error
|
||||
Stop() error
|
||||
Running() bool
|
||||
LocalHTTPProxy() (hostPort string, ok bool)
|
||||
LocalSOCKSProxy() (hostPort string, ok bool)
|
||||
}
|
||||
|
||||
// Status is a snapshot of the connection manager.
|
||||
type Status struct {
|
||||
Connected bool `json:"connected"`
|
||||
Profile string `json:"profile,omitempty"`
|
||||
Protocol config.Protocol `json:"protocol,omitempty"`
|
||||
HTTPProxy string `json:"http_proxy,omitempty"`
|
||||
SOCKSProxy string `json:"socks_proxy,omitempty"`
|
||||
SystemProxy bool `json:"system_proxy"`
|
||||
Extra map[string]string `json:"extra,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user