mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
467 B
22 lines
467 B
9 years ago
|
// +build json
|
||
|
|
||
|
package socks_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
9 years ago
|
"github.com/v2ray/v2ray-core/proxy/internal"
|
||
9 years ago
|
"github.com/v2ray/v2ray-core/proxy/socks"
|
||
|
"github.com/v2ray/v2ray-core/testing/assert"
|
||
|
)
|
||
|
|
||
|
func TestDefaultIPAddress(t *testing.T) {
|
||
9 years ago
|
assert := assert.On(t)
|
||
9 years ago
|
|
||
9 years ago
|
socksConfig, err := internal.CreateInboundConfig("socks", []byte(`{
|
||
9 years ago
|
"auth": "noauth"
|
||
|
}`))
|
||
|
assert.Error(err).IsNil()
|
||
9 years ago
|
assert.Address(socksConfig.(*socks.Config).Address).EqualsString("127.0.0.1")
|
||
9 years ago
|
}
|