libp2pwebtransport

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 35 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(key ic.PrivKey, gater connmgr.ConnectionGater, rcmgr network.ResourceManager, opts ...Option) (tpt.Transport, error)

Types

type Option

type Option func(*transport) error

func WithClock

func WithClock(cl clock.Clock) Option

func WithTLSClientConfig

func WithTLSClientConfig(c *tls.Config) Option

WithTLSClientConfig sets a custom tls.Config used for dialing. This option is most useful for setting a custom tls.Config.RootCAs certificate pool. When dialing a multiaddr that contains a /certhash component, this library will set InsecureSkipVerify and overwrite the VerifyPeerCertificate callback.

func WithTLSConfig

func WithTLSConfig(c *tls.Config) Option

WithTLSConfig sets a tls.Config used for listening. When used, the certificate from that config will be used, and no /certhash will be added to the listener's multiaddr. This is most useful when running a listener that has a valid (CA-signed) certificate.

Jump to

Keyboard shortcuts

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