23 lines
855 B
Go
23 lines
855 B
Go
// Package vpnmode implements "Режим VPN": a wintun TUN device that captures
|
|
// ALL system traffic (apps/games included) and feeds it into the local SOCKS
|
|
// proxy of the active protocol engine via the embedded tun2socks stack.
|
|
//
|
|
// Windows-only for now. On other platforms Supported() returns false and the
|
|
// UI hides the switch (no fake toggle).
|
|
package vpnmode
|
|
|
|
import "io"
|
|
|
|
// Config describes one VPN-mode session.
|
|
type Config struct {
|
|
// SOCKSAddr is the host:port of the running local SOCKS5 proxy.
|
|
SOCKSAddr string
|
|
// ExcludeHosts are VPN server endpoints (host names or IPs) that must
|
|
// bypass the TUN default route, otherwise the tunnel would loop.
|
|
ExcludeHosts []string
|
|
// DNSServers go through the tunnel (default 1.1.1.1 + 8.8.8.8).
|
|
DNSServers []string
|
|
// Stderr receives diagnostic messages (may be nil).
|
|
Stderr io.Writer
|
|
}
|