Commit Graph

46 Commits

Author SHA1 Message Date
galargh
50f065b4df chore: fix revive issues 2025-06-11 10:00:47 +01:00
Marco Munizaga
785181fbb8 chore: Update go-multiaddr to v0.15 (#3145) 2025-02-24 14:21:47 -08:00
KeienWang
d76a43fbe1 chore: fix typos (#2689) 2024-01-25 11:38:50 +05:30
Sukun
f87f6dbca8 nat: add HasDiscoveredNAT method for checking NAT environments (#2358)
* nat: add HasNAT method for checking NAT environments

* rename to better variable
2023-06-12 11:01:17 -07:00
Marten Seemann
a852c6749f update go-nat to v0.2.0, use context on AddMapping and RemoveMapping (#2319) 2023-06-02 02:56:04 -07:00
Marten Seemann
4ee60e39d0 move more of the NAT mapping logging to the NAT manager 2023-04-14 14:31:24 +02:00
Marten Seemann
c4fb97455c natmgr: remove unused Ready method 2023-04-14 14:29:46 +02:00
Marten Seemann
c62be4081c nat: use a single Go routine to renew NAT mappings 2023-04-14 14:29:43 +02:00
Marten Seemann
f5cbaf1721 nat: rename NewMapping to AddMapping, remove unused Mapping return value 2023-04-14 14:26:53 +02:00
Marten Seemann
4623690009 switch from github.com/libp2p/go-libp2p-core to core 2022-08-17 17:13:02 +03:00
web3-bot
eff72c4afa sync: update CI config files (#1678)
* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* bump go.mod to Go 1.18 and run go fix

* run gofmt -s

* update .github/workflows/go-test.yml

* update .github/workflows/go-check.yml

* stop using the deprecated io/ioutil package

Co-authored-by: web3-bot <web3-bot@users.noreply.github.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-17 01:05:51 -07:00
Wiktor Jurkiewicz
884028550c fix natManager to close natManager.nat (#1468)
* rename natManager.natnatmu to follow the standard

* fix natManager to close natManager.nat

* natmgr: move close to defer in background
2022-06-14 17:03:33 -07:00
Marten Seemann
8d2e54e163 update go-libp2p-core, remove stream methods from network.Notifiee (#1521) 2022-05-25 06:51:37 -07:00
Marten Seemann
f656048800 switch from github.com/libp2p/go-libp2p-nat to p2p/net/nat 2022-05-20 12:37:09 +02:00
Marten Seemann
4028c3c578 remove goprocess from the NATManager 2021-09-25 15:15:35 +01:00
web3-bot
218f33bc62 run gofmt -s 2021-04-29 21:35:37 +00:00
Steven Allen
72770db2f6 fix: avoid a close deadlock in the natmanager
Before, we would:

1. Receive a "listen close" event from an event handler, after the teardown started.
2. Try to add a child process to handle the event. This would block because we
were in the teardown.
3. In the teardown, try to unregister the event handler and deadlock

I've now:

* Removed the teardown.
* Switched to a single event loop.

Ideally, we'd remove goprocess entirely. But we'd need to refactor natmgr.

fixes #933
2020-06-22 16:33:19 -07:00
Raúl Kripalani
d87f89314c Consolidate abstractions and core types into go-libp2p-core (#601) 2019-05-26 22:55:46 +01:00
Steven Allen
16a60f9751 reduce nat error level 2019-03-28 02:20:06 +00:00
Steven Allen
8c8f08e36f natmgr: rename refresh to sync 2019-03-06 10:56:49 -08:00
Steven Allen
3617750071 better nat mapping
1. Update to work with https://github.com/libp2p/go-libp2p-nat/pull/14.
2. Avoid observed addrs when our NAT tells us about external addrs.
3. Ignore bad addrs reported by our NAT. Substitute with observed addrs.
4. Fix https://github.com/libp2p/go-libp2p/issues/428.
2019-03-06 10:56:49 -08:00
Steven Allen
c83318bf08 Revert "Merge pull request #386 from libp2p/fix/correct-external-addr"
This reverts commit aca83b9b63, reversing
changes made to 86b8929d4d.

This was is not the correct fix. We already expose these addresses via the
host's AllAddrs method. The real problem is probably that we just don't ever
tell anyone about them (unless we disconnect and reconnect to our nearby DHT
nodes).

We need an address gossip protocol.
2018-08-13 16:52:49 -07:00
Steven Allen
7133f4124f when we do a nat port mapping, explicitly remember the mapped address
related to #383

I won't call this *fixed* yet but it should help.
2018-08-02 14:18:47 -07:00
Jeromy
dfaa021cd7 gx publish 4.4.1 2017-07-11 16:08:52 -07:00
Enzo Haussecker
e9c24fdc2d Create interface for NAT manager 2017-06-04 21:33:27 -07:00
Enzo Haussecker
e571f8a3fb Publicize NAT manager struct 2017-06-03 04:32:47 -07:00
Lars Gierth
f0453a2458 basichost: refactor BasicHost construction
There were previously 4 different ways of passing various options
into BasicHost construction.

1. Function parameters to New
2. Option parameters to New
3. Global variables, e.g. NegotiateTimeout
4. Options struct, in the calling code in go-ipfs

This changeset deprecated all of these, and introduces the HostOpts
struct to replace them. It also introduces a new constructor called
NewHost, which accepts a *HostOpts.

The old New constructor continues to work the same way,
but is from now on deprecated too.
2017-05-31 02:30:29 +02:00
Jeromy
0e7e451d69 extract NAT traversal code to its own lib 2016-10-24 17:18:49 -07:00
Jeromy
70872ff663 update deps 2016-10-04 21:18:07 -07:00
Jeromy
cea1fe131f extract net interface and metrics 2016-10-04 13:56:20 -07:00
Jeromy
4dd30d824b switch to using stdlib context package 2016-10-03 11:00:00 -07:00
Jeromy
8744e460da update local import paths to reflect org change 2016-08-10 09:59:14 -07:00
Jeromy
b0ad207270 rewrite all package paths to dvcs 2016-04-27 12:59:04 -07:00
Jeromy
15b28dc0ce recursive dependency update of utp lib 2016-04-27 10:12:51 -07:00
Jeromy
4f82ae5e62 move some deps out as gx packages 2016-04-11 23:24:32 -07:00
Jeromy
7b48e5bc4d update version of go-multiaddr 2016-03-03 13:03:24 -08:00
Jeromy
ada8212cac path rewrites 2016-01-04 05:45:58 -08:00
Jeromy
d91b419ecf WIP 2015-12-06 23:11:16 -08:00
Jeromy
9d40a0af19 migrate to gx namespace 2015-11-18 16:11:24 -08:00
Jeromy
52a0925681 vendor go-ipfs-util 2015-11-15 21:15:23 -08:00
Jeromy
0c73722a91 vendor in notifier 2015-11-15 18:42:27 -08:00
Jeromy
d4b42f8e45 fixes for sha3 2015-11-15 18:28:35 -08:00
Jeromy
216db146ca more vendoring 2015-11-15 11:56:01 -08:00
Jeromy
51fd99e363 extract from 0.4.0 2015-11-11 16:19:51 -08:00
Juan Batiz-Benet
2392434b6d rewrote imports to p2p 2015-09-30 19:24:00 -04:00
Juan Batiz-Benet
885d86219e move to p2p dir 2015-09-30 18:42:55 -04:00