Quellcode durchsuchen

Fix docstrings about relays (#548)

(cherry picked from commit 39f6f8100e6adfa2909e905fb0eb0b556d346676)
Alexander Borzunov vor 2 Jahren
Ursprung
Commit
67a996c55f

+ 3 - 1
hivemind/hivemind_cli/run_dht.py

@@ -62,7 +62,9 @@ def main():
         help="Disable circuit relay functionality in libp2p (see https://docs.libp2p.io/concepts/nat/circuit-relay/)",
     )
     parser.add_argument(
-        "--use_auto_relay", action="store_true", help="Look for libp2p relays to reach peers behind NATs/firewalls"
+        "--use_auto_relay",
+        action="store_true",
+        help="Look for libp2p relays to become reachable if we are behind NAT/firewall",
     )
     parser.add_argument(
         "--refresh_period", type=int, default=30, help="Period (in seconds) for fetching the keys from DHT"

+ 3 - 1
hivemind/hivemind_cli/run_server.py

@@ -42,7 +42,9 @@ def main():
         help="Disable circuit relay functionality in libp2p (see https://docs.libp2p.io/concepts/nat/circuit-relay/)",
     )
     parser.add_argument(
-        "--use_auto_relay", action="store_true", help="Look for libp2p relays to reach peers behind NATs/firewalls"
+        "--use_auto_relay",
+        action="store_true",
+        help="Look for libp2p relays to become reachable if we are behind NAT/firewall",
     )
 
     parser.add_argument('--num_handlers', type=int, default=None, required=False,

+ 4 - 4
hivemind/p2p/p2p_daemon.py

@@ -130,10 +130,10 @@ class P2P:
         :param use_ipfs: Bootstrap to IPFS (incompatible with initial_peers)
         :param use_relay: Enable circuit relay functionality in libp2p
                           (see https://docs.libp2p.io/concepts/nat/circuit-relay/).
-                          If enabled (default), others can use you as a relay.
-                          If you want use relays yourself (to reach peers behind NATs/firewalls),
-                          please also pass `use_auto_relay=True`.
-        :param use_auto_relay: Look for libp2p relays to reach peers behind NATs/firewalls
+                          If enabled (default), you can reach peers behind NATs/firewalls through libp2p relays.
+                          If you are behind NAT/firewall yourself,
+                          please pass `use_auto_relay=True` to become reachable.
+        :param use_auto_relay: Look for libp2p relays to become reachable if we are behind NAT/firewall
         :param quic: Deprecated, has no effect since libp2p 0.17.0
         :param use_relay_hop: Deprecated, has no effect since libp2p 0.17.0
         :param use_relay_discovery: Deprecated, has no effect since libp2p 0.17.0