[Pkg-privacy-commits] [obfs4proxy] 89/151: Add a ChangeLog and dump the version when invoked with "-v".
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:59:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfs4proxy.
commit 83c9e3b9a0dada08712c8edb6cab3fda6d0a8a8b
Author: Yawning Angel <yawning at torproject.org>
Date: Wed Aug 27 03:46:23 2014 +0000
Add a ChangeLog and dump the version when invoked with "-v".
---
ChangeLog | 2 ++
obfs4proxy/obfs4proxy.go | 11 +++++++++++
2 files changed, 13 insertions(+)
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..1442903
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2 @@
+Changes in version 0.0.1 - NOT YET RELEASED
+ - Initial release.
diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go
index 7ba0e93..c67bb21 100644
--- a/obfs4proxy/obfs4proxy.go
+++ b/obfs4proxy/obfs4proxy.go
@@ -51,6 +51,7 @@ import (
)
const (
+ obfs4proxyVersion = "0.0.1"
obfs4proxyLogFile = "obfs4proxy.log"
socksAddr = "127.0.0.1:0"
elidedAddr = "[scrubbed]"
@@ -374,13 +375,23 @@ func ptInitializeLogging(enable bool) error {
return nil
}
+func version() {
+ fmt.Printf("obfs4proxy-%s\n", obfs4proxyVersion)
+ os.Exit(0)
+}
+
func main() {
// Handle the command line arguments.
_, execName := path.Split(os.Args[0])
+ showVer := flag.Bool("v", false, "Print version and exit")
flag.BoolVar(&enableLogging, "enableLogging", false, "Log to TOR_PT_STATE_LOCATION/"+obfs4proxyLogFile)
flag.BoolVar(&unsafeLogging, "unsafeLogging", false, "Disable the address scrubber")
flag.Parse()
+ if *showVer {
+ version()
+ }
+
// Determine if this is a client or server, initialize logging, and finish
// the pt configuration.
var ptListeners []net.Listener
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git
More information about the Pkg-privacy-commits
mailing list