全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 7071|回复: 19

nfp OPENVZ brook+南琴浪rinetd 效果好过 v2ray+mkcp

[复制链接]
发表于 2018-4-19 10:56:34 | 显示全部楼层 |阅读模式
6刀年付刚升级了1G网口
本想升级内核支持bbr。担心启动不成功,太折腾。改用南琴浪推荐的rinetd。
刚才用北京电信,测试油管 1080  测试结果:
(1)用brook 可以稳定在3-7Mbps。适合看1920X1080@24
(2)用v2ray+mkcp 速度抖动厉害,在几百kbps-4Mbps之间抖动。勉强看1920X1080@24

root@nfp1:~/# mkdir Rinetd
root@nfp1:~/Rinetd# vi tcp_nanqinlang-rinetd-debian+ubuntu.sh
./tcp_nanqinlang-rinetd-debian+ubuntu.sh
文件内容是下面的脚本 只适用于debian和ubuntu,单个端口加速,我填写了brook的端口。
#!/bin/bash
Green_font="\033[32m" && Red_font="\033[31m" && Font_suffix="\033[0m"
Info="${Green_font}[Info]${Font_suffix}"
Error="${Red_font}[Error]${Font_suffix}"
echo -e "${Green_font}
#====================================================
# Project: tcp_nanqinlang
# Description: --debian&ubuntu --rinetd --singleNIC
# Version: based on linhua's origin
# Origin: https://github.com/linhua55/lkl_study
# Author: linhua && nanqinlang
# Blog:   https://sometimesnaive.org
# Github: https://github.com/nanqinlang
#====================================================
${Font_suffix}"

check_system(){
        #sort
        [[ -z "`cat /etc/issue | grep -iE "debian"`" && -z "`cat /etc/issue | grep -iE "ubuntu"`" ]] && echo -e "${Error} only support Debian !" && exit 1
        #bit
        [[ "`uname -m`" != "x86_64" ]] && echo -e "${Error} only support 64bit !" && exit 1
}

check_root(){
        [[ "`id -u`" != "0" ]] && echo -e "${Error} must be root user !" && exit 1
}

check_ovz(){
        apt-get update && apt-get install -y virt-what
        [[ "`virt-what`" != "openvz" ]] && echo -e "${Error} only support OpenVZ !" && exit 1
}

check_requirement(){
        # check iptables
        apt-get install -y iptables

        # check "iptables grep cut xargs ip awk"
        for CMD in iptables grep cut xargs ip awk
        do
                if ! type -p ${CMD}; then
                        echo -e "${Error} requirements not found, please check !" && exit 1
                fi
        done
}

directory(){
        [[ ! -d /home/tcp_nanqinlang ]] && mkdir -p /home/tcp_nanqinlang
        cd /home/tcp_nanqinlang
}

download(){
        wget https://raw.githubusercontent.co ... inetd/module/rinetd
        chmod +x rinetd
}

config-port(){
        echo -e "${Info} Please input port to be accelerated"
        read -p "(multi ports is diveded by space . not support port range. default port:8080):" ports

        if [[ -z "${ports}" ]]; then
                echo -e "0.0.0.0 8080 0.0.0.0 8080\c" >> config-port.conf
        else
                for port in ${ports}
                do
                        #can write config in new line
                        echo "0.0.0.0 ${port} 0.0.0.0 ${port}" >> config-port.conf
                done
        fi
}

config-rinetd(){
        # single NIC
        IFACE=`ip -4 addr | awk '{if ($1 ~ /inet/ && $NF ~ /^[ve]/) {a=$NF}} END{print a}'`
        echo -e "#!/bin/bash \ncd /home/tcp_nanqinlang \nnohup ./rinetd -f -c config-port.conf raw ${IFACE} &" >> config-rinetd.sh && chmod +x config-rinetd.sh
}

self-start(){
        sed -i "s/exit 0/ /ig" /etc/rc.local
        echo -e "\n/home/tcp_nanqinlang/config-rinetd.sh\c" >> /etc/rc.local
        chmod +x /etc/rc.local
}

run-it-now(){
        ./config-rinetd.sh
}

install(){
        check_system
        check_root
        check_ovz
        check_requirement
        directory
        download
        config-port
        config-rinetd
        self-start
        run-it-now
        status
}

status(){
        if [[ ! -z `ps -A | grep rinetd` ]]; then
                echo -e "${Info} tcp_nanqinlang is running !"
                else echo -e "${Error} tcp_nanqinlang not running, please check !"
        fi
}

uninstall(){
        check_root
        kill -9 `ps -A | grep rinetd | awk '{print $1}'`
        rm -rf /home/tcp_nanqinlang
        iptables -t raw -F
        sed -i '/\/home\/tcp_nanqinlang\/config-rinetd.sh/d' /etc/rc.local
        echo -e "${Info} uninstall finished."
}



echo -e "${Info} Please select function"
echo -e "1.install rinetd-bbr\n2.Check rinetd-bbr running status\n3.uninstall rinetd-bbr"
read -p "input number(1-3):" function

while [[ ! "${function}" =~ ^[1-3]$ ]]
        do
                echo -e "${Error} invalid parameter"
                echo -e "${Info} select again" && read -p "input number(1-3):" function
        done

if   [[ "${function}" == "1" ]]; then
        install
elif [[ "${function}" == "2" ]]; then
        status
else
        uninstall
fi
发表于 2018-4-19 10:59:13 | 显示全部楼层
等大佬们权威评测····
发表于 2018-4-19 11:01:02 | 显示全部楼层
kcp都救不了的网络要不就是udp被限制,要不就是真没救了。
3-7Mbps的还是趁早换了吧
发表于 2018-4-19 11:05:31 | 显示全部楼层
NFP效果其实还行   对比WOOT和HOST来说
 楼主| 发表于 2018-4-19 11:11:24 | 显示全部楼层
yousihai 发表于 2018-4-19 11:01
kcp都救不了的网络要不就是udp被限制,要不就是真没救了。
3-7Mbps的还是趁早换了吧 ...

AZURE 新加坡 V2RAY+WS
搬瓦工 CN2 V2RAY+WS
上面的节点也就是7-8Mbps。和本地网络运营商也有关系。
发表于 2018-4-19 11:12:48 | 显示全部楼层
魔都电信udp被QOS的死死的,不能用
发表于 2018-4-19 11:34:17 | 显示全部楼层
大佬有空装个ocserv对比一下效果呗,我感觉比brook好用。
发表于 2018-4-19 11:37:51 | 显示全部楼层
只能说你mkcp没设置好,kcp都慢的小鸡,直接扔了吧
 楼主| 发表于 2018-4-19 11:38:51 | 显示全部楼层
sarakuku 发表于 2018-4-19 11:34
大佬有空装个ocserv对比一下效果呗,我感觉比brook好用。

谢谢。ocserv 很多人推荐了。过几天安装试试。
 楼主| 发表于 2018-4-19 11:48:42 | 显示全部楼层
plyu007 发表于 2018-4-19 11:37
只能说你mkcp没设置好,kcp都慢的小鸡,直接扔了吧

我的设置是
  "inbound": {
    "port": 3XXXX,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX",
          "level": 1,
          "alterId": 64
        }
      ]
    },
    "streamSettings": {
      "network": "mkcp",
      "kcpSettings": {
        "mtu": 1350,
        "tti": 20,
        "uplinkCapacity": 5,
        "downlinkCapacity": 100,
        "congestion": false,
        "readBufferSize": 1,
        "writeBufferSize": 1,
        "header": {
          "type": "none"
        }
      }
    }
  },
老大请帮我看看这个有没有设置好。
@aru 大佬说的可能对,UDP被QOS了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-10 10:43 , Processed in 0.085518 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表