Giter Site home page Giter Site logo

Can't compile on FreeBSD about redsocks HOT 6 CLOSED

darkk avatar darkk commented on May 13, 2024
Can't compile on FreeBSD

from redsocks.

Comments (6)

przemoc avatar przemoc commented on May 13, 2024

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.

from redsocks.

fabianfrz avatar fabianfrz commented on May 13, 2024

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

from redsocks.

vgrebenschikov avatar vgrebenschikov commented on May 13, 2024

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); ...

from redsocks.

darkk avatar darkk commented on May 13, 2024

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.

from redsocks.

vgrebenschikov avatar vgrebenschikov commented on May 13, 2024

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

from redsocks.

darkk avatar darkk commented on May 13, 2024

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 :)

from redsocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.