1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-18 18:06:13 -04:00
v2fly/proxy/socks/server_config_json_test.go
2016-07-25 23:45:25 +02:00

22 lines
467 B
Go

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