so around one year ago, I posted a topic here complaining about inability of setting proxy server for apps (e.g HaikuDepot). Today I ported proxychains-ng to Haiku and that works!
To install and configure proxychains, just follow the instructions in README file.
Besides this port also ships a simple wrapper script to force any app use proxy:
For examples:
To force HaikuDepot access internet through proxy
launch_app.sh HaikuDepot
To force WebPositive use proxy (DNS will be resolved remotely)
launch_app.sh WebPositive
To force Otter-Browser use proxy (DNS will be resolved remotely)
launch-app.sh Otter-Browser/Otter-Browser
=========================
I noticed that what proxychains actually does is to hijack the system library at runtime and replace certain network related functions with it’s own ones. And I think system-wide proxy can be possible by adopting this strategie.
So the following system functions have to be changed:
connect(), sendto(), close(), gethostbyname(), getaddrinfo(), freeaddrinfo(),
gethostbyaddr(), getnameinfo()
A new option in Network Manager:
Network->Services->Proxy settings
No, it’s not. Mine is actually a clean fork from the original one. That’s why I name it proxychains-haiku. Certain changes are necessary to make it compile and run on Haiku.
His patch does not reflect those critical changes. And the compilation should failed due to conflict function definition.
You really want to try and make your work acceptable upstream… Importing a random version as “initial commit” in a git repo is probably not the cleanest way.
Can’t you fork the original and work from there? It’s way easier to make patches, rebase and all the stuff… Even if you don’t want to have a github account having proper patches that apply to it means someone else can fork it there and make a pull-request with your work.
Latest commit checkout has been imported into the existing PR, I still used the patch included at haikuports as Beta2 didn’t get an update on that fix, packages can be installed over HaikuDepot and/or pkgman (in Terminal), I left some comments on the Haiku fix at their github account, would be nice if someone with a working proxy could check this out and comment on it.