proxychains-ng icon indicating copy to clipboard operation
proxychains-ng copied to clipboard

proxychains-ng does not work some software use epoll

Open smkingsoft opened this issue 8 years ago • 9 comments

some software just like nginx use epoll, proxychains-ng does not work. only nginx use poll or select, proxychains-ng can work

smkingsoft avatar Dec 21 '16 14:12 smkingsoft

interesting find. do you have an idea why that is so ?

rofl0r avatar Dec 21 '16 14:12 rofl0r

it seems can not wake up epoll_wait. proxychains-ng use poll ? epoll and poll or select mode is different?

smkingsoft avatar Dec 22 '16 06:12 smkingsoft

yes, proxychains uses both poll and select internally:

./src/allocator_thread.c:       while((ret = select(readfd+1, &fds, NULL, NULL, 
./src/core.c:           ret = poll(fds, nfsd, time_remain);
./src/core.c:           ret = poll_retry(pfd, 1, tcp_connect_time_out);

but i don't see yet how that can disturb someone else's use of epoll.

rofl0r avatar Dec 22 '16 13:12 rofl0r

so so... i use nginx as reverse proxy. nginx ->proxychains-ng ->shadowsocks ->internet nginx default use epoll event, then nginx can not receive http response. now i config nginx use poll event, that is ok

smkingsoft avatar Dec 23 '16 07:12 smkingsoft

oh, so nginx *calls* proxychains-ng ? how did you configure that ?

rofl0r avatar Dec 23 '16 12:12 rofl0r

use #proxychains4 nginx arguments start nginx config proxychains socks5 ip port

smkingsoft avatar Dec 25 '16 10:12 smkingsoft

sorry to pull it back up but @smkingsoft would you please explain how you manage to work it like this? maybe you can post a config of yours? i am trying the same but cant manage to get it to work :(

itskeKs avatar Mar 27 '17 19:03 itskeKs

  1. config nginx as a resolver proxy
  2. config nginx use epoll mode
  3. config proxychains use socks5 proxy
  4. use cmd: proxychains4 nginx [arguments] start nginx

smkingsoft avatar Mar 31 '17 01:03 smkingsoft

epoll can not wake up by new fd(dup2).https://news.ycombinator.com/item?id=13918141

zhaowq32 avatar Jun 03 '18 12:06 zhaowq32