nat

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 3 Imported by: 34

README

DEPRECATION NOTICE

This package has moved into go-libp2p as a sub-package, github.com/libp2p/go-libp2p/p2p/net/nat.

go-libp2p-nat

Travis CI Discourse posts

NAT port mapping library for go-libp2p.

Table of Contents

Install

make install

Usage

# TODO

Contribute

PRs are welcome! Feel free to join in. All welcome. Open an issue!

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Jeromy Johnson


The last gx published version of this module was: 0.8.13: QmRbx7DYHgw3uNn2RuU2nv9Bdh96ZdtT65CG1CGPNRQcGZ

Documentation

Overview

Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/net/nat.

Index

Constants

View Source
const CacheTime = time.Second * 15

CacheTime is the time a mapping will cache an external address for Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat.CacheTime instead.

View Source
const MappingDuration = time.Second * 60

MappingDuration is a default port mapping duration. Port mappings are renewed every (MappingDuration / 3) Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat.MappingDuration instead.

Variables

View Source
var ErrNoMapping = nat.ErrNoMapping

ErrNoMapping signals no mapping exists for an address Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat.ErrNoMapping instead.

Functions

This section is empty.

Types

type Mapping

type Mapping = nat.Mapping

Mapping represents a port mapping in a NAT. Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat instead.

type NAT

type NAT = nat.NAT

NAT is an object that manages address port mappings in NATs (Network Address Translators). It is a long-running service that will periodically renew port mappings, and keep an up-to-date list of all the external addresses. Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat.Nat instead.

func DiscoverNAT

func DiscoverNAT(ctx context.Context) (*NAT, error)

DiscoverNAT looks for a NAT device in the network and returns an object that can manage port mappings. Deprecated: use github.com/libp2p/go-libp2p/p2p/net/nat.DiscoverNat instead.

Jump to

Keyboard shortcuts

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