darkk / redsocks

transparent TCP-to-proxy redirector
http://darkk.net.ru/redsocks
3.23k stars 854 forks source link

failed to cross-compile for Android #37

Open iwinux opened 11 years ago

iwinux commented 11 years ago

redudp.c has been using tfind / tsearch functions (defined in <search.h>) since commit 709646d59d96cb73a7e70347f37de9823e4e5f14, which causes the failure of cross-compiling for Android, because the Android standalone toolchain doesn't provide <search.h>, neither does it implements tfind related functions.

A quick fix can be done by downloading the missing files from here, put them into the redsocks repo, and update Makefile to add these dependencies. (tested on my machine and it works)

What do you think?

Periphory commented 9 years ago

Hey, where did you find the definitions for node_t? I tried to copy the files as you say but I cannot find definitions of node_t.

iwinux commented 9 years ago

@Periphory well, since this was a nearly two-year old issue, things may change drastically :(

Periphory commented 9 years ago

Hmm, I cannot find a more up-to-date straight build for Android. None of the files that are in the place you linked have been updated since before then so there must be a definition somewhere.

darkk commented 6 years ago

I've added following paragraph to README:

When is redsocks probably a wrong tool?

Tell me, is Android build still relevant for your project? Probably, tun2socks (or alike code) would suit better as it has same capabilities and does not require root.