1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-10-01 08:16:00 -04:00
v2fly/proxy/socks/server_config_json_test.go
2016-08-20 20:55:45 +02:00

22 lines
428 B
Go

// +build json
package socks_test
import (
"testing"
"v2ray.com/core/proxy/registry"
"v2ray.com/core/proxy/socks"
"v2ray.com/core/testing/assert"
)
func TestDefaultIPAddress(t *testing.T) {
assert := assert.On(t)
socksConfig, err := registry.CreateInboundConfig("socks", []byte(`{
"auth": "noauth"
}`))
assert.Error(err).IsNil()
assert.Address(socksConfig.(*socks.Config).Address).EqualsString("127.0.0.1")
}