subscription

package
v0.0.0-...-e5aaa3f Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NetchClient = "netch"
View Source
const QuantumultClient = "quantumult"
View Source
const QuantumultXClient = "quantumultx"
View Source
const (
	UA = "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D100"
)
View Source
const (
	V2RayNGClient = "v2rayng"
)

Variables

This section is empty.

Functions

func BuildShadowsocks

func BuildShadowsocks(uuid string, nodes []table.Node) ([]byte, error)

func BuildShadowsocksR

func BuildShadowsocksR(_package, uuid string, nodes []table.Node) ([]byte, error)

func BuildVmess

func BuildVmess(group, client, uuid string, nodes []table.Node) ([]byte, error)

Types

type INode

type INode interface {
	Build(_type string) ([]byte, error)
}

type ISubscription

type ISubscription interface {
	Build(_type string) ([]byte, error)
}

type Netch

type Netch struct{}

type NetchVmess

type NetchVmess struct {
	Version         string `json:"v"`
	Name            string `json:"ps"`
	Host            string `json:"add"`
	Port            string `json:"port"`
	UUID            string `json:"id"`
	AlterID         string `json:"aid"`
	TLS             string `json:"tls"`
	Protocol        string `json:"type"` // none
	Obfuscation     string `json:"net"`  // ws
	ObfuscationHost string `json:"host"`
	ObfuscationPath string `json:"path"`
}

func NewNetchVmess

func NewNetchVmess(v Vmess) *NetchVmess

func (*NetchVmess) Build

func (n *NetchVmess) Build() ([]byte, error)

type QuantumultVmess

type QuantumultVmess struct {
	Name            string // tag=Sample-H
	Group           string
	Addr            string // addr=ws-c.example.com:80
	UUID            string // password=23ad6b10-8d1a-40f7-8ad0-e3e35cd32291
	Security        string // method=chacha20-ietf-poly1305
	TLS             string
	TLSSecurity     bool
	Obfuscation     string // obfs=ws
	ObfuscationHost string // obfs-host=ws-c.example.com
	ObfuscationPath string // obfs-uri=/ws
	FastOpen        string // fast-open=false
	UDPRelay        string // udp-relay=false
}

func NewQuantumultVmess

func NewQuantumultVmess(group string, v Vmess) *QuantumultVmess

func (QuantumultVmess) Build

func (c QuantumultVmess) Build() ([]byte, error)

type QuantumultXVmess

type QuantumultXVmess struct {
	Name            string // tag=Sample-H
	Addr            string // addr=ws-c.example.com:80
	UUID            string // password=23ad6b10-8d1a-40f7-8ad0-e3e35cd32291
	Security        string // method=chacha20-ietf-poly1305
	Obfuscation     string // obfs=ws
	ObfuscationHost string // obfs-host=ws-c.example.com
	ObfuscationPath string // obfs-uri=/ws
	FastOpen        string // fast-open=false
	UDPRelay        string // udp-relay=false
}

func NewQuantumultXVmess

func NewQuantumultXVmess(v Vmess) *QuantumultXVmess

func (QuantumultXVmess) Build

func (c QuantumultXVmess) Build() ([]byte, error)

type Shadowsocks

type Shadowsocks struct {
	Name        string
	Host        string
	Port        string
	Method      string
	Password    string
	Plugin      string
	PluginParam string
}

func (Shadowsocks) Build

func (ss Shadowsocks) Build() ([]byte, error)

type ShadowsocksArray

type ShadowsocksArray []Shadowsocks

func (ShadowsocksArray) Build

func (ssa ShadowsocksArray) Build() ([]byte, error)

type ShadowsocksR

type ShadowsocksR struct {
	Host             string
	Port             string
	Method           string
	Password         string
	Obfuscation      string
	ObfuscationParam string
	Protocol         string
	ProtocolParam    string
	Remarks          string
	Group            string
}

func (ShadowsocksR) Build

func (ssr ShadowsocksR) Build() ([]byte, error)

type ShadowsocksRArray

type ShadowsocksRArray []ShadowsocksR

func (ShadowsocksRArray) Build

func (ssra ShadowsocksRArray) Build() ([]byte, error)

type ShadowsocksV2Ray

type ShadowsocksV2Ray struct {
	Mode string
	Host string
	Path string
}

type V2RayNGVmess

type V2RayNGVmess struct {
	Version         string `json:"v"`
	Name            string `json:"ps"`
	Host            string `json:"add"`
	Port            string `json:"port"`
	UUID            string `json:"id"`
	AlterID         string `json:"aid"`
	TLS             string `json:"tls"`
	Protocol        string `json:"type"`
	Obfuscation     string `json:"net"`
	ObfuscationHost string `json:"host"`
	ObfuscationPath string `json:"path"`
}

func NewV2RayNGVmess

func NewV2RayNGVmess(v Vmess) *V2RayNGVmess

func (V2RayNGVmess) Build

func (v V2RayNGVmess) Build() ([]byte, error)

type Vmess

type Vmess struct {
	Name            string
	Host            string
	Port            string
	UUID            string
	Security        string
	AlertID         string
	TLS             bool
	TLSSecurity     bool
	TLSHost         string
	Obfuscation     string
	ObfuscationHost string
	ObfuscationPath string
}

func (Vmess) Build

func (v Vmess) Build(group, c string) ([]byte, error)

type VmessArray

type VmessArray []Vmess

func (VmessArray) Build

func (va VmessArray) Build(group, _client string) ([]byte, error)

Jump to

Keyboard shortcuts

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