xray

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 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 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 BaseOutbound

type BaseOutbound 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:"-"`
}

type Config

type Config struct {
	Policy    *Policy                `json:"policy"`
	Log       *Log                   `json:"log"`
	Inbounds  []*Inbound             `json:"inbounds"`
	Outbounds []*ShadowsocksOutbound `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 OutboundSettings

type OutboundSettings struct {
	Servers []*ShadowsocksServer `json:"servers"`
}

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 ShadowsocksOutbound

type ShadowsocksOutbound struct {
	BaseOutbound
	Settings       *OutboundSettings `json:"settings"`
	StreamSettings *StreamSettings   `json:"streamSettings"`
	Mux            *Mux              `json:"mux"`
}

func (ShadowsocksOutbound) PrettyComment added in v0.0.5

func (o ShadowsocksOutbound) PrettyComment() string

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"`
}

type Sniffing

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

type StreamSettings

type StreamSettings struct {
	Network string `json:"network"`
}

type System

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

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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