kcpraw

package module
v0.0.0-...-a744517 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialRAW

func DialRAW(raddr string, password string, mulconn int, udp bool, r *rawcon.Raw) (conn utils.UDPConn, err error)

DialRAW connects to the remote address raddr on the network udp/fake-tcp mulconn is enabled if mulconn > 0

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"/fake-tcp with packet encryption

func DialWithRawOptions

func DialWithRawOptions(opt *RawOptions) (conn utils.UDPConn, err error)

func GetListenerByAddr

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

func GetMSSByAddr

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

func ListenRAW

func ListenRAW(laddr string, password string, usemul bool, udp bool, r *rawcon.Raw) (conn net.PacketConn, err error)

ListenRAW listens for udp/fake-tcp

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"/fake-tcp with packet encryption, dataShards, parityShards defines Reed-Solomon Erasure Coding parameters

func ListenWithRawOptions

func ListenWithRawOptions(opt *RawOptions) (conn net.PacketConn, err error)

func SetDSCP

func SetDSCP(v int)

SetDSCP set tos number

func SetDummy

func SetDummy(v bool)

SetDummy if v is ture, the client will use dummy socket to inititate three-way handshake

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

func SetTLS

func SetTLS(v bool)

SetTLS enable tls obfs

Types

type RawOptions

type RawOptions struct {
	Addr     string
	Password string
	Mulconn  int
	UseMul   bool
	UDP      bool
	R        *rawcon.Raw
}

Jump to

Keyboard shortcuts

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