share

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertShareLinksToXrayJson

func ConvertShareLinksToXrayJson(links string) (*conf.Config, error)

https://github.com/XTLS/Xray-core/discussions/716 Convert share text to XrayJson support v2rayN plain text, v2rayN base64 text

func ConvertXrayJsonToShareLinks(xrayBytes []byte) (string, error)

Convert XrayJson to share links. VMess will generate VMessAEAD link.

func FixWindowsReturn

func FixWindowsReturn(text string) string

Types

type ClashProxy

type ClashProxy struct {
	Name     string `yaml:"name,omitempty"`
	Type     string `yaml:"type,omitempty"`
	Server   string `yaml:"server,omitempty"`
	Port     uint16 `yaml:"port,omitempty"`
	Uuid     string `yaml:"uuid,omitempty"`
	Cipher   string `yaml:"cipher,omitempty"`
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`

	Udp bool `yaml:"udp,omitempty"`

	Tls            bool     `yaml:"tls,omitempty"`
	SkipCertVerify bool     `yaml:"skip-cert-verify,omitempty"`
	Servername     string   `yaml:"servername,omitempty"`
	Sni            string   `yaml:"sni,omitempty"`
	Alpn           []string `yaml:"alpn,omitempty"`

	Fingerprint       string                 `yaml:"fingerprint,omitempty"`
	ClientFingerprint string                 `yaml:"client-fingerprint,omitempty"`
	Flow              string                 `yaml:"flow,omitempty"`
	RealityOpts       *ClashProxyRealityOpts `yaml:"reality-opts,omitempty"`

	Network    string                `yaml:"network,omitempty"`
	Plugin     string                `yaml:"plugin,omitempty"`
	PluginOpts *ClashProxyPluginOpts `yaml:"plugin-opts,omitempty"`
	WsOpts     *ClashProxyWsOpts     `yaml:"ws-opts,omitempty"`
	SsOpts     *ClashProxySsOpts     `yaml:"ss-opts,omitempty"`

	// the below are fields of hysteria2.
	// although xray doesn't support hysteria2,
	// but someone may need them.
	Ports        string `yaml:"ports,omitempty"`
	HopInterval  int    `yaml:"hop-interval,omitempty"`
	Up           string `yaml:"up,omitempty"`
	Down         string `yaml:"down,omitempty"`
	Obfs         string `yaml:"obfs,omitempty"`
	ObfsPassword string `yaml:"obfs-password,omitempty"`
	// contains filtered or unexported fields
}

type ClashProxyGrpcOpts

type ClashProxyGrpcOpts struct {
	GrpcServiceName string `yaml:"grpc-service-name,omitempty"`
}

type ClashProxyH2Opts

type ClashProxyH2Opts struct {
	Host []string `yaml:"host,omitempty"`
	Path string   `yaml:"path,omitempty"`
}

type ClashProxyPluginOpts

type ClashProxyPluginOpts struct {
	Mode           string `yaml:"mode,omitempty"`
	Tls            bool   `yaml:"tls,omitempty"`
	Fingerprint    string `yaml:"fingerprint,omitempty"`
	SkipCertVerify bool   `yaml:"skip-cert-verify,omitempty"`
	Host           string `yaml:"host,omitempty"`
	Path           string `yaml:"path,omitempty"`
	Mux            bool   `yaml:"mux,omitempty"`
}

type ClashProxyRealityOpts

type ClashProxyRealityOpts struct {
	PublicKey string `yaml:"public-key,omitempty"`
	ShortId   string `yaml:"short-id,omitempty"`
}

type ClashProxySsOpts

type ClashProxySsOpts struct {
	Enabled  bool   `yaml:"enabled,omitempty"`
	Method   string `yaml:"method,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type ClashProxyWsOpts

type ClashProxyWsOpts struct {
	Path    string                   `yaml:"path,omitempty"`
	Headers *ClashProxyWsOptsHeaders `yaml:"headers,omitempty"`
}

type ClashProxyWsOptsHeaders

type ClashProxyWsOptsHeaders struct {
	Host string `yaml:"Host,omitempty"`
}

type ClashYaml

type ClashYaml struct {
	Proxies []ClashProxy `yaml:"proxies,omitempty"`
}

type XrayFakeHeader

type XrayFakeHeader struct {
	Type string `json:"type,omitempty"`
}

type XrayRawSettingsHeader

type XrayRawSettingsHeader struct {
	Type    string                        `json:"type,omitempty"`
	Request *XrayRawSettingsHeaderRequest `json:"request,omitempty"`
}

type XrayRawSettingsHeaderRequest

type XrayRawSettingsHeaderRequest struct {
	Path    []string                             `json:"path,omitempty"`
	Headers *XrayRawSettingsHeaderRequestHeaders `json:"headers,omitempty"`
}

type XrayRawSettingsHeaderRequestHeaders

type XrayRawSettingsHeaderRequestHeaders struct {
	Host []string `json:"Host,omitempty"`
}

Jump to

Keyboard shortcuts

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