mirror of
https://github.com/luscis/openlan.git
synced 2025-10-15 05:00:42 +08:00
28 lines
329 B
Go
28 lines
329 B
Go
package config
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestNewProxy(t *testing.T) {
|
|
obj := &Proxy{
|
|
Http: []*HttpProxy{
|
|
{
|
|
Listen: "0.0.0.0:80",
|
|
Cert: &Cert{
|
|
Dir: "/var/run",
|
|
},
|
|
},
|
|
},
|
|
Tcp: []*TcpProxy{
|
|
{
|
|
Listen:"0.0.0.0:22",
|
|
Target: []string{
|
|
"1.1.1.1:23",
|
|
"1.1.1.2:34",
|
|
},
|
|
},
|
|
},
|
|
}
|
|
obj.Correct()
|
|
} |