mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 18:17:52 -05:00
22 lines
438 B
Go
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")
|
|
}
|