github.com/ipfans/trojan-go@v0.11.0/proxy/client/config.go (about)

     1  package client
     2  
     3  import "github.com/ipfans/trojan-go/config"
     4  
     5  type MuxConfig struct {
     6  	Enabled bool `json:"enabled" yaml:"enabled"`
     7  }
     8  
     9  type WebsocketConfig struct {
    10  	Enabled bool `json:"enabled" yaml:"enabled"`
    11  }
    12  
    13  type RouterConfig struct {
    14  	Enabled bool `json:"enabled" yaml:"enabled"`
    15  }
    16  
    17  type ShadowsocksConfig struct {
    18  	Enabled bool `json:"enabled" yaml:"enabled"`
    19  }
    20  
    21  type TransportPluginConfig struct {
    22  	Enabled bool `json:"enabled" yaml:"enabled"`
    23  }
    24  
    25  type Config struct {
    26  	Mux             MuxConfig             `json:"mux" yaml:"mux"`
    27  	Websocket       WebsocketConfig       `json:"websocket" yaml:"websocket"`
    28  	Router          RouterConfig          `json:"router" yaml:"router"`
    29  	Shadowsocks     ShadowsocksConfig     `json:"shadowsocks" yaml:"shadowsocks"`
    30  	TransportPlugin TransportPluginConfig `json:"transport_plugin" yaml:"transport-plugin"`
    31  }
    32  
    33  func init() {
    34  	config.RegisterConfigCreator(Name, func() interface{} {
    35  		return new(Config)
    36  	})
    37  }