Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452348 - net-proxy/obfsproxy: remove dependence on net-misc/tor and add initd scripts
Summary: net-proxy/obfsproxy: remove dependence on net-misc/tor and add initd scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-15 14:56 UTC by Wang Jiajun
Modified: 2013-01-20 12:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wang Jiajun 2013-01-15 14:56:13 UTC
Though obfsproxy is hosted by tor project, it doesn't rely on tor when running or compiling.

And it is pointed out that obfsproxy is a separate application in its project page: https://www.torproject.org/projects/obfsproxy

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2013-01-15 17:12:22 UTC
(In reply to comment #0)
> Though obfsproxy is hosted by tor project, it doesn't rely on tor when
> running or compiling.
> 
> And it is pointed out that obfsproxy is a separate application in its
> project page: https://www.torproject.org/projects/obfsproxy
> 
> Reproducible: Always

Understood, but would you ever rung obfsproxy on your system *without* tor.  Is there a use case?
Comment 2 Wang Jiajun 2013-01-15 17:31:15 UTC
(In reply to comment #1)
> Understood, but would you ever rung obfsproxy on your system *without* tor. 
> Is there a use case?

Yes. For example it can be used to obfuscate the traffic of ssh/openvpn, as described in http://www.void.gr/kargig/blog/2012/10/05/bypassing-censorship-devices-by-obfuscating-your-traffic-using-obfsproxy/
Comment 3 Anthony Basile gentoo-dev 2013-01-15 18:10:12 UTC
okay done.  but before i close this bug, if you think people will be using obfsproxy as a stand alone, we may want to set up init scripts for it.  What do you think?
Comment 4 Wang Jiajun 2013-01-17 15:30:42 UTC
(In reply to comment #3)
> okay done.  but before i close this bug, if you think people will be using
> obfsproxy as a stand alone, we may want to set up init scripts for it.  What
> do you think?

I once tried to write a init script. But obfsproxy cannot read a config file, and its command line arguments varies according to the protocal you want to use.

For example, currently two protocals are available in obfsproxy: dummy and obfs2. The command line are as follow:
obfsproxy dummy server 192.168.1.99:11253 127.0.0.1:9005
obfsproxy obfs2 --dest=127.0.0.1:666 --shared-secret=himitsu server 127.0.0.1:1026

So it's hard to make the config file to meet this arguments (and there are more protocals using different arguments may appear!). 

Or we can simply let user write down all arguments he want in the configuration file (which is a bit ugly).

What' your opinion?
Comment 5 Anthony Basile gentoo-dev 2013-01-17 16:06:41 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > okay done.  but before i close this bug, if you think people will be using
> > obfsproxy as a stand alone, we may want to set up init scripts for it.  What
> > do you think?
> 
> I once tried to write a init script. But obfsproxy cannot read a config
> file, and its command line arguments varies according to the protocal you
> want to use.
> 
> For example, currently two protocals are available in obfsproxy: dummy and
> obfs2. The command line are as follow:
> obfsproxy dummy server 192.168.1.99:11253 127.0.0.1:9005
> obfsproxy obfs2 --dest=127.0.0.1:666 --shared-secret=himitsu server
> 127.0.0.1:1026
> 
> So it's hard to make the config file to meet this arguments (and there are
> more protocals using different arguments may appear!). 
> 
> Or we can simply let user write down all arguments he want in the
> configuration file (which is a bit ugly).
> 
> What' your opinion?

PROTOCOL is set in /etc/conf.d/obfsproxy and then in /etc/init.d/obfsproxy we have

if [ ${PROTOCOL} = "dummy" ] ; then
   CMDLINE="...."
elif [ ${PROTOCOL} = "obfs2" ] ; then
   CMDLINE="...."
else
   eend 1
fi

start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec ${OBFSPROXY} -- ${CMDLINE}

Give it a go, see if you can make it work.
Comment 6 Anthony Basile gentoo-dev 2013-01-17 16:09:21 UTC
oh wait, you said there might even be more than coming?  In that case

  case ${PROTOCOL} in 
     dummy) CMDLINE="...." ;;
     obfs2) CMDLINE="...." ;;
     *) eend 1 ;;
  ecas

This is easily expanded.
Comment 7 Anthony Basile gentoo-dev 2013-01-19 16:40:46 UTC
Okay obfsproxy-0.1.4-r1 is int the tree with init scripts.  Please give it a test.
Comment 8 Wang Jiajun 2013-01-20 12:05:35 UTC
(In reply to comment #7)
> Okay obfsproxy-0.1.4-r1 is int the tree with init scripts.  Please give it a
> test.

Well, I am busy these two days, so I am not working on the init script...

And, thanks for your script. It works perfectly! Closing this bug.