1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 09:56:18 -05:00
v2fly/proxy/socks/server_config_json_test.go
2016-08-29 12:25:16 +02:00

22 lines
438 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.(*ServerConfig).GetNetAddress()).EqualsString("127.0.0.1")
}