[tor-bugs] #5130 [Obfsproxy]: Allow obfsproxy to daemonize

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Feb 14 17:45:17 UTC 2012


#5130: Allow obfsproxy to daemonize
------------------------------+---------------------------------------------
 Reporter:  ericpaulbishop    |          Owner:  asn
     Type:  enhancement       |         Status:  new
 Priority:  minor             |      Milestone:     
Component:  Obfsproxy         |        Version:     
 Keywords:  obfsproxy daemon  |         Parent:     
   Points:                    |   Actualpoints:     
------------------------------+---------------------------------------------
 I've been working on setting up obfsproxy and I ran into a minor issue:
 It doesn't seem possible to send the obfsproxy process into the background
 (i.e. daemonize it) if I'm running it as an external server and not in
 managed mode.  If I want to be able to specify the listening port for a
 bridge server I don't think there's a way to do this without running
 obfsproxy as an external server (please correct me if I'm wrong).
 However, there's no option to fork/detach from the terminal in the case of
 an external server, which seems a rather significant issue.

 I've written a small patch for main.c that seems to correct this problem
 (see attached).  This implements two command line arguments, "--
 daemonize", which, when specified will just send the program into the
 background and "--daemonize_with_pid=<pid_file>", which will daemonize and
 write the process id to the specified file.  This patch only works on unix
 systems, but I've added #ifdef directives that only enable this code if
 unistd.h is defined, otherwise it will be completely ignored.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5130>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list