summaryrefslogtreecommitdiff
path: root/obfs4proxy/pt_extras.go
diff options
context:
space:
mode:
Diffstat (limited to 'obfs4proxy/pt_extras.go')
-rw-r--r--obfs4proxy/pt_extras.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/obfs4proxy/pt_extras.go b/obfs4proxy/pt_extras.go
index 9eddd26..f490fbc 100644
--- a/obfs4proxy/pt_extras.go
+++ b/obfs4proxy/pt_extras.go
@@ -158,3 +158,9 @@ func resolveAddrStr(addrStr string) (*net.TCPAddr, error) {
return &net.TCPAddr{IP: ip, Port: int(port), Zone: ""}, nil
}
+
+// Feature #15435 adds a new env var for determining if Tor keeps stdin
+// open for use in termination detection.
+func ptShouldExitOnStdinClose() bool {
+ return os.Getenv("TOR_PT_EXIT_ON_STDIN_CLOSE") == "1"
+}