Git Product home page Git Product logo

Comments (11)

xtaci avatar xtaci commented on May 13, 2024

嗯,建议用tc控制下,我就是这么用的,并且排除google drive, icloud, s3的上行流量,这个问题就是用tc解决最合适,最专业。当然,如果路由器本身能做到对某个VPS的IP做上行限流,最好, kcp本身并不限流

from kcptun.

xtaci avatar xtaci commented on May 13, 2024
#!/bin/bash
tc qdisc del dev p2p1 root

# root
tc qdisc add dev p2p1 root handle 1: htb
# up
tc class add dev p2p1 parent 1: classid 1:1 htb rate 4mbit
tc class add dev p2p1 parent 1:1 classid 1:10 htb rate 2mbit
tc class add dev p2p1 parent 1:1 classid 1:20 htb rate 2mbit
tc qdisc add dev p2p1 parent 1:10 handle 10: sfq perturb 10

# filter
tc filter add dev p2p1 protocol ip parent 1:0 prio 1 handle 10 fw flowid 1:10
tc filter add dev p2p1 protocol ip parent 1:0 prio 1 handle 20 fw flowid 1:20

tc 分类,4M 上行分为两个2M上行,一个国内,一个KCP

mangle 
-A POSTROUTING -o p2p1 -d 108.61.XXX.XXX -j MARK --set-mark 20
-A POSTROUTING -o p2p1 -m iprange --src-range 192.168.1.2-192.168.1.254 -j MARK --set-mark 10

上行分组

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

@yaleh 另外我今天实现了阻塞的Write()操作,不会无限制的写入大量数据到snd_queue里面,或多或少会有利于带宽的约束。

from kcptun.

yaleh avatar yaleh commented on May 13, 2024

Let me try try

from kcptun.

jannson avatar jannson commented on May 13, 2024

试的结果如何?

在家里用 kcptun,想在公司也切换到这个。

from kcptun.

wxyzh avatar wxyzh commented on May 13, 2024

重新编译了一个,从youtube上来看,快了些

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

公司用没什么大问题,主要是要注意

  1. 上行到vps的限速,建议tc或者带网管功能的路由器做
  2. 流量均衡, 某些网盘,如icloud,s3,google drive 会占用掉全部的上行带宽,必须限制,让其直链。

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

@wxyzh 说明dscp还是有用的,不过如果长期申请EF类型的传输,某些厂家的设备会屏蔽。

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

优化了fast模式的载荷比

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

@yaleh @jannson 发现一个kcp的fastack的问题,会导致大量的不必要的重传,正在和原作者讨论此问题,并发了一个我个人的fix,0602版本。 带宽消耗至少降低一半。

from kcptun.

xtaci avatar xtaci commented on May 13, 2024

SNMP

  1. Reduce memory usage by avoiding make on fec group
  2. Release freebsd binary version
  3. Expose SetNoDelay() function for future manual control
  4. Add SNMP to dump information, kill -SIGUSR1 pid to print
  5. Pipeline ReadFromUDP() for faster receiving of UDP Packets
  6. Fix parse_ack() for too many fast resend
  7. Adjust yamux max window size for better streaming of UHD video

from kcptun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.