mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-11 10:37:18 +03:00
Fix network check for URLTest
This commit is contained in:
@@ -43,6 +43,7 @@ func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLo
|
|||||||
outbound := &URLTest{
|
outbound := &URLTest{
|
||||||
myOutboundAdapter: myOutboundAdapter{
|
myOutboundAdapter: myOutboundAdapter{
|
||||||
protocol: C.TypeURLTest,
|
protocol: C.TypeURLTest,
|
||||||
|
network: []string{N.NetworkTCP, N.NetworkUDP},
|
||||||
router: router,
|
router: router,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
tag: tag,
|
tag: tag,
|
||||||
@@ -61,13 +62,6 @@ func NewURLTest(ctx context.Context, router adapter.Router, logger log.ContextLo
|
|||||||
return outbound, nil
|
return outbound, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *URLTest) Network() []string {
|
|
||||||
if s.group == nil {
|
|
||||||
return []string{N.NetworkTCP, N.NetworkUDP}
|
|
||||||
}
|
|
||||||
return s.group.Select(N.NetworkTCP).Network()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *URLTest) Start() error {
|
func (s *URLTest) Start() error {
|
||||||
outbounds := make([]adapter.Outbound, 0, len(s.tags))
|
outbounds := make([]adapter.Outbound, 0, len(s.tags))
|
||||||
for i, tag := range s.tags {
|
for i, tag := range s.tags {
|
||||||
|
|||||||
Reference in New Issue
Block a user