Documentation
¶
Index ¶
- Constants
- type App
- type CaddyUpstream
- func (u *CaddyUpstream) Add(s string) error
- func (CaddyUpstream) CaddyModule() caddy.ModuleInfo
- func (u *CaddyUpstream) Consume(k string, nr, nw int64) error
- func (u *CaddyUpstream) Delete(s string) error
- func (u *CaddyUpstream) Provision(ctx caddy.Context) error
- func (u *CaddyUpstream) Range(fn func(k string, up, down int64))
- func (u *CaddyUpstream) Validate(k string) bool
- type EnvProxy
- type MemoryUpstream
- func (u *MemoryUpstream) Add(s string) error
- func (u *MemoryUpstream) AddKey(key string)
- func (MemoryUpstream) CaddyModule() caddy.ModuleInfo
- func (u *MemoryUpstream) Cleanup() error
- func (u *MemoryUpstream) Consume(k string, nr, nw int64) error
- func (u *MemoryUpstream) Delete(s string) error
- func (u *MemoryUpstream) Provision(ctx caddy.Context) error
- func (u *MemoryUpstream) Range(fn func(string, int64, int64))
- func (u *MemoryUpstream) Validate(k string) bool
- type NoProxy
- type Proxy
- type Task
- type TaskType
- type Traffic
- type Upstream
Constants ¶
View Source
const CaddyAppID = "trojan"
CaddyAppID is ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// UpstreamRaw is ...
UpstreamRaw json.RawMessage `json:"upstream" caddy:"namespace=trojan.upstream inline_key=upstream"`
// ProxyRaw is ...
ProxyRaw json.RawMessage `json:"proxy" caddy:"namespace=trojan.proxy inline_key=proxy"`
// Users is ...
Users []string `json:"users,omitempty"`
Upstream
Proxy
// contains filtered or unexported fields
}
App is ...
type CaddyUpstream ¶
type CaddyUpstream struct {
// Prefix is ...
Prefix string `json:"-,omitempty"`
// Storage is ...
Storage certmagic.Storage `json:"-,omitempty"`
// Logger is ...
Logger *zap.Logger `json:"-,omitempty"`
}
CaddyUpstream is ...
func (CaddyUpstream) CaddyModule ¶
func (CaddyUpstream) CaddyModule() caddy.ModuleInfo
CaddyModule is ...
func (*CaddyUpstream) Consume ¶
func (u *CaddyUpstream) Consume(k string, nr, nw int64) error
Consume is ...
func (*CaddyUpstream) Provision ¶
func (u *CaddyUpstream) Provision(ctx caddy.Context) error
Provision is ...
func (*CaddyUpstream) Range ¶
func (u *CaddyUpstream) Range(fn func(k string, up, down int64))
Range is ...
type EnvProxy ¶
EnvProxy is ...
func (*EnvProxy) ListenPacket ¶
func (*EnvProxy) ListenPacket(network, addr string) (net.PacketConn, error)
ListenPacket is ...
type MemoryUpstream ¶
type MemoryUpstream struct {
// UpstreamRaw is ...
UpstreamRaw json.RawMessage `json:"persist" caddy:"namespace=trojan.upstream inline_key=upstream"`
// contains filtered or unexported fields
}
MemoryUpstream is ...
func (MemoryUpstream) CaddyModule ¶
func (MemoryUpstream) CaddyModule() caddy.ModuleInfo
CaddyModule is ...
func (*MemoryUpstream) Consume ¶
func (u *MemoryUpstream) Consume(k string, nr, nw int64) error
Consume is ...
func (*MemoryUpstream) Provision ¶
func (u *MemoryUpstream) Provision(ctx caddy.Context) error
Provision is ...
type Proxy ¶
type Proxy interface {
// Handle is ...
Handle(r io.Reader, w io.Writer) (int64, int64, error)
// Closer is ...
io.Closer
}
Proxy is ...
Click to show internal directories.
Click to hide internal directories.