semigodking / redsocks

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

https-connect is not working in redsocks2 #159

Open Thanraj opened 3 years ago

Thanraj commented 3 years ago

Libevent version: 2.1.12 Openssl version: 1.1.1h

Configuration file:

base { log_debug = on; log_info = on; log = \"file:/data/redsocks2.log\"; daemon = on; redirector = iptables; } redsocks { bind = \"127.0.0.1:8123\"; relay = \"10.161.104.36:9000\"; type = https-connect; autoproxy = 0; }

iptables -t nat -A OUTPUT -p tcp -d 10.161.104.36 -j RETURN iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:8123 iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:8123

================================================================ Getting following errors, when i use https-connect in config file:

redsocks2/redsocks.c:993 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance start redsocks2/https-connect.c:115 httpsc_instance_init(...) [REDSOCKS2] Using TLS client method! redsocks2/utils.c:519 make_socket_transparent(...) setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT): Protocol not available redsocks2/redsocks.c:1057 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance end (0) redsocks2/main.c:261 main(...) redsocks started with: epoll

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:40060->172.217.163.196:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:40060->172.217.163.196:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:37028->151.101.1.140:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:37028->151.101.1.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:35602->151.101.129.140:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end

redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:78 log_ssl_error(...) [192.0.2.2:40060->172.217.163.196:443]: SSL Error: SSL routines ssl3_get_record: wrong version number: Success redsocks2/https-connect.c:78 log_ssl_error(...) [192.0.2.2:40060->172.217.163.196:443]: SSL Error: (null) (null): (null): Success redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:40060->172.217.163.196:443]: relay, what: READING|0|0|ERROR|0|0|0x0: Success redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:40060->172.217.163.196:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:35602->151.101.129.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

Please provide what could be the issue?

semigodking commented 3 years ago

One possible reason is that your server is not a valid https proxy.

Thanraj notifications@github.com 于 2021年1月29日周五 21:03写道:

Libevent version: 2.1.12 Openssl version: 1.1.1h

Getting following errors, when i use https-connect

redsocks2/redsocks.c:993 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance start redsocks2/https-connect.c:115 httpsc_instance_init(...) [REDSOCKS2] Using TLS client method! redsocks2/utils.c:519 make_socket_transparent(...) setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT): Protocol not available redsocks2/redsocks.c:1057 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance end (0) redsocks2/main.c:261 main(...) redsocks started with: epoll

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:40060-> 172.217.163.196:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:40060-> 172.217.163.196:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:37028-> 151.101.1.140:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:37028-> 151.101.1.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:750 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client start redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:35602-> 151.101.129.140:443]: accepted redsocks2/redsocks.c:854 redsocks_accept_client(...) [REDSOCKS2] self->relay_ss->connect_relay redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl start redsocks2/utils.c:283 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl end redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:862 redsocks_accept_client(...) [REDSOCKS2] redsocks_accept_client end

redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:78 log_ssl_error(...) [192.0.2.2:40060-> 172.217.163.196:443]: SSL Error: SSL routines ssl3_get_record: wrong version number: Success redsocks2/https-connect.c:78 log_ssl_error(...) [192.0.2.2:40060-> 172.217.163.196:443]: SSL Error: (null) (null): (null): Success redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:40060-> 172.217.163.196:443]: relay, what: READING|0|0|ERROR|0|0|0x0: Success redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:40060-> 172.217.163.196:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:35602-> 151.101.129.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

Please provide what could be the issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD3ST3WAKHSW3JFBVBTS4KWZNANCNFSM4WY2OWUQ .

Thanraj commented 3 years ago

Hi semigodking,

thanks for the reply.

Initially I used third party proxy server and got SSL Error: SSL routines ssl3_get_record. After your input, I am checking with openssl server by listening on port,

Server Listening on 10.161.104.36:9000 $ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes $ openssl s_server -key key.pem -cert cert.pem -accept 9000 -www Using default temp DH parameters ACCEPT bad gethostbyaddr

Client1: Verified server with openssl client command from other machine via terminal and able to see SSL Handshake packets in wireshark. $ openssl s_client -connect 10.161.104.36:9000 -showcerts

Client2: When we use redsocks2, we are getting following errors:

redsocks2/redsocks.c:993 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance start redsocks2/https-connect.c:115 httpsc_instance_init(...) [REDSOCKS2] Using TLS! redsocks2/utils.c:519 make_socket_transparent(...) setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT): Protocol not available redsocks2/redsocks.c:1057 redsocks_init_instance(...) [REDSOCKS2] redsocks_init_instance end (0) redsocks2/main.c:261 main(...) redsocks started with: epoll redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list.

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:39916->172.217.163.164:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:39916->172.217.163.164:443]: relay, what: 0|0|0|0|0|CONNECTED|0x0: Success redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:39916->172.217.163.164:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:59090->151.101.193.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:59090->151.101.193.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:59978->151.101.65.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/redsocks.c:525 redsocks_event_error(...) [192.0.2.2:59978->151.101.65.140:443]: client, what: READING|0|EOF|0|0|0|0x0: Success

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list. redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:39916->172.217.163.164:443]: relay, what: 0|0|0|ERROR|0|0|0x0: Success redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:39916->172.217.163.164:443]: dropping client @ state: 1 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:59090->151.101.193.140:443]: relay, what: READING|0|0|ERROR|0|0|0x0: Connection reset by peer redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:59090->151.101.193.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:59978->151.101.65.140:443]: relay, what: READING|0|0|ERROR|0|0|0x0: Connection reset by peer redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:59334->151.101.193.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:35262->151.101.65.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0)

redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:35262->151.101.65.140:443]: relay, what: 0|WRITING|0|ERROR|0|0|0x0: Broken pipe redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:35262->151.101.65.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:59728->151.101.129.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:59728->151.101.129.140:443]: relay, what: 0|WRITING|0|ERROR|0|0|0x0: Broken pipe redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:59728->151.101.129.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:44506->151.101.1.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:44506->151.101.1.140:443]: relay, what: 0|WRITING|0|ERROR|0|0|0x0: Broken pipe redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:44506->151.101.1.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end

redsocks2/redsocks.c:847 redsocks_accept_client(...) [192.0.2.2:44512->151.101.1.140:443]: accepted redsocks2/https-connect.c:240 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay start redsocks2/utils.c:245 red_connect_relay_ssl(...) [REDSOCKS2] red_connect_relay_ssl redsocks2/https-connect.c:261 httpsc_connect_relay(...) [REDSOCKS2] httpsc_connect_relay end(0) redsocks2/https-connect.c:151 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb start redsocks2/https-connect.c:167 httpsc_event_cb(...) [192.0.2.2:44512->151.101.1.140:443]: relay, what: 0|WRITING|0|ERROR|0|0|0x0: Broken pipe redsocks2/redsocks.c:424 redsocks_drop_client(...) [192.0.2.2:44512->151.101.1.140:443]: dropping client @ state: 0 redsocks2/https-connect.c:203 httpsc_event_cb(...) [REDSOCKS2] httpsc_event_cb end

redsocks2/redsocks.c:952 redsocks_audit_instance(...) Audit client list for instance (https-connect @ 127.0.0.1:8123): redsocks2/redsocks.c:974 redsocks_audit_instance(...) End of auditing client list.

Why we are getting redsocks_event_error, Broken pipe, Connection reset by peer errors and data relay is not started.

For openssl standard server also we are facing this issues. please give support to identify the solution for HTTPS connection.

rampageX commented 3 years ago

Why is it so complicated to use openssl? Just use curl -x to test whether your HTTP PROXY can work properly.

Thanraj commented 3 years ago

Hi rampageX,

For http-connect, redsocks2 is working as expected. but i am facing issue with https-connect only.

I need HTTPS PROXY on redsocks2 and its giving this all issues.

rampageX commented 3 years ago

From WiKi: https://github.com/semigodking/redsocks/wiki/REDSOCKS2%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E, type - socks4/socks5/http-connect/http-relay/direct/shadowsocks 代理服务器的类型

I cant see where https-connect is.

Thanraj commented 3 years ago

Hi Rampagex,

Please check https://github.com/semigodking/redsocks/blob/master/redsocks.conf.example +86, New type is added. The https-connect source file is there for HTTPS_PROXY - https://github.com/semigodking/redsocks/blob/master/https-connect.c

Thanraj commented 3 years ago

Hi Semigodking/Rampagex,

Can you please suggest any HTTPS proxy server to test redsocks2 ? which should be able to accept https connection and give response for URL.

As you might be used earlier for validating this redsocks2 package.

semigodking commented 3 years ago

hi @Thanraj , when I was doing testing for this feature, I use 'stunnel' + 'tinyproxy'. You may try it out. I do not have enough time to verify it in recent.

Thanraj commented 1 year ago

Hi Semigodking,

Due to project hold, we are unable to continue this activity. Now we are checking redsocks2 https-connect feature.

As you said, we are trying to create 'stunnel' + 'tinyproxy' for HTTPS proxy. We got the following issue. Your comments on this issue will be useful in fixing this issue. please help us.

Stunnel4:

cert = /etc/stunnel/stunnel.pem pid = /var/run/stunnel.pid [proxy] accept = 443 connect = 8888

Tinyproxy:

User root Group root Port 8888 Timeout 600 DefaultErrorFile "/usr/share/tinyproxy/default.html" Logfile "/var/log/tinyproxy.log" LogLevel Info PidFile "/var/run/tinyproxy.pid" MaxClients 100 MinSpareServers 5 MaxSpareServers 20 StartServers 10 MaxRequestsPerChild 0 BasicAuth test test

Following error is occurred, when I try to access google.com from client machine.

root@administrator:~/Downloads# service stunnel4 status ● stunnel4.service - LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons) Loaded: loaded (/etc/init.d/stunnel4; generated) Active: active (running) since Wed 2022-07-27 17:16:04 IST; 1min 36s ago Docs: man:systemd-sysv-generator(8) Tasks: 2 (limit: 4915) CGroup: /system.slice/stunnel4.service └─7610 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf

Jul 27 17:17:40 administrator stunnel[7610]: LOG5[28]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Service [proxy] accepted connection from 192.168.1.101:57506 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[29]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Service [proxy] accepted connection from 192.168.1.101:57510 Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Service [proxy] accepted connection from 192.168.1.101:57512 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[30]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG3[31]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket

Please suggest if you have any idea about this issue.

semigodking commented 1 year ago

i have not verify this function for a long time. I do not think i have free time to work on this in recent.

Thanraj @.***> 于 2022年7月27日周三 19:59写道:

Stunnel4:

cert = /etc/stunnel/stunnel.pem pid = /var/run/stunnel.pid [proxy] accept = 443 connect = 8888

Tinyproxy:

User root Group root Port 8888 Timeout 600 DefaultErrorFile "/usr/share/tinyproxy/default.html" Logfile "/var/log/tinyproxy.log" LogLevel Info PidFile "/var/run/tinyproxy.pid" MaxClients 100 MinSpareServers 5 MaxSpareServers 20 StartServers 10 MaxRequestsPerChild 0 BasicAuth test test

Following error is occurred, when I try to access google.com from client machine.

@.***:~/Downloads# service stunnel4 status ● stunnel4.service - LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons) Loaded: loaded (/etc/init.d/stunnel4; generated) Active: active (running) since Wed 2022-07-27 17:16:04 IST; 1min 36s ago Docs: man:systemd-sysv-generator(8) Tasks: 2 (limit: 4915) CGroup: /system.slice/stunnel4.service └─7610 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf

Jul 27 17:17:40 administrator stunnel[7610]: LOG5[28]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Service [proxy] accepted connection from 192.168.1.101:57506 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[29]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Service [proxy] accepted connection from 192.168.1.101:57510 Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Service [proxy] accepted connection from 192.168.1.101:57512 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[30]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG3[31]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket

Please suggest if you have any idea about this issue.

— Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/159#issuecomment-1196635732, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XDYGJFILSZSRPWCBJI3VWEQD3ANCNFSM4WY2OWUQ . You are receiving this because you commented.Message ID: @.***>

Thanraj commented 1 year ago

i have not verify this function for a long time. I do not think i have free time to work on this in recent. Thanraj @.> 于 2022年7月27日周三 19:59写道: Stunnel4: cert = /etc/stunnel/stunnel.pem pid = /var/run/stunnel.pid [proxy] accept = 443 connect = 8888 Tinyproxy: User root Group root Port 8888 Timeout 600 DefaultErrorFile "/usr/share/tinyproxy/default.html" Logfile "/var/log/tinyproxy.log" LogLevel Info PidFile "/var/run/tinyproxy.pid" MaxClients 100 MinSpareServers 5 MaxSpareServers 20 StartServers 10 MaxRequestsPerChild 0 BasicAuth test test Following error is occurred, when I try to access google.com from client machine. @.:~/Downloads# service stunnel4 status ● stunnel4.service - LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons) Loaded: loaded (/etc/init.d/stunnel4; generated) Active: active (running) since Wed 2022-07-27 17:16:04 IST; 1min 36s ago Docs: man:systemd-sysv-generator(8) Tasks: 2 (limit: 4915) CGroup: /system.slice/stunnel4.service └─7610 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf Jul 27 17:17:40 administrator stunnel[7610]: LOG5[28]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Service [proxy] accepted connection from 192.168.1.101:57506 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[29]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[29]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Service [proxy] accepted connection from 192.168.1.101:57510 Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Service [proxy] accepted connection from 192.168.1.101:57512 Jul 27 17:17:40 administrator stunnel[7610]: LOG3[30]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[30]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Jul 27 17:17:40 administrator stunnel[7610]: LOG3[31]: SSL_accept: 1408F09B: error:1408F09B:SSL routines:ssl3_get_record:https proxy request Jul 27 17:17:40 administrator stunnel[7610]: LOG5[31]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket Please suggest if you have any idea about this issue. — Reply to this email directly, view it on GitHub <#159 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XDYGJFILSZSRPWCBJI3VWEQD3ANCNFSM4WY2OWUQ . You are receiving this because you commented.Message ID: @.***>

Hi Semigodking,

Requesting to check and update is there any issue in redsocks2 https-connect method source implementation. This functionality is not working in redsocks2.