Documentation ¶
Index ¶
- Constants
- func CreateProxyBackend(remoteServerConfig config.RemoteServerConfig) (ret *proxyBackend, err error)
- func NewUDPBackend() *udpBackend
- type KCPBackend
- type ProxyClient
- func (c *ProxyClient) ExchangeDNS(dnsAddr string, data []byte, timeout time.Duration) (response *dns.Msg, err error)
- func (c *ProxyClient) GetUDPBuffer() []byte
- func (c *ProxyClient) HandleUDP(buffer []byte, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, dataLen int)
- func (c *ProxyClient) PutUDPBuffer(buffer []byte)
- func (c *ProxyClient) RelayUDPData(srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, data []byte, dataLen int) error
- func (c *ProxyClient) ReloadBackend(dnsMockTimeout int, serverConfig config.ShadowsocksConfig) (err error)
- func (c *ProxyClient) SetDNSProcessor(server common.DNSServerInterface)
- func (c *ProxyClient) StartBackend(serverConfig config.ShadowsocksConfig) (err error)
- func (c *ProxyClient) Stop()
Constants ¶
View Source
const (
RELAY_TCP_RETRY = "Kcp relay tcp failed when write header"
)
View Source
const (
SCAVENGER_COUNT = 128
)
Variables ¶
This section is empty.
Functions ¶
func CreateProxyBackend ¶
func CreateProxyBackend(remoteServerConfig config.RemoteServerConfig) (ret *proxyBackend, err error)
func NewUDPBackend ¶
func NewUDPBackend() *udpBackend
Types ¶
type KCPBackend ¶
func StartKCPBackend ¶
func StartKCPBackend(config config.KcptunConfig, crypt string, password string) (ret *KCPBackend, err error)
func (*KCPBackend) GetKcpConn ¶
func (c *KCPBackend) GetKcpConn() (*smux.Stream, error)
func (*KCPBackend) Stop ¶
func (c *KCPBackend) Stop()
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
func StartProxyClient ¶
func StartProxyClient(dnsMockTimeout int, config config.ShadowsocksConfig, listenAddr string) (*ProxyClient, error)
func (*ProxyClient) ExchangeDNS ¶
func (*ProxyClient) GetUDPBuffer ¶
func (c *ProxyClient) GetUDPBuffer() []byte
func (*ProxyClient) PutUDPBuffer ¶
func (c *ProxyClient) PutUDPBuffer(buffer []byte)
func (*ProxyClient) RelayUDPData ¶
func (*ProxyClient) ReloadBackend ¶
func (c *ProxyClient) ReloadBackend(dnsMockTimeout int, serverConfig config.ShadowsocksConfig) (err error)
func (*ProxyClient) SetDNSProcessor ¶
func (c *ProxyClient) SetDNSProcessor(server common.DNSServerInterface)
func (*ProxyClient) StartBackend ¶
func (c *ProxyClient) StartBackend(serverConfig config.ShadowsocksConfig) (err error)
func (*ProxyClient) Stop ¶
func (c *ProxyClient) Stop()
Click to show internal directories.
Click to hide internal directories.