redsocks icon indicating copy to clipboard operation
redsocks copied to clipboard

s5代理失败

Open Ansen opened this issue 2 years ago • 2 comments

平台:ubuntu2204

ubuntu编译过程

git clone https://github.com/AlexZhuo/openwrt-redsocks2.git package/redsocks2
docker run -it --rm --name test  -v ./redsocks:/data ubuntu:22.04 bash
apt update && apt install build-essential  libssl-dev libevent-dev -y
make DISABLE_SHADOWSOCKS=true

配置文件

base {
  log_debug = on;
  log_info = on;
  daemon = off;
  redirector= iptables;
}
redsocks {
  bind = "0.0.0.0:1081";
  relay = "server.abc.com:16666";
  type = socks5;
  timeout = 12;
  autoproxy = 0;
  login = "username";
  password = "pwd";
}

运行

./redsocks2 -c config

ubuntu 上测试过程

image

debug日志:

1700542871.754027 debug utils.c:512 make_socket_transparent(...) setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT): Protocol not available
1700542871.754097 notice main.c:255 main(...) redsocks started with: epoll
1700542878.567079 debug redsocks.c:858 redsocks_accept_client(...) [127.0.0.1:56430->127.0.0.1:1081]: accepted
1700542878.956375 debug redsocks.c:430 redsocks_start_relay(...) [127.0.0.1:56430->127.0.0.1:1081]: data relaying started
1700542878.956399 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:56430->127.0.0.1:1081]: WCB client, fs: 0, ts: 0, fin: 0, fout: 0, tin: 111
1700542878.956413 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:56430->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 111, fout: 0, tin: 0
1700542878.956449 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:56430->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 0, fout: 0, tin: 0
1700542879.872032 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:56430->127.0.0.1:1081]: relay, what: READING|0|EOF|0|0|0|0x0: Success
1700542879.872060 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:56430->127.0.0.1:1081]: WCB client, fs: 2, ts: 0, fin: 0, fout: 0, tin: 0
1700542879.872247 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:56430->127.0.0.1:1081]: client, what: READING|0|EOF|0|0|0|0x0: Success
1700542879.872262 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:56430->127.0.0.1:1081]: WCB relay, fs: 6, ts: 2, fin: 0, fout: 0, tin: 0
1700542879.872280 debug redsocks.c:516 redsocks_shutdown(...) [127.0.0.1:56430->127.0.0.1:1081]: both client and server disconnected
1700542879.872285 debug redsocks.c:442 redsocks_drop_client(...) [127.0.0.1:56430->127.0.0.1:1081]: dropping client @ state: 5
1700542891.270416 debug redsocks.c:858 redsocks_accept_client(...) [127.0.0.1:39934->127.0.0.1:1081]: accepted
1700542891.615085 debug redsocks.c:430 redsocks_start_relay(...) [127.0.0.1:39934->127.0.0.1:1081]: data relaying started
1700542891.615109 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:39934->127.0.0.1:1081]: WCB client, fs: 0, ts: 0, fin: 0, fout: 0, tin: 4
1700542891.615124 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:39934->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 4, fout: 0, tin: 0
1700542891.615169 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:39934->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 0, fout: 0, tin: 0
1700542892.917983 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:39934->127.0.0.1:1081]: relay, what: READING|0|EOF|0|0|0|0x0: Success
1700542892.918010 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:39934->127.0.0.1:1081]: WCB client, fs: 2, ts: 0, fin: 0, fout: 0, tin: 0
1700542892.918220 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:39934->127.0.0.1:1081]: client, what: READING|0|EOF|0|0|0|0x0: Success
1700542892.918240 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:39934->127.0.0.1:1081]: WCB relay, fs: 6, ts: 2, fin: 0, fout: 0, tin: 0
1700542892.918263 debug redsocks.c:516 redsocks_shutdown(...) [127.0.0.1:39934->127.0.0.1:1081]: both client and server disconnected
1700542892.918272 debug redsocks.c:442 redsocks_drop_client(...) [127.0.0.1:39934->127.0.0.1:1081]: dropping client @ state: 5

我最开始是在红米ac2100上测试,发现连接不通后,又在ubuntu2204上测试,有同样的问题 openwrt的编译步骤见158

Ansen avatar Nov 21 '23 04:11 Ansen

未详细调试,我也不知道啊

On Tue, Nov 21, 2023, 12:28 An @.***> wrote:

平台:ubuntu2204

ubuntu编译过程

git clone https://github.com/AlexZhuo/openwrt-redsocks2.git package/redsocks2 docker run -it --rm --name test -v ./redsocks:/data ubuntu:22.04 bash apt update && apt install build-essential libssl-dev libevent-dev -y make DISABLE_SHADOWSOCKS=true

配置文件

base { log_debug = on; log_info = on; daemon = off; redirector= iptables; } redsocks { bind = "0.0.0.0:1081"; relay = "server.abc.com:16666"; type = socks5; timeout = 12; autoproxy = 0; login = "username"; password = "pwd"; }

运行

./redsocks2 -c config

ubuntu 上测试过程

[image: image] https://user-images.githubusercontent.com/676412/284462060-4548c637-7a75-4243-beba-e170596a089b.png

debug日志:

1700540640.363865 debug utils.c:507 make_socket_transparent(...) setsockopt(fd, SOL_IP, IP_TRANSPARENT): Operation not permitted 1700540640.363874 debug utils.c:512 make_socket_transparent(...) setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT): Protocol not available 1700540640.363876 err utils.c:515 make_socket_transparent(...) Can not make socket transparent. See debug log for details. 1700540640.363878 warning redsocks.c:1020 redsocks_init_instance(...) Continue without TPROXY support 1700540640.363944 notice main.c:255 main(...) redsocks started with: epoll 1700540646.606878 debug redsocks.c:858 redsocks_accept_client(...) [127.0.0.1:54948->127.0.0.1:1081]: accepted 1700540647.019166 debug redsocks.c:430 redsocks_start_relay(...) [127.0.0.1:54948->127.0.0.1:1081]: data relaying started 1700540647.019190 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:54948->127.0.0.1:1081]: WCB client, fs: 0, ts: 0, fin: 0, fout: 0, tin: 111 1700540647.019204 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:54948->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 111, fout: 0, tin: 0 1700540647.019238 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:54948->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 0, fout: 0, tin: 0 1700540647.935351 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:54948->127.0.0.1:1081]: relay, what: READING|0|EOF|0|0|0|0x0: Success 1700540647.935377 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:54948->127.0.0.1:1081]: WCB client, fs: 2, ts: 0, fin: 0, fout: 0, tin: 0 1700540647.935561 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:54948->127.0.0.1:1081]: client, what: READING|0|EOF|0|0|0|0x0: Success 1700540647.935575 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:54948->127.0.0.1:1081]: WCB relay, fs: 6, ts: 2, fin: 0, fout: 0, tin: 0 1700540647.935592 debug redsocks.c:516 redsocks_shutdown(...) [127.0.0.1:54948->127.0.0.1:1081]: both client and server disconnected 1700540647.935599 debug redsocks.c:442 redsocks_drop_client(...) [127.0.0.1:54948->127.0.0.1:1081]: dropping client @ state: 5 1700540650.071245 debug redsocks.c:858 redsocks_accept_client(...) [127.0.0.1:47374->127.0.0.1:1081]: accepted 1700540650.453815 debug redsocks.c:430 redsocks_start_relay(...) [127.0.0.1:47374->127.0.0.1:1081]: data relaying started 1700540650.453823 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:47374->127.0.0.1:1081]: WCB client, fs: 0, ts: 0, fin: 0, fout: 0, tin: 4 1700540650.453827 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:47374->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 4, fout: 0, tin: 0 1700540650.453837 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:47374->127.0.0.1:1081]: WCB relay, fs: 0, ts: 0, fin: 0, fout: 0, tin: 0 1700540651.891326 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:47374->127.0.0.1:1081]: relay, what: READING|0|EOF|0|0|0|0x0: Success 1700540651.891335 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:47374->127.0.0.1:1081]: WCB client, fs: 2, ts: 0, fin: 0, fout: 0, tin: 0 1700540651.891423 debug redsocks.c:541 redsocks_event_error(...) [127.0.0.1:47374->127.0.0.1:1081]: client, what: READING|0|EOF|0|0|0|0x0: Success 1700540651.891431 debug redsocks.c:336 process_shutdown_on_write_(...) [127.0.0.1:47374->127.0.0.1:1081]: WCB relay, fs: 6, ts: 2, fin: 0, fout: 0, tin: 0 1700540651.891440 debug redsocks.c:516 redsocks_shutdown(...) [127.0.0.1:47374->127.0.0.1:1081]: both client and server disconnected 1700540651.891443 debug redsocks.c:442 redsocks_drop_client(...) [127.0.0.1:47374->127.0.0.1:1081]: dropping client @ state: 5

我最开始是在红米ac2100上测试,发现连接不通后,又在ubuntu2204上测试,有同样的问题 openwrt的编译步骤见158 https://github.com/semigodking/redsocks/issues/158#issuecomment-1820152982

— Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD3K6TMTBXNHNT6OUU3YFQUXBAVCNFSM6AAAAAA7T5QBBWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYDGNBTGU4TANY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

semigodking avatar Nov 26 '23 03:11 semigodking

和#194应该是同一个问题。

semigodking avatar Jan 28 '24 13:01 semigodking