Skip to content

Commit f7a95f0

Browse files
committed
Mark tor module as experimental
Experimental modules are excluded from running unless called explicitly. Tor module needs some more work in order to be fully useful.
1 parent f1332ce commit f7a95f0

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

cmd/run/run.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var allModuleNames []string = func() []string {
2626
)
2727

2828
for _, m := range allModules {
29-
if !seen[m.Name] {
29+
if !seen[m.Name] && !m.Experimental {
3030
names = append(names, m.Name)
3131
seen[m.Name] = true
3232
}
@@ -131,12 +131,13 @@ const (
131131

132132
type Module struct {
133133
simulator.Module
134-
Name string
135-
Pipeline Pipeline
136-
NumOfHosts int
137-
HeaderMsg string
138-
HostMsg string
139-
Timeout time.Duration
134+
Name string
135+
Pipeline Pipeline
136+
Experimental bool
137+
NumOfHosts int
138+
HeaderMsg string
139+
HostMsg string
140+
Timeout time.Duration
140141
// FailMsg string
141142
SuccessMsg string
142143
}
@@ -249,13 +250,14 @@ var allModules = []Module{
249250
Timeout: 1 * time.Second,
250251
},
251252
Module{
252-
Module: simulator.NewTorSimulator(),
253-
Name: "tor",
254-
Pipeline: PipelineDNS,
255-
NumOfHosts: 5,
256-
HeaderMsg: "Preparing Tor connection",
257-
HostMsg: "Connecting to %s",
258-
SuccessMsg: "Tor use is permitted in this environment",
253+
Module: simulator.NewTorSimulator(),
254+
Name: "tor",
255+
Pipeline: PipelineDNS,
256+
Experimental: true,
257+
NumOfHosts: 5,
258+
HeaderMsg: "Preparing Tor connection",
259+
HostMsg: "Connecting to %s",
260+
SuccessMsg: "Tor use is permitted in this environment",
259261
// FailMsg: "Couldn't contact Tor network",
260262
Timeout: 10 * time.Second,
261263
},

0 commit comments

Comments
 (0)