networkproxy1

package
v0.0.0-...-454a0ba Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.

SPDX-License-Identifier: GPL-3.0-or-later

SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.

SPDX-License-Identifier: GPL-3.0-or-later

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	proxy.Object
	// contains filtered or unexported methods
}

func NewApp

func NewApp(conn *dbus.Conn) App

type Global

type Global interface {
	proxy.Object
	// contains filtered or unexported methods
}

func NewGlobal

func NewGlobal(conn *dbus.Conn) Global

type MockApp

type MockApp struct {
	MockInterfaceApp // interface org.deepin.dde.NetworkProxy1.App
	proxy.MockObject
}

type MockGlobal

type MockGlobal struct {
	MockInterfaceGlobal // interface org.deepin.dde.NetworkProxy1.Global
	proxy.MockObject
}

type MockInterfaceApp

type MockInterfaceApp struct {
	mock.Mock
}

func (*MockInterfaceApp) AddProc

func (v *MockInterfaceApp) AddProc(flags dbus.Flags, pid int32) error

func (*MockInterfaceApp) AddProxy

func (v *MockInterfaceApp) AddProxy(flags dbus.Flags, proto string, name string, proxy []uint8) error

func (*MockInterfaceApp) AddProxyApps

func (v *MockInterfaceApp) AddProxyApps(flags dbus.Flags, app []string) error

func (*MockInterfaceApp) ClearProxy

func (v *MockInterfaceApp) ClearProxy(flags dbus.Flags) error

func (*MockInterfaceApp) ConnectProxy

func (v *MockInterfaceApp) ConnectProxy(cb func(proxy []interface{})) (dbusutil.SignalHandlerId, error)

func (*MockInterfaceApp) DelProxyApps

func (v *MockInterfaceApp) DelProxyApps(flags dbus.Flags, app []string) error

func (*MockInterfaceApp) GetCGroups

func (v *MockInterfaceApp) GetCGroups(flags dbus.Flags) (string, error)

func (*MockInterfaceApp) GetProxy

func (v *MockInterfaceApp) GetProxy(flags dbus.Flags) (string, error)

func (*MockInterfaceApp) GoAddProc

func (v *MockInterfaceApp) GoAddProc(flags dbus.Flags, ch chan *dbus.Call, pid int32) *dbus.Call

func (*MockInterfaceApp) GoAddProxy

func (v *MockInterfaceApp) GoAddProxy(flags dbus.Flags, ch chan *dbus.Call, proto string, name string, proxy []uint8) *dbus.Call

func (*MockInterfaceApp) GoAddProxyApps

func (v *MockInterfaceApp) GoAddProxyApps(flags dbus.Flags, ch chan *dbus.Call, app []string) *dbus.Call

func (*MockInterfaceApp) GoClearProxy

func (v *MockInterfaceApp) GoClearProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceApp) GoDelProxyApps

func (v *MockInterfaceApp) GoDelProxyApps(flags dbus.Flags, ch chan *dbus.Call, app []string) *dbus.Call

func (*MockInterfaceApp) GoGetCGroups

func (v *MockInterfaceApp) GoGetCGroups(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceApp) GoGetProxy

func (v *MockInterfaceApp) GoGetProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceApp) GoSetProxies

func (v *MockInterfaceApp) GoSetProxies(flags dbus.Flags, ch chan *dbus.Call, proxies []interface{}) *dbus.Call

func (*MockInterfaceApp) GoStartProxy

func (v *MockInterfaceApp) GoStartProxy(flags dbus.Flags, ch chan *dbus.Call, proto string, name string, udp bool) *dbus.Call

func (*MockInterfaceApp) GoStopProxy

func (v *MockInterfaceApp) GoStopProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceApp) SetProxies

func (v *MockInterfaceApp) SetProxies(flags dbus.Flags, proxies []interface{}) error

func (*MockInterfaceApp) StartProxy

func (v *MockInterfaceApp) StartProxy(flags dbus.Flags, proto string, name string, udp bool) error

func (*MockInterfaceApp) StopProxy

func (v *MockInterfaceApp) StopProxy(flags dbus.Flags) error

type MockInterfaceGlobal

type MockInterfaceGlobal struct {
	mock.Mock
}

func (*MockInterfaceGlobal) AddProxy

func (v *MockInterfaceGlobal) AddProxy(flags dbus.Flags, proto string, name string, proxy []uint8) error

func (*MockInterfaceGlobal) ClearProxy

func (v *MockInterfaceGlobal) ClearProxy(flags dbus.Flags) error

func (*MockInterfaceGlobal) ConnectProxy

func (v *MockInterfaceGlobal) ConnectProxy(cb func(proxy []interface{})) (dbusutil.SignalHandlerId, error)

func (*MockInterfaceGlobal) GetProxy

func (v *MockInterfaceGlobal) GetProxy(flags dbus.Flags) (string, error)

func (*MockInterfaceGlobal) GoAddProxy

func (v *MockInterfaceGlobal) GoAddProxy(flags dbus.Flags, ch chan *dbus.Call, proto string, name string, proxy []uint8) *dbus.Call

func (*MockInterfaceGlobal) GoClearProxy

func (v *MockInterfaceGlobal) GoClearProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceGlobal) GoGetProxy

func (v *MockInterfaceGlobal) GoGetProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceGlobal) GoIgnoreProxyApps

func (v *MockInterfaceGlobal) GoIgnoreProxyApps(flags dbus.Flags, ch chan *dbus.Call, app []string) *dbus.Call

func (*MockInterfaceGlobal) GoSetProxies

func (v *MockInterfaceGlobal) GoSetProxies(flags dbus.Flags, ch chan *dbus.Call, proxies []interface{}) *dbus.Call

func (*MockInterfaceGlobal) GoStartProxy

func (v *MockInterfaceGlobal) GoStartProxy(flags dbus.Flags, ch chan *dbus.Call, proto string, name string, udp bool) *dbus.Call

func (*MockInterfaceGlobal) GoStopProxy

func (v *MockInterfaceGlobal) GoStopProxy(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call

func (*MockInterfaceGlobal) GoUnIgnoreProxyApps

func (v *MockInterfaceGlobal) GoUnIgnoreProxyApps(flags dbus.Flags, ch chan *dbus.Call, app []string) *dbus.Call

func (*MockInterfaceGlobal) IgnoreApp

func (v *MockInterfaceGlobal) IgnoreApp() proxy.PropStringArray

func (*MockInterfaceGlobal) IgnoreProxyApps

func (v *MockInterfaceGlobal) IgnoreProxyApps(flags dbus.Flags, app []string) error

func (*MockInterfaceGlobal) SetProxies

func (v *MockInterfaceGlobal) SetProxies(flags dbus.Flags, proxies []interface{}) error

func (*MockInterfaceGlobal) StartProxy

func (v *MockInterfaceGlobal) StartProxy(flags dbus.Flags, proto string, name string, udp bool) error

func (*MockInterfaceGlobal) StopProxy

func (v *MockInterfaceGlobal) StopProxy(flags dbus.Flags) error

func (*MockInterfaceGlobal) UnIgnoreProxyApps

func (v *MockInterfaceGlobal) UnIgnoreProxyApps(flags dbus.Flags, app []string) error

type Proxy

type Proxy struct {
	// proxy proto type
	ProtoType string `json:"type"` // http sock4 sock5

	// [proto]&[name] as ident
	Name string `yaml:"name"`

	// proxy server
	Server string `yaml:"server"`
	Port   int    `yaml:"port"`

	// auth message
	UserName string `yaml:"username"`
	Password string `yaml:"password"`
}

Proxy type

type ScopeProxies

type ScopeProxies struct {
	Proxies map[string][]Proxy `yaml:"proxies"` // map[http,sock4,sock5][]proxy
	// proxy setting
	ProxyProgram   []string `yaml:"proxy-program"`    // global proxy will ignore
	NoProxyProgram []string `yaml:"no-proxy-program"` // app proxy will ignore

	// white list
	WhiteList []string `yaml:"whitelist"` // white site dont use proxy, not use this time
	TPort     int      `yaml:"t-port"`
}

ScopeProxies type

Jump to

Keyboard shortcuts

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