1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

rename RegisterInboundConnectionConfig to RegisterInboundConfig

This commit is contained in:
v2ray 2016-01-25 17:19:09 +01:00
parent 9fe8178e4a
commit 01ed2fa889
9 changed files with 11 additions and 11 deletions

View File

@ -7,7 +7,7 @@ import (
)
func init() {
config.RegisterOutboundConnectionConfig("blackhole",
config.RegisterOutboundConfig("blackhole",
func(data []byte) (interface{}, error) {
return new(Config), nil
})

View File

@ -10,7 +10,7 @@ import (
)
func init() {
config.RegisterInboundConnectionConfig("dokodemo-door",
config.RegisterInboundConfig("dokodemo-door",
func(data []byte) (interface{}, error) {
type DokodemoConfig struct {
Host *v2net.AddressJson `json:"address"`

View File

@ -7,7 +7,7 @@ import (
)
func init() {
config.RegisterOutboundConnectionConfig("freedom",
config.RegisterOutboundConfig("freedom",
func(data []byte) (interface{}, error) {
return new(Config), nil
})

View File

@ -7,7 +7,7 @@ import (
)
func init() {
config.RegisterInboundConnectionConfig("http",
config.RegisterInboundConfig("http",
func(data []byte) (interface{}, error) {
return new(Config), nil
})

View File

@ -20,11 +20,11 @@ func registerConfigType(protocol string, proxyType string, creator ConfigObjectC
return nil
}
func RegisterInboundConnectionConfig(protocol string, creator ConfigObjectCreator) error {
func RegisterInboundConfig(protocol string, creator ConfigObjectCreator) error {
return registerConfigType(protocol, "inbound", creator)
}
func RegisterOutboundConnectionConfig(protocol string, creator ConfigObjectCreator) error {
func RegisterOutboundConfig(protocol string, creator ConfigObjectCreator) error {
return registerConfigType(protocol, "outbound", creator)
}

View File

@ -16,7 +16,7 @@ func TestRegisterInboundConfig(t *testing.T) {
return true, nil
}
err := RegisterInboundConnectionConfig(protocol, creator)
err := RegisterInboundConfig(protocol, creator)
assert.Error(err).IsNil()
configObj, err := CreateInboundConnectionConfig(protocol, nil)
@ -36,7 +36,7 @@ func TestRegisterOutboundConfig(t *testing.T) {
return true, nil
}
err := RegisterOutboundConnectionConfig(protocol, creator)
err := RegisterOutboundConfig(protocol, creator)
assert.Error(err).IsNil()
configObj, err := CreateOutboundConnectionConfig(protocol, nil)

View File

@ -17,7 +17,7 @@ const (
)
func init() {
config.RegisterInboundConnectionConfig("socks",
config.RegisterInboundConfig("socks",
func(data []byte) (interface{}, error) {
type SocksAccount struct {
Username string `json:"user"`

View File

@ -48,7 +48,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
}
func init() {
config.RegisterInboundConnectionConfig("vmess",
config.RegisterInboundConfig("vmess",
func(data []byte) (interface{}, error) {
config := new(Config)
err := json.Unmarshal(data, config)

View File

@ -28,7 +28,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
}
func init() {
proxyconfig.RegisterOutboundConnectionConfig("vmess",
proxyconfig.RegisterOutboundConfig("vmess",
func(data []byte) (interface{}, error) {
rawConfig := new(Config)
if err := json.Unmarshal(data, rawConfig); err != nil {