trojan

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTrojan

func NewTrojan(link string, opt *dialer.GlobalOption) (*dialer.Dialer, error)

func NewTrojanFromClashObj

func NewTrojanFromClashObj(o *yaml.Node, opt *dialer.GlobalOption) (*dialer.Dialer, error)

Types

type Trojan

type Trojan struct {
	Name          string `json:"name"`
	Server        string `json:"server"`
	Port          int    `json:"port"`
	Password      string `json:"password"`
	Sni           string `json:"sni"`
	Type          string `json:"type"`
	Encryption    string `json:"encryption"`
	Host          string `json:"host"`
	Path          string `json:"path"`
	ServiceName   string `json:"serviceName"`
	AllowInsecure bool   `json:"allowInsecure"`
	Protocol      string `json:"protocol"`
}

func ParseClash

func ParseClash(o *yaml.Node) (data *Trojan, err error)

func ParseTrojanURL

func ParseTrojanURL(u string) (data *Trojan, err error)

func (*Trojan) Dialer

func (s *Trojan) Dialer() (*dialer.Dialer, error)

func (*Trojan) ExportToURL

func (t *Trojan) ExportToURL() string

Jump to

Keyboard shortcuts

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