Release 3.10.0+1: sidebar UI (Home / Profiles / Settings / Logs / About), remembered account with 50 GB monthly renew + auto-renew, Windows VPN mode (wintun + tun2socks).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,10 @@ type Config struct {
|
||||
// SystemProxy enables Windows Internet Settings / WinHTTP proxy on connect.
|
||||
SystemProxy bool `json:"system_proxy"`
|
||||
|
||||
// Mode selects traffic capture: "proxy" (default — local proxy + optional
|
||||
// system proxy) or "vpn" (Windows: TUN device, ALL traffic incl. apps/games).
|
||||
Mode string `json:"mode,omitempty"`
|
||||
|
||||
// BinDir is where protocol binaries (naive.exe / hysteria.exe) are stored.
|
||||
BinDir string `json:"bin_dir,omitempty"`
|
||||
|
||||
@@ -197,6 +201,11 @@ func stripUTF8BOM(data []byte) []byte {
|
||||
|
||||
// Validate checks required fields.
|
||||
func (c *Config) Validate() error {
|
||||
switch c.Mode {
|
||||
case "", "proxy", "vpn":
|
||||
default:
|
||||
c.Mode = "proxy"
|
||||
}
|
||||
if len(c.Profiles) == 0 {
|
||||
return fmt.Errorf("config: no profiles defined")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user