mirror of
https://github.com/xtaci/kcptun.git
synced 2024-04-21 12:32:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43a662772b | ||
|
|
f8ca7afa22 |
@@ -31,11 +31,14 @@ Increase the number of open files on your server, as:
|
||||
|
||||
`ulimit -n 65535`, or write it in `~/.bashrc`.
|
||||
|
||||
Increase the OS UDP buffers to improve performance, as:
|
||||
Suggested `sysctl.conf` parameters for better handling of UDP packets:
|
||||
|
||||
```
|
||||
net.core.rmem_max=26214400
|
||||
net.core.rmem_default=26214400
|
||||
net.core.wmem_max=26214400
|
||||
net.core.wmem_default=26214400
|
||||
net.core.netdev_max_backlog=2048
|
||||
```
|
||||
|
||||
You can also increase the per-socket buffer by adding parameter(default 4MB):
|
||||
@@ -48,8 +51,8 @@ increasing this would work for most of the old model CPUs.
|
||||
Download a corresponding one from precompiled [Releases](https://github.com/xtaci/kcptun/releases).
|
||||
|
||||
```
|
||||
KCP Client: ./client_darwin_amd64 -r "KCP_SERVER_IP:4000" -l ":8388" -mode fast2
|
||||
KCP Server: ./server_linux_amd64 -t "TARGET_IP:8388" -l ":4000" -mode fast2
|
||||
KCP Client: ./client_darwin_amd64 -r "KCP_SERVER_IP:4000" -l ":8388" -mode fast2 -autoexpire 900 -sockbuf 16777217
|
||||
KCP Server: ./server_linux_amd64 -t "TARGET_IP:8388" -l ":4000" -mode fast2 -sockbuf 16777217
|
||||
```
|
||||
The above commands will establish port forwarding channel for 8388/tcp as:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user