ss-bash icon indicating copy to clipboard operation
ss-bash copied to clipboard

modify get_traffic_from_iptables() to be compatible with CentOS 6

Open gunziyang opened this issue 7 years ago • 8 comments

gunziyang avatar Jul 08 '17 09:07 gunziyang

Thanks for the Pull request. Actually I don't know the details about the differences between Linux distributions. So I can't review the changes. Can you or someone provide some test results of the changes on popular Linux distributions?

hellofwy avatar Jul 08 '17 11:07 hellofwy

你想要什么样的测试结果?抱歉,git commit的时候那台机器不支持中文,所以用英文提交了[捂脸].

gunziyang avatar Jul 08 '17 12:07 gunziyang

其实,我水平有限,所以写了这个脚本后,就没怎么更新过了。 所以我内心不怎么想合并新修改了,感觉能力和精力都不够。 好在很多人 fork 之后,根据自己的需求添加了不少功能。 所以感谢你的修改,这个 request 我就不关了,希望有对应需要的能看到。 希望你能理解,而且以后也能积极为其他开源项目贡献代码。

hellofwy avatar Jul 08 '17 13:07 hellofwy

没关系啦,这是你的自由。这也是我第一个次pull,就是感觉自己一方面用了你的代码,另一方面自己也修改了一点点小地方,使它能正常工作,所以就想试试github的pull流程,希望能回馈代码的作者。

谢谢你的回复,希望以后还能有合作的机会。

在 2017年7月8日 下午9:24,hellofwy [email protected]写道:

其实,我水平有限,所以写了这个脚本后,就没怎么更新过了。 所以我内心不怎么想合并新修改了,感觉能力和精力都不够。 好在很多人 fork 之后,根据自己的需求添加了不少功能。 所以感谢你的修改,这个 request 我就不关了,希望有对应需要的能看到。 希望你能理解。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hellofwy/ss-bash/pull/40#issuecomment-313855762, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMtr2KOiLv5IbvSPGpif9A061IcgUH7ks5sL4MTgaJpZM4ORsZp .

-- 杨俊 [email protected]

gunziyang avatar Jul 15 '17 09:07 gunziyang

感谢你,修改之后再CentOS 6下可以统计流量了

huangzhic avatar Oct 05 '17 03:10 huangzhic

棒哦CentOS7也可用

Fndroid avatar Oct 14 '17 07:10 Fndroid

@hellofwy 突然想起一个事,我修改的时候,没有考虑兼容Debian。

也就是说,正确的做法应该是

if(centos) 用我修订过的规则
if(Debian) 用原来的规则

或者

用一套能兼容两个系统的规则

而我的做法是

用我修订过的规则

我的做法有可能导致我修订过的版本在Debian下不能正常使用。

求有心人测试。

gunziyang avatar Oct 18 '17 02:10 gunziyang

@gunziyang iptables: No chain/target/match by that name 修改适配centos6以后 命令行老出现这个提示是怎么回事呀,希望你有时间帮我解答一下,谢谢啦,还有一个问题是我的流量总是和服务器控制面板的不一样,没有控制面板使用的多,是不是我哪里设置有问题呀

2882889 avatar Mar 08 '18 10:03 2882889