helloworld icon indicating copy to clipboard operation
helloworld copied to clipboard

ssrplus服务反复重启

Open yanzhx7 opened this issue 1 year ago • 16 comments

lean最新源码编译,设备rax3000m,小米R3G,默认配置单线程编译,机场可用,配置后ssr服务反复重启,请问是哪里还需要配置嘛? Snipaste_2024-05-31_21-47-26 Snipaste_2024-05-31_21-47-39 Snipaste_2024-05-31_21-42-29

yanzhx7 avatar May 31 '24 13:05 yanzhx7

无节点复现,能否提供一个节点我看看是不是有问题,可邮件发我,有问题我来解决。。。

zxlhhyccc avatar Jun 01 '24 14:06 zxlhhyccc

无节点复现,能否提供一个节点我看看是不是我有问题,可发邮件给我,我会解决疑惑。

麻烦您提供下邮箱,

yanzhx7 avatar Jun 02 '24 04:06 yanzhx7

麻烦您提供下邮箱,

[email protected]

zxlhhyccc avatar Jun 03 '24 11:06 zxlhhyccc

麻烦您提供下邮箱,

[email protected]

节点已发送邮箱。

yanzhx7 avatar Jun 03 '24 12:06 yanzhx7

节点已发送邮箱。

经多次测试,一切正常,无法复现你的问题,出现问题的ssrp是你自己编译的吗? image

zxlhhyccc avatar Jun 03 '24 13:06 zxlhhyccc

节点已发送邮箱。

经多次测试,一切正常,无法复现你的问题,出现问题的ssrp是你自己编译的吗? image

是的,使用lean源码,通过修改feed文件,去掉helloword的#注释,只勾选硬件型号,默认配置单线编译,全局梯子,在不启用helloword,编译的固件都是正常可用。

yanzhx7 avatar Jun 03 '24 14:06 yanzhx7

是的,使用lean源码,通过修改feed文件,去掉helloword的#注释,只勾选硬件型号,默认配置单线编译,全局梯子,在不启用helloword,编译的固件都是正常可用。

不要修改修改feed文件,git下来直接放到package里然后编译试试。另外,我的ssR源码与这个仓库的源码补丁有点区别,你将104-fix-use-after-free.patch 补丁改为:

From 445a484de9c9bf801572d970f45ad0e11a18e35d Mon Sep 17 00:00:00 2001
From: MoetaYuko <[email protected]>
Date: Sun, 31 Mar 2024 19:06:59 +0800
Subject: [PATCH] shadowsocksr-libev: fix use-after-free due to a typo (#193)

---
 shadowsocksr-libev/src/server/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/server/server.c
+++ b/server/server.c
@@ -1943,7 +1943,7 @@ main(int argc, char **argv)
             memcpy(text, protocol, strlen(protocol) - 11);
             int length = strlen(protocol) - 11;
             free(protocol);
-            obfs = (char*)malloc(length);
+            protocol = (char*)malloc(length);
             memset(protocol, 0x00, length);
             memcpy(protocol, text, length);
             LOGI("protocol compatible enable, %s", protocol);

zxlhhyccc avatar Jun 03 '24 16:06 zxlhhyccc

是的,使用lean源码,通过修改feed文件,去掉helloword的#注释,只勾选硬件型号,默认配置单线编译,全局梯子,在不启用helloword,编译的固件都是正常可用。

不要修改修改feed文件,git下来直接放到package里然后编译试试。另外,我的ssR源码与这个仓库的源码补丁有点区别,你将104-fix-use-after-free.patch 补丁改为:

From 445a484de9c9bf801572d970f45ad0e11a18e35d Mon Sep 17 00:00:00 2001
From: MoetaYuko <[email protected]>
Date: Sun, 31 Mar 2024 19:06:59 +0800
Subject: [PATCH] shadowsocksr-libev: fix use-after-free due to a typo (#193)

---
 shadowsocksr-libev/src/server/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/server/server.c
+++ b/server/server.c
@@ -1943,7 +1943,7 @@ main(int argc, char **argv)
             memcpy(text, protocol, strlen(protocol) - 11);
             int length = strlen(protocol) - 11;
             free(protocol);
-            obfs = (char*)malloc(length);
+            protocol = (char*)malloc(length);
             memset(protocol, 0x00, length);
             memcpy(protocol, text, length);
             LOGI("protocol compatible enable, %s", protocol);

按这个方法测试不行,ssr服务依然会反复重启。 编译环境debian11.8,语言中文,阿里云软件源,2c2g 128G配置,单线程编译无报错。

yanzhx7 avatar Jun 04 '24 06:06 yanzhx7

编译环境debian11.8,语言中文,阿里云软件源,2c2g 128G配置,单线程编译无报错。

和编译环境没有关系,难道是lean的源码有问题?我是官方main分支编译。

zxlhhyccc avatar Jun 04 '24 11:06 zxlhhyccc

编译环境debian11.8,语言中文,阿里云软件源,2c2g 128G配置,单线程编译无报错。

和编译环境没有关系,难道是lean的源码有问题?我是官方main分支编译。

可能是的,尝试编译2个设备都是这个问题,提交过issues被关闭了,感谢前面帮助。

yanzhx7 avatar Jun 04 '24 13:06 yanzhx7

后面编译的固件都是运行不了,SSR节点用的是rc4-md5、origin、http_simple,都是显示ShadowsocksR Plus+ 未运行,不知道如何解决

ssr日志 2024-06-12 21:58:58: Main node:Shadowsocks 2 Threads Started! 2024-06-12 21:58:58: ----------start------------ 2024-06-12 21:58:52: ssrplus redir tcp error.restart!

系统日志 Wed Jun 12 21:58:52 2024 user.notice shadowsocksr: ssrplus redir tcp error.restart! Wed Jun 12 21:59:48 2024 user.notice shadowsocksr: ssrplus redir tcp error.restart! Wed Jun 12 22:00:30 2024 user.notice shadowsocksr: ssrplus redir tcp error.restart!

查一下issue有一个也是这样 https://github.com/fw876/helloworld/issues/1331

Screenshot 2024-06-12 225658 Screenshot 2024-06-12 225712

wct666 avatar Jun 12 '24 15:06 wct666

编译时编译openssl从3.0修改到1.1.1就可以正常运行RC4-MD5了,编译也正常。 具体操作 拉取lean源码后 下载官方22.03的源码 https://github.com/openwrt/openwrt/archive/refs/tags/v22.03.6.zip

进入 路径 删除lean的源码的openssl目录 rm -r ./lede/package/libs/openssl 复制官方源码的openssl到当前路径然后正常编译即可 cp -r ./openwrt-22.03.6/package/libs/openssl ./lede/package/libs/

image

wct666 avatar Jun 13 '24 16:06 wct666

image

OpenSSL 官方 3.3.x 以上修复了

coolsnowwolf avatar Jun 20 '24 17:06 coolsnowwolf

https://github.com/openssl/openssl/commit/7d56a74a96828985db7354a55227a511615f732b

coolsnowwolf avatar Jun 20 '24 17:06 coolsnowwolf

openssl/openssl@7d56a74

@coolsnowwolf 请问大佬,3.3预计什么时候集成到openwrt官方代码或者您的lede代码里呢?截止到现在,我看这两个代码仓都没有合并这个修改。

Christopher-Songs avatar Aug 20 '24 01:08 Christopher-Songs

尝试了其他各类代理,就是没有全局模式+设置DNS为本机5335端口,还是希望能尽快用回ssrplus

openwrtledediy avatar Sep 03 '24 19:09 openwrtledediy