Documentation ¶
Index ¶
- Constants
- Variables
- func CheckClientUp(ver string) bool
- func CheckUpdates() *gover.Version
- type AppMessage
- type Config
- type Connection
- func (c *Connection) Close()
- func (c *Connection) Conn() *tunl.TunlConn
- func (c *Connection) GetHost() string
- func (c *Connection) GetID() string
- func (c *Connection) GetRemoteIP() string
- func (c *Connection) IsAllowed() bool
- func (c *Connection) SetAllowed(allow bool)
- func (c *Connection) SetHost(host string)
- type ConnectionPool
- func (p *ConnectionPool) CloseChannels(uuid string)
- func (p *ConnectionPool) Count() int
- func (p *ConnectionPool) Drop(id string)
- func (p *ConnectionPool) Get(id string) *Connection
- func (p *ConnectionPool) GetBodyChunkChan(uuid string) chan *commands.BodyChunk
- func (p *ConnectionPool) GetResponseChan(uuid string) chan *commands.HttpResponse
- func (p *ConnectionPool) MakeBodyChunkChan(uuid string) chan *commands.BodyChunk
- func (p *ConnectionPool) MakeResponseChan(uuid string) chan *commands.HttpResponse
- func (p *ConnectionPool) Push(conn *tunl.TunlConn) error
- type ErrorCode
- type JsonData
- type Log
- type Server
- type Tunl
- type TunlHttp
- type TunlServer
Constants ¶
View Source
const BrowserWarningCookieName = "tunl-online-skip-warning"
View Source
const BrowserWarningHeaderName = "Tunl-Online-Skip-Warning"
View Source
const BrowserWarningNoScriptText = "" /* 178-byte string literal not displayed */
View Source
const DefaultNoScriptText = "You need to enable JavaScript to run this app."
Variables ¶
View Source
var ClientMinimumVersion = "1.0.0"
View Source
var ErrorIdBusy = errors.New("connection id is busy")
View Source
var Version = "1.0.0"
Functions ¶
func CheckClientUp ¶ added in v1.0.0
func CheckUpdates ¶ added in v1.0.0
Types ¶
type AppMessage ¶ added in v1.0.0
type Config ¶
type Config struct { Server *Server `yaml:"server"` Tunl *Tunl `yaml:"tunl"` Log *Log `yaml:"log"` }
func LoadConfig ¶
type Connection ¶ added in v1.0.0
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Close ¶ added in v1.0.0
func (c *Connection) Close()
func (*Connection) Conn ¶ added in v1.0.0
func (c *Connection) Conn() *tunl.TunlConn
func (*Connection) GetHost ¶ added in v1.0.0
func (c *Connection) GetHost() string
func (*Connection) GetID ¶ added in v1.0.0
func (c *Connection) GetID() string
func (*Connection) GetRemoteIP ¶ added in v1.0.0
func (c *Connection) GetRemoteIP() string
func (*Connection) IsAllowed ¶ added in v1.0.0
func (c *Connection) IsAllowed() bool
func (*Connection) SetAllowed ¶ added in v1.0.0
func (c *Connection) SetAllowed(allow bool)
func (*Connection) SetHost ¶ added in v1.0.0
func (c *Connection) SetHost(host string)
type ConnectionPool ¶
type ConnectionPool struct {
// contains filtered or unexported fields
}
func NewConnectionPool ¶
func NewConnectionPool(prefixSize int) *ConnectionPool
func (*ConnectionPool) CloseChannels ¶
func (p *ConnectionPool) CloseChannels(uuid string)
func (*ConnectionPool) Count ¶
func (p *ConnectionPool) Count() int
func (*ConnectionPool) Drop ¶
func (p *ConnectionPool) Drop(id string)
func (*ConnectionPool) Get ¶
func (p *ConnectionPool) Get(id string) *Connection
func (*ConnectionPool) GetBodyChunkChan ¶
func (p *ConnectionPool) GetBodyChunkChan(uuid string) chan *commands.BodyChunk
func (*ConnectionPool) GetResponseChan ¶
func (p *ConnectionPool) GetResponseChan(uuid string) chan *commands.HttpResponse
func (*ConnectionPool) MakeBodyChunkChan ¶
func (p *ConnectionPool) MakeBodyChunkChan(uuid string) chan *commands.BodyChunk
func (*ConnectionPool) MakeResponseChan ¶
func (p *ConnectionPool) MakeResponseChan(uuid string) chan *commands.HttpResponse
type Server ¶ added in v1.0.0
type Server struct { HTTPAddr string `yaml:"http_addr"` HTTPPort string `yaml:"http_port"` KeyFile string `yaml:"key_file"` CertFile string `yaml:"cert_file"` IdleTimeout int `yaml:"idle_timeout"` ReadTimeout int `yaml:"read_timeout"` ThreadCount int `yaml:"thread_count"` KeepAlive bool `yaml:"keep_alive"` SSL bool `yaml:"user_ssl"` Debug bool `yaml:"debug"` }
type Tunl ¶ added in v1.0.0
type Tunl struct { Addr string `yaml:"addr"` Port string `yaml:"port"` Domain string `yaml:"domain"` SchemeHttps bool `yaml:"scheme_https"` MaxClients int `yaml:"max_clients"` MaxTimeout int `yaml:"max_timeout"` MaxPostSize int `yaml:"max_post_size"` ClientExpireAt int `yaml:"client_expire_at"` UriPrefixSize int `yaml:"uri_prefix_size"` ServerPrivate bool `yaml:"server_private"` ServerPassword string `yaml:"server_password"` BrowserWarning bool `yaml:"browser_warning"` }
type TunlServer ¶
type TunlServer struct {
// contains filtered or unexported fields
}
func NewTunlServer ¶
func NewTunlServer(conf *Tunl, log *golog.Logger) *TunlServer
func (*TunlServer) GetPool ¶
func (s *TunlServer) GetPool() *ConnectionPool
func (*TunlServer) Run ¶
func (s *TunlServer) Run(conf *Config) error
func (*TunlServer) Start ¶
func (s *TunlServer) Start(conf Config) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.