proxychains4 with Go lang
vpotap opened this issue ยท 9 comments
some problem running proxychaings4 with go lang:
proxychains4 go run main.go
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.12_1/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.12
command-line-arguments
[proxychains] DLL init: proxychains-ng 4.12
fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES)
runtime stack:
runtime.throw(0x176eca6, 0x3f)
/usr/local/Cellar/go/1.9/libexec/src/runtime/panic.go:605 +0x95 fp=0x7fff5fbff4e0 sp=0x7fff5fbff4c0 pc=0x102a185
runtime.goenvs()
/usr/local/Cellar/go/1.9/libexec/src/runtime/os_darwin.go:106 +0x9e fp=0x7fff5fbff510 sp=0x7fff5fbff4e0 pc=0x1027a3e
runtime.schedinit()
is proxychains compatible with Go lang ? I suppose it could be *libc depend problem ?
proxychains hooks to dynamically loaded libc.
- go doesn't even use libc, it uses its own syscall wrappers
- go doesn't use dynamic linking, it uses static linking
so there's no way we could use this technique with go. the only way to hook into go binaries would be by using ptrace to hook the system calls themselves, which is hairy and platform-dependent - i.e. it means it would be a lot more work to produce and maintain.
so i fear it is out of scope for this utility.
doesn't go link against libc by default specifically for some net functions?
also proxychains could provide a static library to link when compiling other programs, like this one does, which I don't think proxychains currently offers
doesn't go link against libc by default specifically for some net functions?
afaik no.
proxychains could provide a static library to link when compiling other programs, like this one does, which I don't think proxychains currently offers
that's a cool idea (i would actually implement it by including a special header in 3rd party apps that does something like #define connect(A, B, C) connect_wrapper(A, B, C)
) but then, using it in go wouldnt be straightforward either i guess. also it's a lot of work and my interest in go
is almost zero...
instead of making a ptrace-hook proxychains-clone for go i would have prefered if people would have stopped using go...
Okay, eccentric golang.
building go applications with go-pie worked for me for use with proxychains
building go applications with go-pie worked for me for use with proxychains
Could you please kindly give some more info about go-pie, I googled it but didn't find anything useful. Thanks.