kcpraw

package module
v0.0.0-...-23c0334 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2017 License: MIT Imports: 5 Imported by: 0

README

kcp-go-raw

为了解决 ISP 或某猴米路由器对 UDP 可能的QOS问题,利用原始套接字实现了运行在伪装的 TCP 协议之上的 kcp-go

注意事项

服务端在使用前需要设置 iptables 来避免内核返回的 RST 报文断开客户端的连接

iptables -A OUTPUT -p tcp --sport <port> --tcp-flags RST RST -j DROP

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialWithOptions

func DialWithOptions(raddr string, block kcp.BlockCrypt, dataShards, parityShards int) (*kcp.UDPSession, error)

DialWithOptions connects to the remote address "raddr" on the network "udp" with packet encryption

func ListenWithOptions

func ListenWithOptions(laddr string, block kcp.BlockCrypt, dataShards, parityShards int) (*kcp.Listener, error)

ListenWithOptions listens for incoming KCP packets addressed to the local address laddr on the network "udp" with packet encryption, dataShards, parityShards defines Reed-Solomon Erasure Coding parameters

func SetDSCP

func SetDSCP(v int)

SetDSCP set tos number

func SetHost

func SetHost(v string)

SetHost set http host

func SetIgnRST

func SetIgnRST(v bool)

SetIgnRST if v is true, the tcp rst packet will be ignored

func SetNoHTTP

func SetNoHTTP(v bool)

SetNoHTTP determines whether to do http obfuscating

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL