kcpraw

package module
v0.0.0-...-7aba82b Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 7 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, password string, mulconn int, udp bool) (*kcp.UDPSession, error)

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

func GetListenerByAddr

func GetListenerByAddr(laddr net.Addr) *rawcon.RAWListener

func GetMSSByAddr

func GetMSSByAddr(laddr net.Addr, raddr net.Addr) int

func ListenWithOptions

func ListenWithOptions(laddr string, block kcp.BlockCrypt, dataShards, parityShards int, password string, usemul bool, udp bool) (*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 SetMixed

func SetMixed(v bool)

SetMixed if v is true, the server will accept both http request and tcp request

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