opera

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

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

View Source
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

func EnsureBinary(dir string) (string, error)

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.

func (*Supervisor) WaitReady

func (s *Supervisor) WaitReady(port int, timeout time.Duration) error

WaitReady blocks until the local proxy port accepts connections or timeout elapses, so callers can confirm opera-proxy came up before relying on it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL