Commit Graph

5849 Commits

Author SHA1 Message Date
Marco Munizaga f4e714c8f1 simlibp2p: add GetBasicHostPair helper 2026-01-07 11:11:45 -08:00
Marco Munizaga f7e1986c25 run synctest with Go 1.25 2026-01-07 11:11:45 -08:00
Marcin Rataj b0b2a1847d fix(autonatv2): secondary addrs inherit reachability from primary (#3435) 2026-01-05 15:32:23 -08:00
sukun 20ba3c9449 Release v0.46.0 v0.46.0 2025-12-13 15:13:15 +05:30
sukun f96852745c chore: update quic-go to v0.57.1 (#3439) 2025-12-12 01:36:21 +05:30
Marcin Rataj cf61065945 fix(mdns): filter addresses to reduce packet size (#3434) 2025-12-01 19:25:53 -08:00
sukun aefe38980c chore: update quic-go to v0.56.0 (#3425) 2025-11-13 11:08:46 -08:00
Marcin Rataj 5d5f8d7455 fix(webrtc): use debug level for pion errors (#3426) 2025-11-11 15:01:16 -08:00
Marco Munizaga d0ecbf99a9 Release v0.45.0 (#3424)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
v0.45.0
2025-11-05 23:05:50 -05:00
Marcin Rataj 3f09fa4244 feat(gologshim): Add SetDefaultHandler (#3418)
Co-authored-by: Marco Munizaga <git@marcopolo.io>
2025-11-04 15:41:33 -05:00
Prithvi Shahi 4d16b4c025 Update Drips ownedBy address in FUNDING.json
Updates the Drips funding address from my personal address to the one owned by IP Shipyard
2025-11-03 18:16:59 -05:00
Marcin Rataj 7b78dd6802 fix(websocket): use debug level for http.Server errors
https://github.com/libp2p/go-libp2p/pull/3364 migrated from zap to slog
but accidentally changed the log level for http.Server.ErrorLog from
implicit INFO to explicit ERROR. This caused client EOF and TLS handshake
errors to spam error logs and stdout in apps which log only ERROR by
default.

These http.Server errors (client EOFs, TLS handshake failures from clients
with naive TLS implementations, connection timeouts from clients that abort
early) are normal operational noise, not actual server errors. Using
LevelDebug:
- matches semantic meaning (similar to existing connection timeout logs)
- respects user's configured threshold (default ERROR filters them out)
- allows users to enable for debugging via log level configuration

Fixes https://github.com/ipfs/kubo/issues/11027
Fixes https://github.com/ipfs/kubo/issues/11033
2025-10-27 19:30:59 -07:00
Marco Munizaga bc0a6d52f5 chore: release v0.44.0 v0.44.0 2025-10-07 13:15:41 -07:00
sukun b844aeee6a autonatv2: fix normalization for websocket addrs
1. Convert /wss to /tls/ws
2. Ignore the sni for comparison because there's no sni
information on `conn.LocalAddr()`
2025-10-07 08:29:55 -07:00
sukun bfd52ef4a4 autonatv2: remove dependency on webrtc and webtransport 2025-10-07 08:29:55 -07:00
Marco Munizaga fc35662e54 quicreuse: update libp2p/go-netroute (#3405) 2025-10-07 13:52:41 +05:30
Marco Munizaga bcf636ebcc chore: update quic-go to v0.55.0 2025-10-06 11:28:04 -07:00
sukun 4f1ba59f36 basichost: don't advertise unreachable addrs. (#3357) 2025-10-06 19:38:55 +05:30
sukun c19b3d6945 basichost: improve autonatv2 reachability logic (#3356)
This improves the reachability detection logic by introducing the concept of primary and secondary addresses. If we have a webtransport address which shares the IP and Port with a QUIC address, the WebTransport address will be considered secondary and the QUIC address will be considered primary.

If the Primary is reachable or unreachable, we require only one confirmation for the Secondary address. This speeds up address verification considerably. We also only refresh secondary addrs reachability once every 3 hours. For primary addresses this duration is 1 hour.
2025-10-06 15:45:31 +05:30
sukun 31f527dc87 basichost: fix lint error 2025-10-02 19:56:02 +05:30
Marco Munizaga ca2ec81fc9 ci: move to github actions runner 2025-09-30 12:08:35 -07:00
sukun 3e69227598 basichost: move EvtLocalAddrsChanged to addrs_manager (#3355) 2025-09-30 16:20:38 +05:30
Marco Munizaga e1218c52d6 chore: gitignore go.work files 2025-09-26 09:32:51 -07:00
Marco Munizaga 758bbd29a1 refactor!: move insecure transport outside of core 2025-09-26 09:32:51 -07:00
Marco Munizaga 403c42ee72 refactor: drop go-varint dependency 2025-09-26 09:32:51 -07:00
Marco Munizaga 55fe95e84c refactor!: move canonicallog package outside of core 2025-09-26 09:32:51 -07:00
Dennis Trautwein c5f1be2972 fix: assignment to entry in nil map
first reported here: https://github.com/ipfs/kubo/issues/10992
2025-09-26 09:13:22 -07:00
Marco Munizaga ffb05741eb docs: Update contribute section with mailing list and irc (#3387) 2025-09-25 19:12:30 +05:30
Marten Seemann 94bfb565ec README: remove Drand from notable users section 2025-09-20 21:49:53 -07:00
Marco Munizaga 9f5a948c94 chore: add help comment
I forgot macOS runs an old version of bash
2025-09-19 12:39:11 -07:00
cargoedit c8e06bb688 refactor: replace context.WithCancel with t.Context
Signed-off-by: cargoedit <cargoedit@outlook.com>
2025-09-18 12:25:40 -07:00
Marco Munizaga b3f1e66e26 feat(network): Add Conn.As
ConnAs works in a similar way to errors.As. It allows a user to cut
through the interface layers and extract a specific type of connection
if available.

This serves as a sort of escape hatch to allow users to leverage some
connection specific feature without having to support that feature for
all connections. Getting RTT information is one example.

It also allows us, within the library, to get specific types of
connections out of the interface box. This would have been useful in the
recent changes in tcpreuse. See
https://github.com/libp2p/go-libp2p/pull/3181 and
https://github.com/libp2p/go-libp2p/pull/3142.

Getting access to the underlying type can lead to hard to debug issues.
For example, if a user mutates connection state on the underlying type,
hooks that relied on only mutating that state from the wrapped
connection would never be called.

It is up to the user to ensure they are using this safely.
2025-09-08 14:11:08 -07:00
Marco Munizaga 3ecae665f1 Skip mdns tests on macOS in CI 2025-09-04 12:04:11 -07:00
Marcin Rataj 9afd260b32 fix: deduplicate NAT port mapping requests
Multiple libp2p transports can share the same port (TCP, QUIC,
WebTransport, WebRTC-direct), causing duplicate AddMapping calls
for the same protocol/port combination. This fix adds deduplication
in NAT.AddMapping to prevent redundant NAT device operations and
reduce log spam.
2025-09-04 12:04:11 -07:00
Marcin Rataj 8b798777dc fix: heal NAT mappings after router restart
Router restarts can cause UPnP/NAT-PMP services to change their
listening ports, leading to connection refused errors. This fix
implements automatic NAT rediscovery when consecutive connection
failures are detected, restoring all existing port mappings on
the new NAT instance.

See https://github.com/libp2p/go-libp2p/issues/3224#issuecomment-2866844723
for details on the router behavior that motivated this fix.
2025-09-04 12:04:11 -07:00
Antonio 95cad5091f feat: relay: add option for custom filter function 2025-09-03 20:18:40 -07:00
Marco Munizaga 72894e318a docs: remove broken link (#3375) 2025-08-25 14:34:11 -07:00
Marco Munizaga c954da5e25 AI tooling must be disclosed for contributions (#3372) 2025-08-25 14:00:39 -07:00
Marco Munizaga da810a1764 feat: Migrate to log/slog (#3364) 2025-08-25 14:00:01 -07:00
web3-bot 83d77757a2 ci: uci/update-go (#3371) 2025-08-20 14:18:56 -07:00
sukun 90b841260e basichost: move observed address manager to basichost (#3332) 2025-08-18 12:16:16 -07:00
Marco Munizaga 78f84c40c8 chore: support Go 1.24 & 1.25 (#3366) 2025-08-18 19:09:23 +05:30
Marco Munizaga 9f5945e189 feat(simlibp2p): Simulated libp2p Networks (#3262) 2025-08-15 09:44:03 -07:00
Carlos Peliciari 8e10f84961 bandwidthcounter: add Reset and TrimIdle methods to reporter interface (#3343) 2025-08-11 19:23:50 +05:30
sukun 0d37934033 network: rename NAT Types (#3331) 2025-08-11 19:21:00 +05:30
crStiv 62b9468d0c refactor(quicreuse): use errors.Join in Close method (#3363) 2025-08-08 17:14:09 -07:00
sukun fc4a618881 swarm: move AddCertHashes to swarm (#3330) 2025-08-07 22:41:24 +05:30
Probot 02e583d319 quicreuse: clean up associations for closed listeners. (#3306)
Co-authored-by: Prithvi Shahi <shahi.prithvi@gmail.com>
Co-authored-by: sukun <sukunrt@gmail.com>
2025-08-07 22:39:44 +05:30
sukun b75e678e64 Release v0.43 (#3353) v0.43.0 2025-08-07 21:02:01 +05:30
sukun f6c14a215b chore: upgrade quic-go to v0.54.0 (#3351) 2025-07-31 11:46:38 -07:00