mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2026-10-21 03:25:48 +00:00
22 lines
554 B
Go
22 lines
554 B
Go
package websocket
|
|
|
|
import "github.com/p4gefau1t/trojan-go/config"
|
|
|
|
type WebsocketConfig struct {
|
|
Enabled bool `json:"enabled" yaml:"enabled"`
|
|
Host string `json:"host" yaml:"host"`
|
|
Path string `json:"path" yaml:"path"`
|
|
}
|
|
|
|
type Config struct {
|
|
RemoteHost string `json:"remote_addr" yaml:"remote-addr"`
|
|
RemotePort int `json:"remote_port" yaml:"remote-port"`
|
|
Websocket WebsocketConfig `json:"websocket" yaml:"websocket"`
|
|
}
|
|
|
|
func init() {
|
|
config.RegisterConfigCreator(Name, func() interface{} {
|
|
return new(Config)
|
|
})
|
|
}
|