Add a ChangeLog and dump the version when invoked with "-v".

merge-requests/3/head
Yawning Angel 10 years ago
parent 1e574942d5
commit 83c9e3b9a0

@ -0,0 +1,2 @@
Changes in version 0.0.1 - NOT YET RELEASED
- Initial release.

@ -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

Loading…
Cancel
Save