Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile on FreeBSD #34

Closed
stefarossi opened this issue Sep 26, 2012 · 6 comments
Closed

Can't compile on FreeBSD #34

stefarossi opened this issue Sep 26, 2012 · 6 comments

Comments

@stefarossi
Copy link

Hi,

I can't compile redsocks on FreeBSD 9, this is the error I get:

# make
"Makefile", line 10: Need an operator
"Makefile", line 79: Need an operator
make: fatal errors encountered -- cannot continue

Is it possible to patch it?
Thanks

@przemoc
Copy link
Contributor

przemoc commented Sep 26, 2012

You have to use GNU make, invoked by gmake on FreeBSD. Mind that AFAIR bleeding-edge redsocks from master branch is not working on non-Linux OSes atm, so you should possibly go with version 0.4 then.

@fabianfrz
Copy link

fabianfrz commented Dec 18, 2016

FreeBSD 10:

Currently:

make: "/root/redsocks/Makefile" line 3: Missing dependency operator
make: "/root/redsocks/Makefile" line 5: Need an operator
make: "/root/redsocks/Makefile" line 17: Need an operator
make: "/root/redsocks/Makefile" line 39: Missing dependency operator
make: "/root/redsocks/Makefile" line 41: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /root/redsocks

version.h

#ifndef VERSION_H_SUN_NOV_27_03_22_30_2011
#define VERSION_H_SUN_NOV_27_03_22_30_2011

extern const char* redsocks_version;

#endif // VERSION_H_SUN_NOV_27_03_22_30_2011

@vgrebenschikov
Copy link

I have other problems on FreeBSD

  1. need to specify -I/usr/local/include
  2. by some reason it did not found INADDR_LOOPBACK macro while build redsocks.h (easy to w/a)
  3. it requires splice() to build and in some places (under if use_splice) it can be just ifdefed, in others it looks hard wired
  4. If I go to revision before splice used (af46180^) - it fails on firewall and nat code
    base.c:103:22: error: use of undeclared identifier 'IPL_NAME' const char *fname = IPL_NAME; base.c:111:19: error: variable has incomplete type 'struct natlookup' struct natlookup natLookup;
    while no firewall specific in config:
    $ cat config.h
    /* Unknown system, only generic firewall code is compiled */
    $

Looks like code below assumes IPF - with no PF or default IPFW support
#ifdef __FreeBSD__ static int redir_init_ipf() { #ifdef IPNAT_NAME const char *fname = IPNAT_NAME; #else const char *fname = IPL_NAME; #endif return redir_open_private(fname, O_RDONLY); ...

@darkk
Copy link
Owner

darkk commented Feb 1, 2018

FreeBSD is not currently explicitly supported and it's unclear if the code ever worked for FreeBSD. I'm closing this issue as a duplicate of #110 that describes pre-conditions for FreeBSD support.

@darkk darkk closed this as completed Feb 1, 2018
@vgrebenschikov
Copy link

Well, looks like redsocks no more required to make transparent proxying to tor daemon on FreeBSD:

  1. add transparent proxy rule to ipfw:

ipfw add 127.0.0.1,9099 tcp from any to any out via

  1. setup tor daemon to handle transparent proxy connections:

cat >> /usr/local/etc/tor/torrc

TransPort 127.0.0.1:9099
TransProxyType ipfw
^D

@darkk
Copy link
Owner

darkk commented Feb 6, 2018

transparent proxying to tor daemon ... TransPort

Yep. I've added a paragraph to README saying that piping traffic to tor via redsocks was never a goal and, moreover, may be bad idea in terms of privacy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants