Documentation ¶
Index ¶
- Constants
- Variables
- func Add(s Tunnel)
- func ChainConfig(id string, name string) *xconfig.ChainConfig
- func Count() int
- func Delete(id string)
- func LoadConfig()
- func SaveConfig() error
- func Set(s Tunnel)
- type Option
- func EnableTLSOption(b bool) Option
- func EndpointOption(endpoint string) Option
- func HostnameOption(hostname string) Option
- func IDOption(id string) Option
- func KeepaliveOption(b bool) Option
- func NameOption(name string) Option
- func PasswordOption(password string) Option
- func TTLOption(ttl int) Option
- func UsernameOption(username string) Option
- type Options
- type Tunnel
Constants ¶
View Source
const ( EndpointAddr = "gost.plus" ServerName = "tunnel.gost.plus" ServerAddr = ServerName + ":443" )
View Source
const ( FileTunnel = "file" HTTPTunnel = "http" TCPTunnel = "tcp" UDPTunnel = "udp" )
Variables ¶
View Source
var (
ErrTunnelClosed = errors.New("tunnel closed")
)
Functions ¶
func ChainConfig ¶ added in v0.2.0
func ChainConfig(id string, name string) *xconfig.ChainConfig
func LoadConfig ¶
func LoadConfig()
func SaveConfig ¶ added in v0.2.0
func SaveConfig() error
Types ¶
type Option ¶
type Option func(opts *Options)
func EnableTLSOption ¶
func EndpointOption ¶
func HostnameOption ¶
func KeepaliveOption ¶ added in v0.2.0
func NameOption ¶
func PasswordOption ¶
func UsernameOption ¶
type Tunnel ¶
type Tunnel interface { ID() string Type() string Name() string Endpoint() string Entrypoint() string Options() Options Run() error Favorite(b bool) IsFavorite() bool Close() error IsClosed() bool Err() error }
func NewFileTunnel ¶
func NewHTTPTunnel ¶
func NewTCPTunnel ¶
func NewUDPTunnel ¶
Click to show internal directories.
Click to hide internal directories.