xray

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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