vpn

package
v0.0.0-...-5d53e58 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(filename string) (*core.Config, error)

func ProxyBind

func ProxyBind(listen string, port int) map[string]string

func XRayConfig

func XRayConfig(IP string, testConfig *configuration.Configuration) string

XRayConfig create VPN configuration

func XRayReceiver

func XRayReceiver(configPath string) (string, int, error)

func XRayVersion

func XRayVersion()

Types

type Inbound

type Inbound struct {
	Port     int    `json:"port"`
	Listen   string `json:"listen"`
	Tag      string `json:"tag"`
	Protocol string `json:"protocol"`
	Settings struct {
		Auth string `json:"auth"`
		UDP  bool   `json:"udp"`
		IP   string `json:"ip"`
	} `json:"settings"`
	Sniffing struct {
		Enabled      bool     `json:"enabled"`
		DestOverride []string `json:"destOverride"`
	} `json:"sniffing"`
}

type Log

type Log struct {
	Loglevel string `json:"loglevel"`
}

type Outbound

type Outbound struct {
	Protocol string `json:"protocol"`
	Settings struct {
		VNext []VNext `json:"vnext"`
	} `json:"settings"`
	StreamSettings StreamSettings `json:"streamSettings"`
}

type ScanWorker

type ScanWorker struct {
	Instance *core.Instance
}

func XRayInstance

func XRayInstance(configPath string) ScanWorker

type StreamSettings

type StreamSettings struct {
	Network     string      `json:"network"`
	Security    string      `json:"security"`
	WSSettings  WSSettings  `json:"wsSettings"`
	TLSSettings TLSSettings `json:"tlsSettings"`
}

type TLSSettings

type TLSSettings struct {
	ServerName    string `json:"serverName"`
	AllowInsecure bool   `json:"allowInsecure"`
}

type User

type User struct {
	ID string `json:"id"`
}

type VNext

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

type WSSettings

type WSSettings struct {
	Headers struct {
		Host string `json:"Host"`
	} `json:"headers"`
	Path string `json:"path"`
}

type XRay

type XRay struct {
	Log       Log        `json:"log"`
	Inbounds  []Inbound  `json:"inbounds"`
	Outbounds []Outbound `json:"outbounds"`
	Other     struct{}   `json:"other"`
}

Jump to

Keyboard shortcuts

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