-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Haiku support #340
Add Haiku support #340
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, but left some comments
src/common.c
Outdated
@@ -74,7 +74,11 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) { | |||
|
|||
// priority 3; $HOME/.proxychains/proxychains.conf | |||
path = getenv("HOME"); | |||
#ifdef IS_HAIKU | |||
snprintf(pbuf, bufsize, "%s/config/settings/%s", path, PROXYCHAINS_CONF_FILE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd rather just add this path unconditionally as "priority 4" rather than having distrinct layout per OS
Thanks for your response. To do a pull request one must visit https://review.haiku-os.org and submit a change there for review. You don't have to create an account there, cause when you try to sign in you will be prompted to allow Gerrit access your github account. Once linked, go to the dashboard->YOUR->CHANGES->CREATE CHANGE and follow the instructions. |
i already tried that, but then pushing failed because "committer's email address not registered" and you can't just put your email addr in gerrit, you need to "unlock" it with a confirmation mail. since i use a noreply email address for commits, that impossible. you see, a lot of hassle. |
If changes could be made on Haiku's side, I think there is no need to merge my commit here. Probably the only thing that needs to be updated is in the README: list haiku as a supported platform
No worries. Then I will help you to submit the changes :) |
we'd still need the configure part for LIBDL (in case haiku doesn't provide an empty libdl.a if the dl functionality is in libc.so), the user directory plus the undef satosin (it's a namespace violation of haiku to make it available like this, but otoh FreeBSD also defines it, although only with some feature test macro)
thanks, much appreciated |
You're welcome. Yep, I will fix my commit later :) |
…d a new configure file path for haiku
hey @rofl0r, Review progress of your patch is available here: https://review.haiku-os.org/c/haiku/+/3147 |
thanks, your PR looks perfect now
i think the edit: your change of int type to int af seems bogus. maybe it would be best to just remove the variable names from the declaration |
I know..that's why I added |
let's leave this open until haiku merges the fix, then i'll merge |
haiku is fixed: haiku/haiku@7de1ebe thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a look at an open PR at haikuports at: haikuports/haikuports#5212
Made some changes as that one isn't ready for use, but starting proxychains4 crashes (build with gcc8):
~> proxychains4-x86 curl suip.biz/ip/
[proxychains] config file found: /packages/proxychains_ng_x86-4.14~git-1/.settings/proxychains.conf
[proxychains] preloading /packages/proxychains_ng_x86-4.14~git-1/.self/lib/x86/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.14-git
resolve symbol "___tls_get_addr" returned: -2147478780
[proxychains] Strict chain ... 127.0.0.1:9050 ... timeout
curl: (7) Couldn't connect to server
Kill Thread
@@ -213,6 +218,9 @@ elif isbsd ; then | |||
elif issolaris; then | |||
echo "CFLAGS+=-DIS_SOLARIS -D__EXTENSIONS__" >> config.mak | |||
echo "SOCKET_LIBS=-lsocket -lnsl" >> config.mak | |||
elif ishaiku ; then | |||
echo LIBDL=>>config.mak | |||
echo "CFLAGS+=-DIS_HAIKU" >> config.mak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add this?
+ echo "SOCKET_LIBS=-lnetwork" >> config.mak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe? does it fix it or not ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe? does it fix it or not ?
Doesn't fix, but on Haiku 32bit with gcc2 we use -lsocket, for gcc8 we have to use -lnetwork, so if this is a requirement I think it should be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does the choice of gcc affect in which library stuff is being put? that sounds illogical.
which functions that we require/hook reside in libsocket/libnetwork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure (not a developer here, and don't know the ins and outs for the Haiku core), but could be that -lsocket is kept for backwards compatibility for BeOS apps/libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS, thought that the lines preceding this would give a clue that it could be needed?
echo "SOCKET_LIBS=-lsocket -lnsl" >> config.mak
|
||
// priority 3b: ~/config/settings/proxychains.conf (for haiku) | ||
path = getenv("HOME"); | ||
snprintf(pbuf, bufsize, "%s/config/settings/%s", path, PROXYCHAINS_CONF_FILE); | ||
path = pbuf; | ||
if(check_path(path)) | ||
goto have; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? proxychains.conf is saved in /boot/system/settings for this (running "runConfigure ./configure"
where's that coming from ?
and this?
if this is tor, did you configure it as socks4 proxy as it should be ? |
I only used an example on how to use the binary, not so familiar with these, is there any documentation to do a quick check otherwise? |
you need a working proxy, then add the correct proxy url to the end of proxychains.conf for example if you run tor, the example config should work. if you don't wanna install tor you can try microsocks which is a tiny socks5 proxy server i wrote. if you have issues, we can chat if you come to the IRC channel mentioned in README. |
Haiku OS has a compatible POSIX layer. So it's possible to add support for it. Basic features are tested working on Haiku.