github.com/ipfans/trojan-go@v0.11.0/tunnel/websocket/config.go (about) 1 package websocket 2 3 import "github.com/ipfans/trojan-go/config" 4 5 type WebsocketConfig struct { 6 Enabled bool `json:"enabled" yaml:"enabled"` 7 Host string `json:"host" yaml:"host"` 8 Path string `json:"path" yaml:"path"` 9 } 10 11 type Config struct { 12 RemoteHost string `json:"remote_addr" yaml:"remote-addr"` 13 RemotePort int `json:"remote_port" yaml:"remote-port"` 14 Websocket WebsocketConfig `json:"websocket" yaml:"websocket"` 15 } 16 17 func init() { 18 config.RegisterConfigCreator(Name, func() interface{} { 19 return new(Config) 20 }) 21 }