xray

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewXrayDownloadCmdRun added in v0.2.0

func NewXrayDownloadCmdRun() func(cmd *cobra.Command, args []string) error

Types

type AddressPort added in v0.2.2

type AddressPort interface {
	GetAddress() string
	GetPort() int
}

type Asset added in v0.2.0

type Asset struct {
	Url                string      `json:"url"`
	Id                 int         `json:"id"`
	NodeId             string      `json:"node_id"`
	Name               string      `json:"name"`
	Label              interface{} `json:"label"`
	Uploader           *Uploader   `json:"uploader"`
	ContentType        string      `json:"content_type"`
	State              string      `json:"state"`
	Size               int         `json:"size"`
	DownloadCount      int         `json:"download_count"`
	CreatedAt          time.Time   `json:"created_at"`
	UpdatedAt          time.Time   `json:"updated_at"`
	BrowserDownloadUrl string      `json:"browser_download_url"`
}

type Author added in v0.2.0

type Author struct {
	Login             string `json:"login"`
	Id                int    `json:"id"`
	NodeId            string `json:"node_id"`
	AvatarUrl         string `json:"avatar_url"`
	GravatarId        string `json:"gravatar_id"`
	Url               string `json:"url"`
	HtmlUrl           string `json:"html_url"`
	FollowersUrl      string `json:"followers_url"`
	FollowingUrl      string `json:"following_url"`
	GistsUrl          string `json:"gists_url"`
	StarredUrl        string `json:"starred_url"`
	SubscriptionsUrl  string `json:"subscriptions_url"`
	OrganizationsUrl  string `json:"organizations_url"`
	ReposUrl          string `json:"repos_url"`
	EventsUrl         string `json:"events_url"`
	ReceivedEventsUrl string `json:"received_events_url"`
	Type              string `json:"type"`
	SiteAdmin         bool   `json:"site_admin"`
}

type Config

type Config struct {
	Policy    *Policy     `json:"policy"`
	Log       *Log        `json:"log"`
	Inbounds  []*Inbound  `json:"inbounds"`
	Outbounds []*OutBound `json:"outbounds"`
	Routing   *Routing    `json:"routing"`
}

type DownloadConfig added in v0.2.1

type DownloadConfig struct {
	GhProxy string // gh-proxy address
}

DownloadConfig config for command: xraysub gen

type GithubLatestRelease added in v0.2.0

type GithubLatestRelease struct {
	Url             string     `json:"url"`
	AssetsUrl       string     `json:"assets_url"`
	UploadUrl       string     `json:"upload_url"`
	HtmlUrl         string     `json:"html_url"`
	Id              int        `json:"id"`
	Author          *Author    `json:"author"`
	NodeId          string     `json:"node_id"`
	TagName         string     `json:"tag_name"`
	TargetCommitish string     `json:"target_commitish"`
	Name            string     `json:"name"`
	Draft           bool       `json:"draft"`
	Prerelease      bool       `json:"prerelease"`
	CreatedAt       time.Time  `json:"created_at"`
	PublishedAt     time.Time  `json:"published_at"`
	Assets          []*Asset   `json:"assets"`
	TarballUrl      string     `json:"tarball_url"`
	ZipballUrl      string     `json:"zipball_url"`
	Body            string     `json:"body"`
	Reactions       *Reactions `json:"reactions"`
}

type Inbound

type Inbound struct {
	Tag      string           `json:"tag"`
	Port     int              `json:"port"`
	Listen   string           `json:"listen"`
	Protocol string           `json:"protocol"`
	Sniffing *Sniffing        `json:"sniffing"`
	Settings *InboundSettings `json:"settings"`
}

type InboundSettings

type InboundSettings struct {
	Auth             string `json:"auth,omitempty"`
	Udp              bool   `json:"udp"`
	AllowTransparent bool   `json:"allowTransparent"`
}

type Log

type Log struct {
	Access   string `json:"access"`
	Error    string `json:"error"`
	Loglevel string `json:"loglevel"`
}

type Mux

type Mux struct {
	Enabled     bool `json:"enabled"`
	Concurrency int  `json:"concurrency"`
}

type OutBound added in v0.2.2

type OutBound struct {
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`

	Latency        *time.Duration    `json:"-"` // server's latency
	Inbound        *Inbound          `json:"-"` // bound inbound for detecting latency
	Comment        string            `json:"-"`
	Settings       *OutboundSettings `json:"settings"`
	StreamSettings *StreamSettings   `json:"streamSettings"`
	Mux            *Mux              `json:"mux"`
}

func (OutBound) PrettyComment added in v0.2.2

func (o OutBound) PrettyComment() string

type OutboundSettings

type OutboundSettings struct {
	Servers []interface{} `json:"servers"`
	Vnext   []*Vnext      `json:"vnext"`
}

func (OutboundSettings) GetAddressPort added in v0.2.2

func (s OutboundSettings) GetAddressPort() AddressPort

type Policy

type Policy struct {
	System System `json:"system"`
}

type Reactions added in v0.2.0

type Reactions struct {
	Url        string `json:"url"`
	TotalCount int    `json:"total_count"`
	Field3     int    `json:"+1"`
	Field4     int    `json:"-1"`
	Laugh      int    `json:"laugh"`
	Hooray     int    `json:"hooray"`
	Confused   int    `json:"confused"`
	Heart      int    `json:"heart"`
	Rocket     int    `json:"rocket"`
	Eyes       int    `json:"eyes"`
}

type Routing

type Routing struct {
	DomainStrategy string  `json:"domainStrategy"`
	DomainMatcher  string  `json:"domainMatcher"`
	Rules          []*Rule `json:"rules"`
}

type Rule

type Rule struct {
	Type        string   `json:"type"`
	InboundTag  []string `json:"inboundTag,omitempty"`
	OutboundTag string   `json:"outboundTag"`
	Port        string   `json:"port,omitempty"`
}

type ShadowsocksServer

type ShadowsocksServer struct {
	Address  string `json:"address"`
	Method   string `json:"method"`
	Ota      bool   `json:"ota"`
	Password string `json:"password"`
	Port     int    `json:"port"`
	Level    int    `json:"level"`
}

func (ShadowsocksServer) GetAddress added in v0.2.2

func (s ShadowsocksServer) GetAddress() string

func (ShadowsocksServer) GetPort added in v0.2.2

func (s ShadowsocksServer) GetPort() int

type Sniffing

type Sniffing struct {
	Enabled      bool     `json:"enabled"`
	DestOverride []string `json:"destOverride"`
}

type StreamSettings

type StreamSettings struct {
	Network    string      `json:"network"`
	Security   string      `json:"security"`
	WsSettings interface{} `json:"wsSettings"`
}

type System

type System struct {
	StatsOutboundUplink   bool `json:"statsOutboundUplink"`
	StatsOutboundDownlink bool `json:"statsOutboundDownlink"`
}

type TrojanServer added in v0.2.3

type TrojanServer struct {
	Address  string `json:"address"`
	Password string `json:"password"`
	Port     int    `json:"port"`
}

func (TrojanServer) GetAddress added in v0.2.3

func (s TrojanServer) GetAddress() string

func (TrojanServer) GetPort added in v0.2.3

func (s TrojanServer) GetPort() int

type Uploader added in v0.2.0

type Uploader struct {
	Login             string `json:"login"`
	Id                int    `json:"id"`
	NodeId            string `json:"node_id"`
	AvatarUrl         string `json:"avatar_url"`
	GravatarId        string `json:"gravatar_id"`
	Url               string `json:"url"`
	HtmlUrl           string `json:"html_url"`
	FollowersUrl      string `json:"followers_url"`
	FollowingUrl      string `json:"following_url"`
	GistsUrl          string `json:"gists_url"`
	StarredUrl        string `json:"starred_url"`
	SubscriptionsUrl  string `json:"subscriptions_url"`
	OrganizationsUrl  string `json:"organizations_url"`
	ReposUrl          string `json:"repos_url"`
	EventsUrl         string `json:"events_url"`
	ReceivedEventsUrl string `json:"received_events_url"`
	Type              string `json:"type"`
	SiteAdmin         bool   `json:"site_admin"`
}

type User added in v0.2.2

type User struct {
	Id       string `json:"id"`
	AlterId  int    `json:"alterId"`
	Email    string `json:"email"`
	Security string `json:"security"`
}

type Vnext added in v0.2.2

type Vnext struct {
	Address string `json:"address"`
	Port    int    `json:"port"`
	Users   []User `json:"users"`
}

func (Vnext) GetAddress added in v0.2.2

func (v Vnext) GetAddress() string

func (Vnext) GetPort added in v0.2.2

func (v Vnext) GetPort() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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