1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/proxy/socks/config_json_test.go

22 lines
438 B
Go
Raw Normal View History

// +build json
package socks_test
import (
"testing"
2016-08-20 14:55:45 -04:00
"v2ray.com/core/proxy/registry"
2016-08-29 06:23:17 -04:00
. "v2ray.com/core/proxy/socks"
2016-08-20 14:55:45 -04:00
"v2ray.com/core/testing/assert"
)
func TestDefaultIPAddress(t *testing.T) {
2016-05-24 15:55:46 -04:00
assert := assert.On(t)
socksConfig, err := registry.CreateInboundConfig("socks", []byte(`{
"auth": "noauth"
}`))
assert.Error(err).IsNil()
2016-08-29 06:25:16 -04:00
assert.Address(socksConfig.(*ServerConfig).GetNetAddress()).EqualsString("127.0.0.1")
}