Skip to content

Commit e9534bb

Browse files
committed
Set Tor package temp data directory
1 parent f075cf3 commit e9534bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/tor.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
// "net"
88
"net/http"
9+
"os"
910
"os/exec"
1011
"runtime"
1112
"time"
@@ -21,7 +22,8 @@ func (arc *Archiver) newTorClient() (*http.Client, *tor.Tor, error) {
2122
}
2223

2324
// Start tor with default config
24-
t, err := tor.Start(nil, nil)
25+
startConf := &tor.StartConf{TempDataDirBase: os.TempDir()}
26+
t, err := tor.Start(nil, startConf)
2527
if err != nil {
2628
return nil, nil, fmt.Errorf("Make connection failed: %w", err)
2729
}

0 commit comments

Comments
 (0)