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

     1  package trojan
     2  
     3  import "github.com/ipfans/trojan-go/config"
     4  
     5  type Config struct {
     6  	LocalHost        string      `json:"local_addr" yaml:"local-addr"`
     7  	LocalPort        int         `json:"local_port" yaml:"local-port"`
     8  	RemoteHost       string      `json:"remote_addr" yaml:"remote-addr"`
     9  	RemotePort       int         `json:"remote_port" yaml:"remote-port"`
    10  	DisableHTTPCheck bool        `json:"disable_http_check" yaml:"disable-http-check"`
    11  	MySQL            MySQLConfig `json:"mysql" yaml:"mysql"`
    12  	API              APIConfig   `json:"api" yaml:"api"`
    13  }
    14  
    15  type MySQLConfig struct {
    16  	Enabled bool `json:"enabled" yaml:"enabled"`
    17  }
    18  
    19  type APIConfig struct {
    20  	Enabled bool `json:"enabled" yaml:"enabled"`
    21  }
    22  
    23  func init() {
    24  	config.RegisterConfigCreator(Name, func() interface{} {
    25  		return &Config{}
    26  	})
    27  }