mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
chore: Update network address config to use loopback (127.0.0.1) instead of wildcard (0.0.0.0) across multiple examples and utilities.
This commit is contained in:
@ -216,7 +216,7 @@ async def run_listener(
|
||||
)
|
||||
|
||||
# Start listening
|
||||
listen_addr = multiaddr.Multiaddr(f"/ip4/0.0.0.0/tcp/{port}")
|
||||
listen_addr = multiaddr.Multiaddr(f"/ip4/127.0.0.1/tcp/{port}")
|
||||
|
||||
try:
|
||||
async with host.run([listen_addr]):
|
||||
@ -275,7 +275,7 @@ async def run_dialer(
|
||||
)
|
||||
|
||||
# Start listening on a different port
|
||||
listen_addr = multiaddr.Multiaddr(f"/ip4/0.0.0.0/tcp/{port}")
|
||||
listen_addr = multiaddr.Multiaddr(f"/ip4/127.0.0.1/tcp/{port}")
|
||||
|
||||
async with host.run([listen_addr]):
|
||||
logger.info("Dialer host ready!")
|
||||
|
||||
Reference in New Issue
Block a user