dae/component/outbound/dialer/direct.go

20 lines
495 B
Go
Raw Normal View History

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