unix: support udp forwarding (#194)

This commit is contained in:
nadoo committed 2020-12-01 20:04:47 +08:00
1 parent 63112a1509
commit 142865535e
10 files changed
+259 -111

No files matched your search

+3 -2
View File
@@ -24,8 +24,8 @@ type KCP struct {
key string
crypt string
mode string
block kcp.BlockCrypt
mode string
dataShards int
parityShards int
@@ -258,7 +258,8 @@ func (s *KCP) setParams(c *kcp.UDPSession) {
c.SetNoDelay(1, 20, 2, 1)
case "fast3":
c.SetNoDelay(1, 10, 2, 1)
default: // default use fast
default:
log.F("[kcp] unkonw mode: %s, use fast mode instead", s.mode)
c.SetNoDelay(0, 30, 2, 1)
}