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

     1  package shadowsocks
     2  
     3  import "github.com/ipfans/trojan-go/config"
     4  
     5  type ShadowsocksConfig struct {
     6  	Enabled  bool   `json:"enabled" yaml:"enabled"`
     7  	Method   string `json:"method" yaml:"method"`
     8  	Password string `json:"password" yaml:"password"`
     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  	Shadowsocks ShadowsocksConfig `json:"shadowsocks" yaml:"shadowsocks"`
    15  }
    16  
    17  func init() {
    18  	config.RegisterConfigCreator(Name, func() interface{} {
    19  		return &Config{
    20  			Shadowsocks: ShadowsocksConfig{
    21  				Method: "AES-128-GCM",
    22  			},
    23  		}
    24  	})
    25  }