semigodking / redsocks

transparent redirector of any TCP/UDP connection to proxy
Apache License 2.0
1.16k stars 247 forks source link

Compile on Ubuntu 18.04 failed #107

Open jsvisa opened 5 years ago

jsvisa commented 5 years ago

When I'm build the redsocks on Ubuntu 18.04 with Linux 4.15.0-43-generic,

with openssl version: OpenSSL 1.1.0g 2 Nov 2017.

The error message as below:

Compile with OpenSSL by default. To compile with PolarSSL, run 'make USE_CRYPTO_POLARSSL=true' instead.
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o parser.o parser.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o main.o main.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o redsocks.o redsocks.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o log.o log.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o direct.o direct.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o ipcache.o ipcache.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o autoproxy.o autoproxy.c
cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DUSE_CRYPTO_OPENSSL   -c -o encrypt.o encrypt.c
In file included from encrypt.c:50:0:
encrypt.h:92:18: error: field ‘evp’ has incomplete type
     cipher_evp_t evp;
                  ^~~
encrypt.c: In function ‘enc_key_init’:
encrypt.c:919:17: error: storage size of ‘cipher_info’ isn’t known
     cipher_kt_t cipher_info;
                 ^~~~~~~~~~~
encrypt.c:919:17: warning: unused variable ‘cipher_info’ [-Wunused-variable]
At top level:
encrypt.c:146:12: warning: ‘crypto_stream_xor_ic’ defined but not used [-Wunused-function]
 static int crypto_stream_xor_ic(uint8_t *c, const uint8_t *m, uint64_t mlen,
            ^~~~~~~~~~~~~~~~~~~~
encrypt.c:139:18: warning: ‘supported_ciphers_key_size’ defined but not used [-Wunused-const-variable=]
 static const int supported_ciphers_key_size[] =
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c:134:18: warning: ‘supported_ciphers_iv_size’ defined but not used [-Wunused-const-variable=]
 static const int supported_ciphers_iv_size[] =
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'encrypt.o' failed
make: *** [encrypt.o] Error 1
semigodking commented 5 years ago

See #84

goldcome commented 4 years ago
OpenSSL 1.1.1  11 Sep 2018 (Library: OpenSSL 1.1.1d  10 Sep 2019)

$ git apply patches/disable-ss.patch
error: patch failed: Makefile:1
error: Makefile: patch does not apply
error: patch failed: redsocks.c:56
error: redsocks.c: patch does not apply
error: patch failed: redudp.c:64
error: redudp.c: patch does not apply
semigodking commented 4 years ago

make DISABLE_SHADOWSOCKS=true

goldcome notifications@github.com 于 2020年3月24日周二 08:45写道:

$ git apply patches/disable-ss.patch error: patch failed: Makefile:1 error: Makefile: patch does not apply error: patch failed: redsocks.c:56 error: redsocks.c: patch does not apply error: patch failed: redudp.c:64 error: redudp.c: patch does not apply

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/107#issuecomment-602937354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD5IYADMASRL3CJY4RLRI77CBANCNFSM4GOVN6RA .

rampageX commented 4 years ago

@semigodking 建议删除 shadowsocks 相关代码,一是它更新比较频繁,二来现在的类似方案也很多,反正都会本地建立 socks5 服务,支持 socks5 就足够了。

semigodking commented 4 years ago

@semigodking 建议删除 shadowsocks 相关代码,一是它更新比较频繁,二来现在的类似方案也很多,反正都会本地建立 socks5 服务,支持 socks5 就足够了。

是的,但改成默认不编译ss比较好,万一有人要用也还可以用。欢迎PR

sonywork commented 3 years ago

我现在在Mac上用的是v2ray和Shadsocks客户端,而且是有多节点,可能需要手动切换。配合一个PF小工具使用https://github.com/sonywork/Brick