Documentation
¶
Overview ¶
Package opera manages the opera-proxy helper binary: a standalone Opera VPN client that exposes a local HTTP proxy. The panel runs it under a supervisor and adds it as the "opera" Xray routing lane (parallel to Cloudflare WARP).
Index ¶
Constants ¶
const PinnedVersion = "v1.25.0"
PinnedVersion is the opera-proxy release auto-downloaded when no binary is present. Pinned (not "latest") so a release can't silently change behaviour.
Variables ¶
This section is empty.
Functions ¶
func EnsureBinary ¶
EnsureBinary returns the path to an opera-proxy binary in dir, downloading the pinned release there if one isn't already present and executable.
Types ¶
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor runs the opera-proxy helper as a child process, restarting it on unexpected exit. It can be reconfigured (region/port) at runtime: Start replaces any running instance, Stop terminates it and disables restarts.
func New ¶
func New(binPath string) *Supervisor
New builds a supervisor for the opera-proxy binary at binPath.
func (*Supervisor) Running ¶
func (s *Supervisor) Running() bool
Running reports whether an opera-proxy process is currently alive.
func (*Supervisor) Start ¶
func (s *Supervisor) Start(country string, port int) error
Start launches opera-proxy bound to 127.0.0.1:port for the given Opera VPN region, replacing any instance already running.
func (*Supervisor) Stop ¶
func (s *Supervisor) Stop()
Stop terminates opera-proxy and disables auto-restart.