net

package module
v0.0.0-...-0e6ff7b Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2019 License: BSD-3-Clause Imports: 14 Imported by: 1

README

go-net

Golang net wrapper for HTTP_PROXY and NAT with UPnP.

This library is wrapper for golang net library.

This support

  • Dial and DialContext support connection with HTTP Proxy (Need set environment variable "HTTPS_PROXY").
  • ListenTCP set the PortMapping in UPnP Router.

TODO

  • When using UPnP Router, the global address always show 8.8.8.8.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, remote string) (conn *traditionalnet.TCPConn, err error)

Dial makes TCP connection.

func DialContext

func DialContext(ctx context.Context, network, remote string) (conn *traditionalnet.TCPConn, err error)

DialContext makes TCP connection.

func ListenTCP

func ListenTCP(network string, laddr *traditionalnat.TCPAddr) (l *traditionalnat.TCPListener, err error)

ListenTCP is listener which support UPnP

func SetLogger

func SetLogger(l *log.Logger)

SetLogger set logger.

func SetLoggerDebug

func SetLoggerDebug()

SetLoggerDebug set to debug mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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