dae/component/outbound/dialer/direct.go

21 lines
445 B
Go
Raw Normal View History

2023-01-23 18:54:21 +07:00
package dialer
import (
"github.com/mzz2017/softwind/netproxy"
softwindDirect "github.com/mzz2017/softwind/protocol/direct"
2023-01-23 18:54:21 +07:00
)
func NewDirectDialer(option *GlobalOption, fullcone bool) (netproxy.Dialer, *Property) {
property := &Property{
2023-02-28 20:25:15 +07:00
Name: "direct",
Address: "",
Protocol: "",
Link: "",
}
2023-01-27 01:10:27 +07:00
if fullcone {
return softwindDirect.FullconeDirect, property
2023-01-27 01:10:27 +07:00
} else {
return softwindDirect.SymmetricDirect, property
2023-01-23 18:54:21 +07:00
}
}