File tree 1 file changed +3
-14
lines changed
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,14 @@ package portlist
9
9
import (
10
10
"errors"
11
11
"fmt"
12
- "runtime"
13
12
"slices"
14
13
"sync"
15
14
"time"
16
-
17
- "github.com/sagernet/tailscale/envknob"
18
15
)
19
16
20
17
var (
21
- newOSImpl func (includeLocalhost bool ) osImpl // if non-nil, constructs a new osImpl.
22
- pollInterval = 5 * time .Second // default; changed by some OS-specific init funcs
23
- debugDisablePortlist = envknob .RegisterBool ("TS_DEBUG_DISABLE_PORTLIST" )
18
+ newOSImpl func (includeLocalhost bool ) osImpl // if non-nil, constructs a new osImpl.
19
+ pollInterval = 5 * time .Second // default; changed by some OS-specific init funcs
24
20
)
25
21
26
22
// PollInterval is the recommended OS-specific interval
@@ -76,14 +72,7 @@ func (p *Poller) setPrev(pl List) {
76
72
// init initializes the Poller by ensuring it has an underlying
77
73
// OS implementation and is not turned off by envknob.
78
74
func (p * Poller ) init () {
79
- switch {
80
- case debugDisablePortlist ():
81
- p .initErr = errors .New ("portlist disabled by envknob" )
82
- case newOSImpl == nil :
83
- p .initErr = errors .New ("portlist poller not implemented on " + runtime .GOOS )
84
- default :
85
- p .os = newOSImpl (p .IncludeLocalhost )
86
- }
75
+ p .initErr = errors .New ("portlist disabled by sing-box" )
87
76
}
88
77
89
78
// Close closes the Poller.
You can’t perform that action at this time.
0 commit comments