gost

package module
v0.0.0-...-25d135e Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2017 License: MIT Imports: 31 Imported by: 0

README

gost - GO Simple Tunnel

GO语言实现的安全隧道

English README

特性

  • 可同时监听多端口
  • 可设置转发代理,支持多级转发(代理链)
  • 支持标准HTTP/HTTPS/SOCKS5代理协议
  • SOCKS5代理支持TLS协商加密
  • Tunnel UDP over TCP
  • 支持Shadowsocks协议 (OTA: 2.2+,UDP: 2.4+)
  • 支持本地/远程端口转发 (2.1+)
  • 支持HTTP 2.0 (2.2+)
  • 实验性支持QUIC (2.3+)
  • 支持KCP协议 (2.3+)
  • 透明代理 (2.3+)

二进制文件下载:https://github.com/ginuerzh/gost/releases

Google讨论组: https://groups.google.com/d/forum/go-gost

在gost中,gost与其他代理服务都被看作是代理节点,gost可以自己处理请求,或者将请求转发给任意一个或多个代理节点。

Ubuntu Store

gost已经上架ubuntu store,在ubuntu 16.04上可以直接通过snap来安装:

$ sudo snap install gost

参数说明

代理及代理链

适用于-L和-F参数

[scheme://][user:pass@host]:port

scheme分为两部分: protocol+transport

protocol: 代理协议类型(http, socks5, shadowsocks), transport: 数据传输方式(ws, wss, tls, http2, quic, kcp), 二者可以任意组合,或单独使用:

http - HTTP代理: http://:8080

http+tls - HTTPS代理(可能需要提供受信任的证书): http+tls://:443或https://:443

http2 - HTTP2代理并向下兼容HTTPS代理: http2://:443

socks - 标准SOCKS5代理(支持tls协商加密): socks://:1080

socks+wss - SOCKS5代理,使用websocket传输数据: socks+wss://:1080

tls - HTTPS/SOCKS5代理,使用tls传输数据: tls://:443

ss - Shadowsocks代理,ss://chacha20:123456@:8338

ssu - Shadowsocks UDP relay,ssu://chacha20:123456@:8338

quic - QUIC代理,quic://:6121

kcp - KCP代理,kcp://:8388或kcp://aes:123456@:8388

redirect - 透明代理,redirect://:12345

端口转发

适用于-L参数

scheme://[bind_address]:port/[host]:hostport

scheme - 端口转发模式, 本地端口转发: tcp, udp; 远程端口转发: rtcp, rudp

bind_address:port - 本地/远程绑定地址

host:hostport - 目标访问地址

配置文件

-C : 指定配置文件路径

配置文件为标准json格式:

{
    "ServeNodes": [
        ":8080",
        "ss://chacha20:12345678@:8338"
    ],
    "ChainNodes": [
        "http://192.168.1.1:8080",
        "https://10.0.2.1:443"
    ]
}

ServeNodes等同于-L参数,ChainNodes等同于-F参数

开启日志

-logtostderr : 输出到控制台

-v=3 : 日志级别(1-5),级别越高,日志越详细(级别5将开启http2 debug)

-log_dir=/log/dir/path : 输出到目录/log/dir/path

使用方法

不设置转发代理
  • 作为标准HTTP/SOCKS5代理
gost -L=:8080
  • 设置代理认证信息
gost -L=admin:123456@localhost:8080
  • 多组认证信息
gost -L=localhost:8080?secrets=secrets.txt

通过secrets参数可以为HTTP/SOCKS5代理设置多组认证信息,格式为:

# username password

test001 123456
test002 12345678
  • 多端口监听
gost -L=http2://:443 -L=socks://:1080 -L=ss://aes-128-cfb:123456@:8338
设置转发代理
```bash gost -L=:8080 -F=192.168.1.1:8081 ```
  • 转发代理认证
gost -L=:8080 -F=http://admin:123456@192.168.1.1:8081
设置多级转发代理(代理链)
```bash gost -L=:8080 -F=http+tls://192.168.1.1:443 -F=socks+ws://192.168.1.2:1080 -F=ss://aes-128-cfb:123456@192.168.1.3:8338 -F=a.b.c.d:NNNN ``` gost按照-F设置的顺序通过代理链将请求最终转发给a.b.c.d:NNNN处理,每一个转发代理可以是任意HTTP/HTTPS/HTTP2/SOCKS5/Shadowsocks类型代理。
本地端口转发(TCP)
gost -L=tcp://:2222/192.168.1.1:22 -F=...

将本地TCP端口2222上的数据(通过代理链)转发到192.168.1.1:22上。

本地端口转发(UDP)
gost -L=udp://:5353/192.168.1.1:53?ttl=60 -F=...

将本地UDP端口5353上的数据(通过代理链)转发到192.168.1.1:53上。 每条转发通道都有超时时间,当超过此时间,且在此时间段内无任何数据交互,则此通道将关闭。可以通过ttl参数来设置超时时间,默认值为60秒。

注: 转发UDP数据时,如果有代理链,则代理链的末端(最后一个-F参数)必须是gost SOCKS5类型代理。

远程端口转发(TCP)
gost -L=rtcp://:2222/192.168.1.1:22 -F=... -F=socks://172.24.10.1:1080

将172.24.10.1:2222上的数据(通过代理链)转发到192.168.1.1:22上。

远程端口转发(UDP)
gost -L=rudp://:5353/192.168.1.1:53 -F=... -F=socks://172.24.10.1:1080

将172.24.10.1:5353上的数据(通过代理链)转发到192.168.1.1:53上。

注: 若要使用远程端口转发功能,代理链不能为空(至少要设置一个-F参数),且代理链的末端(最后一个-F参数)必须是gost SOCKS5类型代理。

HTTP2

gost的HTTP2支持两种模式并自适应:

  • 作为标准的HTTP2代理,并向下兼容HTTPS代理。
  • 作为transport(类似于wss),传输其他协议。

服务端:

gost -L=http2://:443

客户端:

gost -L=:8080 -F=http2://server_ip:443?ping=30

客户端支持ping参数开启心跳检测(默认不开启),参数值代表心跳间隔秒数。

注: gost的代理链仅支持一个HTTP2代理节点,采用就近原则,会将第一个遇到的HTTP2代理节点视为HTTP2代理,其他HTTP2代理节点则被视为HTTPS代理。

QUIC

gost对QUIC的支持是基于quic-go库。

服务端:

gost -L=quic://:6121

客户端(Chrome):

chrome --enable-quic --proxy-server=quic://server_ip:6121

注: 由于Chrome自身的限制,目前只能通过QUIC访问HTTP网站,无法访问HTTPS网站。

KCP

gost对KCP的支持是基于kcp-gokcptun库。

服务端:

gost -L=kcp://:8388

客户端:

gost -L=:8080 -F=kcp://server_ip:8388

或者手动指定加密方法和密码(手动指定的加密方法和密码会覆盖配置文件中的相应值)

服务端:

gost -L=kcp://aes:123456@:8388

客户端:

gost -L=:8080 -F=kcp://aes:123456@server_ip:8388

gost会自动加载当前工作目录中的kcp.json(如果存在)配置文件,或者可以手动通过参数指定配置文件路径:

gost -L=kcp://:8388?c=/path/to/conf/file

注: 客户端若要开启KCP转发,当且仅当代理链不为空且首个代理节点(第一个-F参数)为kcp类型。

透明代理

基于iptables的透明代理。

gost -L=redirect://:12345 -F=http2://server_ip:443

加密机制

HTTP

对于HTTP可以使用TLS加密整个通讯过程,即HTTPS代理:

服务端:

gost -L=http+tls://:443

客户端:

gost -L=:8080 -F=http+tls://server_ip:443
HTTP2

gost仅支持使用TLS加密的HTTP2协议,不支持明文HTTP2传输。

SOCKS5

gost支持标准SOCKS5协议的no-auth(0x00)和user/pass(0x02)方法,并在此基础上扩展了两个:tls(0x80)和tls-auth(0x82),用于数据加密。

服务端:

gost -L=socks://:1080

客户端:

gost -L=:8080 -F=socks://server_ip:1080

如果两端都是gost(如上)则数据传输会被加密(协商使用tls或tls-auth方法),否则使用标准SOCKS5进行通讯(no-auth或user/pass方法)。

注: 如果transport已经支持加密(wss, tls, http2, kcp),则SOCKS5不会再使用加密方法,防止不必要的双重加密。

Shadowsocks

gost对shadowsocks的支持是基于shadowsocks-go库。

服务端(可以通过ota参数开启OTA强制模式,开启后客户端必须使用OTA模式):

gost -L=ss://aes-128-cfb:123456@:8338?ota=1

客户端(可以通过ota参数开启OTA模式):

gost -L=:8080 -F=ss://aes-128-cfb:123456@server_ip:8338?ota=1
Shadowsocks UDP relay

目前仅服务端支持UDP,且仅支持OTA模式。

服务端:

gost -L=ssu://aes-128-cfb:123456@:8338
TLS

gost内置了TLS证书,如果需要使用其他TLS证书,有两种方法:

  • 在gost运行目录放置cert.pem(公钥)和key.pem(私钥)两个文件即可,gost会自动加载运行目录下的cert.pem和key.pem文件。
  • 使用参数指定证书文件路径:
gost -L="http2://:443?cert=/path/to/my/cert/file&key=/path/to/my/key/file"

SOCKS5 UDP数据处理

不设置转发代理

gost作为标准SOCKS5代理处理UDP数据

设置转发代理
设置多个转发代理(代理链)

当设置转发代理时,gost会使用UDP-over-TCP方式转发UDP数据。proxy1 - proxyN可以为任意HTTP/HTTPS/HTTP2/SOCKS5/Shadowsocks类型代理。

限制条件

代理链中的HTTP代理节点必须支持CONNECT方法。

如果要转发SOCKS5的BIND和UDP请求,代理链的末端(最后一个-F参数)必须支持gost SOCKS5类型代理。

Documentation

Index

Constants

View Source
const (
	LFATAL = iota
	LERROR
	LWARNING
	LINFO
	LDEBUG
)

Log level for glog

View Source
const (
	MethodTLS     uint8 = 0x80 // extended method for tls
	MethodTLSAuth uint8 = 0x82 // extended method for tls+auth
)
View Source
const (
	CmdUdpTun uint8 = 0xF3 // extended method for udp over tcp
)
View Source
const (
	DefaultKCPConfigFile = "kcp.json"
)
View Source
const (
	SO_ORIGINAL_DST = 80
)
View Source
const (
	Version = "2.4-dev"
)

Variables

View Source
var (
	KeepAliveTime = 180 * time.Second
	DialTimeout   = 30 * time.Second
	ReadTimeout   = 90 * time.Second
	WriteTimeout  = 90 * time.Second

	DefaultTTL = 60 // default udp node TTL in second for udp port forwarding
)
View Source
var (
	SmallBufferSize  = 1 * 1024  // 1KB small buffer
	MediumBufferSize = 8 * 1024  // 8KB medium buffer
	LargeBufferSize  = 32 * 1024 // 32KB large buffer
)
View Source
var (
	DefaultCertFile = "cert.pem"
	DefaultKeyFile  = "key.pem"
)
View Source
var (
	DefaultKCPConfig = &KCPConfig{
		Key:          "it's a secrect",
		Crypt:        "aes",
		Mode:         "fast",
		MTU:          1350,
		SndWnd:       1024,
		RcvWnd:       1024,
		DataShard:    10,
		ParityShard:  3,
		DSCP:         0,
		NoComp:       false,
		AckNodelay:   false,
		NoDelay:      0,
		Interval:     40,
		Resend:       0,
		NoCongestion: 0,
		SockBuf:      4194304,
		KeepAlive:    10,
	}
)
View Source
var (
	ErrEmptyChain = errors.New("empty chain")
)
View Source
var (
	SALT = "kcp-go"
)

Functions

func LoadCertificate

func LoadCertificate(certFile, keyFile string) (tls.Certificate, error)

Load the certificate from cert and key files, will use the default certificate if the provided info are invalid.

func SetDefaultCertificate

func SetDefaultCertificate(rawCert, rawKey []byte)

Replace the default certificate by your own

func ToSocksAddr

func ToSocksAddr(addr net.Addr) *gosocks5.Addr

Types

type Http2Server

type Http2Server struct {
	Base      *ProxyServer
	Handler   http.Handler
	TLSConfig *tls.Config
}

func NewHttp2Server

func NewHttp2Server(base *ProxyServer) *Http2Server

func (*Http2Server) HandleRequest

func (s *Http2Server) HandleRequest(w http.ResponseWriter, req *http.Request)

Default HTTP2 server handler

func (*Http2Server) ListenAndServeTLS

func (s *Http2Server) ListenAndServeTLS(config *tls.Config) error

func (*Http2Server) Upgrade

func (s *Http2Server) Upgrade(w http.ResponseWriter, r *http.Request) (net.Conn, error)

Upgrade upgrade an HTTP2 request to a bidirectional connection that preparing for tunneling other protocol, just like a websocket connection.

type HttpServer

type HttpServer struct {
	Base *ProxyServer
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(conn net.Conn, base *ProxyServer) *HttpServer

func (*HttpServer) HandleRequest

func (s *HttpServer) HandleRequest(req *http.Request)

Default HTTP server handler

type KCPConfig

type KCPConfig struct {
	Key          string `json:"key"`
	Crypt        string `json:"crypt"`
	Mode         string `json:"mode"`
	MTU          int    `json:"mtu"`
	SndWnd       int    `json:"sndwnd"`
	RcvWnd       int    `json:"rcvwnd"`
	DataShard    int    `json:"datashard"`
	ParityShard  int    `json:"parityshard"`
	DSCP         int    `json:"dscp"`
	NoComp       bool   `json:"nocomp"`
	AckNodelay   bool   `json:"acknodelay"`
	NoDelay      int    `json:"nodelay"`
	Interval     int    `json:"interval"`
	Resend       int    `json:"resend"`
	NoCongestion int    `json:"nc"`
	SockBuf      int    `json:"sockbuf"`
	KeepAlive    int    `json:"keepalive"`
}

func ParseKCPConfig

func ParseKCPConfig(configFile string) (*KCPConfig, error)

func (*KCPConfig) Init

func (c *KCPConfig) Init()

type KCPConn

type KCPConn struct {
	// contains filtered or unexported fields
}

func NewKCPConn

func NewKCPConn(conn net.Conn, stream *smux.Stream) *KCPConn

func (*KCPConn) Close

func (c *KCPConn) Close() error

func (*KCPConn) LocalAddr

func (c *KCPConn) LocalAddr() net.Addr

func (*KCPConn) Read

func (c *KCPConn) Read(b []byte) (n int, err error)

func (*KCPConn) RemoteAddr

func (c *KCPConn) RemoteAddr() net.Addr

func (*KCPConn) SetDeadline

func (c *KCPConn) SetDeadline(t time.Time) error

func (*KCPConn) SetReadDeadline

func (c *KCPConn) SetReadDeadline(t time.Time) error

func (*KCPConn) SetWriteDeadline

func (c *KCPConn) SetWriteDeadline(t time.Time) error

func (*KCPConn) Write

func (c *KCPConn) Write(b []byte) (n int, err error)

type KCPServer

type KCPServer struct {
	Base   *ProxyServer
	Config *KCPConfig
}

func NewKCPServer

func NewKCPServer(base *ProxyServer, config *KCPConfig) *KCPServer

func (*KCPServer) ListenAndServe

func (s *KCPServer) ListenAndServe() (err error)

type KCPSession

type KCPSession struct {
	// contains filtered or unexported fields
}

func DialKCP

func DialKCP(addr string, config *KCPConfig) (*KCPSession, error)

func (*KCPSession) Close

func (session *KCPSession) Close() error

func (*KCPSession) GetConn

func (session *KCPSession) GetConn() (*KCPConn, error)

func (*KCPSession) IsClosed

func (session *KCPSession) IsClosed() bool

func (*KCPSession) NumStreams

func (session *KCPSession) NumStreams() int

type ProxyChain

type ProxyChain struct {
	// contains filtered or unexported fields
}

Proxy chain holds a list of proxy nodes

func NewProxyChain

func NewProxyChain(nodes ...ProxyNode) *ProxyChain

func (*ProxyChain) AddProxyNode

func (c *ProxyChain) AddProxyNode(node ...ProxyNode)

func (*ProxyChain) AddProxyNodeString

func (c *ProxyChain) AddProxyNodeString(snode ...string) error

func (*ProxyChain) Dial

func (c *ProxyChain) Dial(addr string) (net.Conn, error)

Connect to addr through proxy chain

func (*ProxyChain) GetConn

func (c *ProxyChain) GetConn() (net.Conn, error)

GetConn initializes a proxy chain connection, if no proxy nodes on this chain, it will return error

func (*ProxyChain) GetNode

func (c *ProxyChain) GetNode(index int) *ProxyNode

func (*ProxyChain) Http2Enabled

func (c *ProxyChain) Http2Enabled() bool

func (*ProxyChain) Init

func (c *ProxyChain) Init()

Init initialize the proxy chain. KCP will be enabled if the first proxy node is KCP proxy (transport == kcp). HTTP2 will be enabled when at least one HTTP2 proxy node (scheme == http2) is present.

NOTE: Should be called immediately when proxy nodes are ready.

func (*ProxyChain) KCPEnabled

func (c *ProxyChain) KCPEnabled() bool

func (*ProxyChain) Nodes

func (c *ProxyChain) Nodes() []ProxyNode

func (*ProxyChain) SetNode

func (c *ProxyChain) SetNode(index int, node ProxyNode)

type ProxyConn

type ProxyConn struct {
	Node ProxyNode
	// contains filtered or unexported fields
}

func NewProxyConn

func NewProxyConn(conn net.Conn, node ProxyNode) *ProxyConn

func (*ProxyConn) Close

func (c *ProxyConn) Close() error

func (*ProxyConn) Connect

func (c *ProxyConn) Connect(addr string) error

Connect connect to addr through this proxy node

func (*ProxyConn) Handshake

func (c *ProxyConn) Handshake() error

Handshake handshake with this proxy node based on the proxy node info: transport, protocol, authentication, etc.

NOTE: any HTTP2 scheme will be treated as http (for protocol) or tls (for transport).

func (*ProxyConn) LocalAddr

func (c *ProxyConn) LocalAddr() net.Addr

func (*ProxyConn) Read

func (c *ProxyConn) Read(b []byte) (n int, err error)

func (*ProxyConn) RemoteAddr

func (c *ProxyConn) RemoteAddr() net.Addr

func (*ProxyConn) SetDeadline

func (c *ProxyConn) SetDeadline(t time.Time) error

func (*ProxyConn) SetReadDeadline

func (c *ProxyConn) SetReadDeadline(t time.Time) error

func (*ProxyConn) SetWriteDeadline

func (c *ProxyConn) SetWriteDeadline(t time.Time) error

func (*ProxyConn) Write

func (c *ProxyConn) Write(b []byte) (n int, err error)

type ProxyNode

type ProxyNode struct {
	Addr      string          // [host]:port
	Protocol  string          // protocol: http/socks5/ss
	Transport string          // transport: ws/wss/tls/http2/tcp/udp/rtcp/rudp
	Remote    string          // remote address, used by tcp/udp port forwarding
	Users     []*url.Userinfo // authentication for proxy
	// contains filtered or unexported fields
}

Proxy node represent a proxy

func ParseProxyNode

func ParseProxyNode(s string) (node ProxyNode, err error)

The proxy node string pattern is [scheme://][user:pass@host]:port.

Scheme can be devided into two parts by character '+', such as: http+tls.

func (*ProxyNode) Get

func (node *ProxyNode) Get(key string) string

Get get node parameter by key

func (*ProxyNode) Set

func (node *ProxyNode) Set(key, value string)

func (ProxyNode) String

func (node ProxyNode) String() string

type ProxyServer

type ProxyServer struct {
	Node      ProxyNode
	Chain     *ProxyChain
	TLSConfig *tls.Config
	// contains filtered or unexported fields
}

func NewProxyServer

func NewProxyServer(node ProxyNode, chain *ProxyChain, config *tls.Config) *ProxyServer

func (*ProxyServer) Serve

func (s *ProxyServer) Serve() error

type QuicServer

type QuicServer struct {
	Base      *ProxyServer
	Handler   http.Handler
	TLSConfig *tls.Config
}

func NewQuicServer

func NewQuicServer(base *ProxyServer) *QuicServer

func (*QuicServer) HandleRequest

func (s *QuicServer) HandleRequest(w http.ResponseWriter, req *http.Request)

func (*QuicServer) ListenAndServeTLS

func (s *QuicServer) ListenAndServeTLS(config *tls.Config) error

type RTcpForwardServer

type RTcpForwardServer struct {
	Base *ProxyServer
}

func NewRTcpForwardServer

func NewRTcpForwardServer(base *ProxyServer) *RTcpForwardServer

func (*RTcpForwardServer) Serve

func (s *RTcpForwardServer) Serve() error

type RUdpForwardServer

type RUdpForwardServer struct {
	Base *ProxyServer
}

func NewRUdpForwardServer

func NewRUdpForwardServer(base *ProxyServer) *RUdpForwardServer

func (*RUdpForwardServer) Serve

func (s *RUdpForwardServer) Serve() error

type RedsocksTCPServer

type RedsocksTCPServer struct {
	Base *ProxyServer
}

func NewRedsocksTCPServer

func NewRedsocksTCPServer(base *ProxyServer) *RedsocksTCPServer

func (*RedsocksTCPServer) ListenAndServe

func (s *RedsocksTCPServer) ListenAndServe() error

type ShadowServer

type ShadowServer struct {
	Base *ProxyServer
	OTA  bool // one time auth
	// contains filtered or unexported fields
}

func NewShadowServer

func NewShadowServer(conn *ss.Conn, base *ProxyServer) *ShadowServer

func (*ShadowServer) Serve

func (s *ShadowServer) Serve()

type ShadowUdpServer

type ShadowUdpServer struct {
	Base *ProxyServer
	TTL  int
}

func NewShadowUdpServer

func NewShadowUdpServer(base *ProxyServer, ttl int) *ShadowUdpServer

func (*ShadowUdpServer) ListenAndServe

func (s *ShadowUdpServer) ListenAndServe() error

type Socks5Server

type Socks5Server struct {
	Base *ProxyServer
	// contains filtered or unexported fields
}

func NewSocks5Server

func NewSocks5Server(conn net.Conn, base *ProxyServer) *Socks5Server

func (*Socks5Server) HandleRequest

func (s *Socks5Server) HandleRequest(req *gosocks5.Request)

type TcpForwardServer

type TcpForwardServer struct {
	Base    *ProxyServer
	Handler func(conn net.Conn, raddr net.Addr)
}

func NewTcpForwardServer

func NewTcpForwardServer(base *ProxyServer) *TcpForwardServer

func (*TcpForwardServer) ListenAndServe

func (s *TcpForwardServer) ListenAndServe() error

type UdpForwardServer

type UdpForwardServer struct {
	Base *ProxyServer
	TTL  int
}

func NewUdpForwardServer

func NewUdpForwardServer(base *ProxyServer, ttl int) *UdpForwardServer

func (*UdpForwardServer) ListenAndServe

func (s *UdpForwardServer) ListenAndServe() error

type WebsocketConn

type WebsocketConn struct {
	// contains filtered or unexported fields
}

func WebsocketClientConn

func WebsocketClientConn(url string, conn net.Conn, config *tls.Config) (*WebsocketConn, error)

func WebsocketServerConn

func WebsocketServerConn(conn *websocket.Conn) *WebsocketConn

func (*WebsocketConn) Close

func (c *WebsocketConn) Close() error

func (*WebsocketConn) LocalAddr

func (c *WebsocketConn) LocalAddr() net.Addr

func (*WebsocketConn) Read

func (c *WebsocketConn) Read(b []byte) (n int, err error)

func (*WebsocketConn) RemoteAddr

func (c *WebsocketConn) RemoteAddr() net.Addr

func (*WebsocketConn) SetDeadline

func (conn *WebsocketConn) SetDeadline(t time.Time) error

func (*WebsocketConn) SetReadDeadline

func (c *WebsocketConn) SetReadDeadline(t time.Time) error

func (*WebsocketConn) SetWriteDeadline

func (c *WebsocketConn) SetWriteDeadline(t time.Time) error

func (*WebsocketConn) Write

func (c *WebsocketConn) Write(b []byte) (n int, err error)

type WebsocketServer

type WebsocketServer struct {
	Addr    string
	Base    *ProxyServer
	Handler http.Handler
	// contains filtered or unexported fields
}

func NewWebsocketServer

func NewWebsocketServer(base *ProxyServer) *WebsocketServer

func (*WebsocketServer) HandleRequest

func (s *WebsocketServer) HandleRequest(w http.ResponseWriter, r *http.Request)

Default websocket server handler

func (*WebsocketServer) ListenAndServe

func (s *WebsocketServer) ListenAndServe() error

func (*WebsocketServer) ListenAndServeTLS

func (s *WebsocketServer) ListenAndServeTLS(config *tls.Config) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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