未验证 提交 1a11b28f 编写于 作者: B bobo liu 提交者: GitHub

config: inline is NOT SUPPORTED in encoding/json (#2304)

上级 bed13d7e
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
// recommended to use GetDefaultClientConf instead of creating this object // recommended to use GetDefaultClientConf instead of creating this object
// directly, so that all unspecified fields have reasonable default values. // directly, so that all unspecified fields have reasonable default values.
type ClientCommonConf struct { type ClientCommonConf struct {
auth.ClientConfig `ini:",extends" json:"inline"` auth.ClientConfig `ini:",extends"`
// ServerAddr specifies the address of the server to connect to. By // ServerAddr specifies the address of the server to connect to. By
// default, this value is "0.0.0.0". // default, this value is "0.0.0.0".
......
...@@ -144,8 +144,8 @@ type BaseProxyConf struct { ...@@ -144,8 +144,8 @@ type BaseProxyConf struct {
Metas map[string]string `ini:"-" json:"metas"` Metas map[string]string `ini:"-" json:"metas"`
// TODO: LocalSvrConf => LocalAppConf // TODO: LocalSvrConf => LocalAppConf
LocalSvrConf `ini:",extends" json:"inline"` LocalSvrConf `ini:",extends"`
HealthCheckConf `ini:",extends" json:"inline"` HealthCheckConf `ini:",extends"`
} }
type DomainConf struct { type DomainConf struct {
...@@ -155,8 +155,8 @@ type DomainConf struct { ...@@ -155,8 +155,8 @@ type DomainConf struct {
// HTTP // HTTP
type HTTPProxyConf struct { type HTTPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
DomainConf `ini:",extends" json:"inline"` DomainConf `ini:",extends"`
Locations []string `ini:"locations" json:"locations"` Locations []string `ini:"locations" json:"locations"`
HTTPUser string `ini:"http_user" json:"http_user"` HTTPUser string `ini:"http_user" json:"http_user"`
...@@ -167,27 +167,27 @@ type HTTPProxyConf struct { ...@@ -167,27 +167,27 @@ type HTTPProxyConf struct {
// HTTPS // HTTPS
type HTTPSProxyConf struct { type HTTPSProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
DomainConf `ini:",extends" json:"inline"` DomainConf `ini:",extends"`
} }
// TCP // TCP
type TCPProxyConf struct { type TCPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
RemotePort int `ini:"remote_port" json:"remote_port"` RemotePort int `ini:"remote_port" json:"remote_port"`
} }
// TCPMux // TCPMux
type TCPMuxProxyConf struct { type TCPMuxProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
DomainConf `ini:",extends" json:"inline"` DomainConf `ini:",extends"`
Multiplexer string `ini:"multiplexer"` Multiplexer string `ini:"multiplexer"`
} }
// STCP // STCP
type STCPProxyConf struct { type STCPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
Role string `ini:"role" json:"role"` Role string `ini:"role" json:"role"`
Sk string `ini:"sk" json:"sk"` Sk string `ini:"sk" json:"sk"`
...@@ -195,7 +195,7 @@ type STCPProxyConf struct { ...@@ -195,7 +195,7 @@ type STCPProxyConf struct {
// XTCP // XTCP
type XTCPProxyConf struct { type XTCPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
Role string `ini:"role" json:"role"` Role string `ini:"role" json:"role"`
Sk string `ini:"sk" json:"sk"` Sk string `ini:"sk" json:"sk"`
...@@ -203,14 +203,14 @@ type XTCPProxyConf struct { ...@@ -203,14 +203,14 @@ type XTCPProxyConf struct {
// UDP // UDP
type UDPProxyConf struct { type UDPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
RemotePort int `ini:"remote_port" json:"remote_port"` RemotePort int `ini:"remote_port" json:"remote_port"`
} }
// SUDP // SUDP
type SUDPProxyConf struct { type SUDPProxyConf struct {
BaseProxyConf `ini:",extends" json:"inline"` BaseProxyConf `ini:",extends"`
Role string `ini:"role" json:"role"` Role string `ini:"role" json:"role"`
Sk string `ini:"sk" json:"sk"` Sk string `ini:"sk" json:"sk"`
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
// recommended to use GetDefaultServerConf instead of creating this object // recommended to use GetDefaultServerConf instead of creating this object
// directly, so that all unspecified fields have reasonable default values. // directly, so that all unspecified fields have reasonable default values.
type ServerCommonConf struct { type ServerCommonConf struct {
auth.ServerConfig `ini:",extends" json:"inline"` auth.ServerConfig `ini:",extends"`
// BindAddr specifies the address that the server binds to. By default, // BindAddr specifies the address that the server binds to. By default,
// this value is "0.0.0.0". // this value is "0.0.0.0".
......
...@@ -52,15 +52,15 @@ type BaseVisitorConf struct { ...@@ -52,15 +52,15 @@ type BaseVisitorConf struct {
} }
type SUDPVisitorConf struct { type SUDPVisitorConf struct {
BaseVisitorConf `ini:",extends" json:"inline"` BaseVisitorConf `ini:",extends"`
} }
type STCPVisitorConf struct { type STCPVisitorConf struct {
BaseVisitorConf `ini:",extends" json:"inline"` BaseVisitorConf `ini:",extends"`
} }
type XTCPVisitorConf struct { type XTCPVisitorConf struct {
BaseVisitorConf `ini:",extends" json:"inline"` BaseVisitorConf `ini:",extends"`
} }
// DefaultVisitorConf creates a empty VisitorConf object by visitorType. // DefaultVisitorConf creates a empty VisitorConf object by visitorType.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册