Skip to content

Commit

Permalink
FreeBSD support
Browse files Browse the repository at this point in the history
  • Loading branch information
rofl0r committed Dec 25, 2012
1 parent be4efc0 commit 5526afb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ LOBJS = src/nameinfo.o \

CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
NO_AS_NEEDED = -Wl,--no-as-needed
LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) -ldl -lpthread
LIBDL = -ldl
LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
INC =
PIC = -fPIC
AR = $(CROSS_COMPILE)ar
Expand Down
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ parsearg() {
}

ismac() {
uname -s | grep Darwin
uname -s | grep Darwin >/dev/null
}

isbsd() {
uname -s | grep BSD >/dev/null
}

while true ; do
Expand Down Expand Up @@ -83,6 +87,9 @@ if ismac ; then
echo MAC_CFLAGS+=-DIS_MAC=1>>config.mak
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
echo INSTALL_FLAGS=-m>>config.mak
elif isbsd ; then
echo LIBDL=>>config.mak
echo "CFLAGS+=-DIS_BSD">>config.mak
fi

echo done, now run make \&\& make install
Expand Down
5 changes: 5 additions & 0 deletions src/hostentdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ static void hdb_add(struct hostent_list* hl, char* host, ip_type ip) {
}

static void hdb_fill(struct hostent_list *hl) {
#ifndef IS_BSD
struct hostent* hp;
while((hp = gethostent()))
if(hp->h_addrtype == AF_INET && hp->h_length == sizeof(in_addr_t)) {
hdb_add(hl, hp->h_name, (ip_type) { .as_int = *((in_addr_t*)(hp->h_addr_list[0])) });
}
#else
/* FreeBSD hangs on gethostent(). since this feature is not crucial, we just do nothing */
(void) hl;
#endif
}

void hdb_init(struct hostent_list *hl) {
Expand Down

7 comments on commit 5526afb

@nemysis
Copy link

@nemysis nemysis commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for FreeBSD Support, could you make a Download for this Version as proxychains-4.3.0.tar.bz2 and merge with haad too?

Then can i try to make a new updated FreeBSD Port.

@rofl0r
Copy link
Owner Author

@rofl0r rofl0r commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this exact commit here was released as version v4.4 (see tags)
here's the release announcement for 4.4 https://sourceforge.net/projects/proxychains/forums/forum/644747/topic/6519406

what should i merge from haad ? i am not aware of anything that he has in his repo that adds some value that my repo hasn't already.
have you seen this ? https://github.com/rofl0r/proxychains/wiki/quality-of-haad's-fork,-or-%22reasons-for-the-split%22

@nemysis
Copy link

@nemysis nemysis commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these links, have not knew

Ok not merge with haad you make this better

Please upload this 4.4 version please on

SF

http://sourceforge.net/projects/proxychains/files/proxychains/

or on Yours account here

https://github.com/rofl0r/proxychains/downloads

@rofl0r
Copy link
Owner Author

@rofl0r rofl0r commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github has shut-down their download services.
https://github.com/blog/1302-goodbye-uploads

but i'll create something on sourceforge if that makes you feel better.
which organisation are you representing ?

@rofl0r
Copy link
Owner Author

@rofl0r rofl0r commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nemysis
Copy link

@nemysis nemysis commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this GitHub information. This is the best to develop here and on SourceForge to store downloads.

I'm only a FreeBSD / PC-BSD contributor http://nemysis.anapnea.net/

Thanks for your effort and fork.

@nemysis
Copy link

@nemysis nemysis commented on 5526afb Jan 6, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks many for ProxyChainsNG site on SF this is great.

Please sign in to comment.