1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 19:45:24 +00:00
v2fly/proxy/socks/config_json_test.go
2016-01-25 17:23:10 +01:00

23 lines
512 B
Go

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