node: New relay configuration for nodes
Relay now has three values: “always”, “never” and “auto”.
The first two operate like the previous true/false. The
new (default) value turns relaying on for nodes with public (external)
addresses and off for nodes without. This should reduce redundant traffic on
the network, that was causing the rate limiters to trigger.
9 files changed
+172
-117
abf89438
→
a9b94b0a
modified build/build
@@ -10,15 +10,15 @@ main() {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -29,7 +29,7 @@ main() {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -41,6 +41,8 @@ main() {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -86,4 +88,4 @@ echo
|
|
|
|
|
|
| - | |
| + | |
modified radicle-cli/examples/rad-config.md
@@ -29,7 +29,7 @@ $ rad config
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/examples/rad-sync.md
@@ -11,13 +11,13 @@ If we check the sync status, we see that our peers are out of sync.
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -33,13 +33,13 @@ Now, when we run `rad sync status` again, we can see that `bob` and
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-cli/tests/commands.rs
@@ -39,6 +39,7 @@ mod config {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -52,20 +53,27 @@ mod config {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -965,9 +973,9 @@ fn rad_review_by_hunk() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1332,9 +1340,9 @@ fn rad_clone_connect() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1738,9 +1746,9 @@ fn test_cob_deletion() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1784,12 +1792,12 @@ fn rad_sync() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1874,9 +1882,9 @@ fn test_replication_via_seed() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-httpd/src/api/v1/profile.rs
@@ -92,7 +92,7 @@ mod routes {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-node/src/service.rs
@@ -25,7 +25,7 @@ use radicle::node;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1334,7 +1334,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1346,7 +1346,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1358,7 +1358,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1379,12 +1379,12 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1394,12 +1394,12 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1419,12 +1419,12 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1473,7 +1473,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1526,7 +1526,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1600,7 +1600,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -1652,8 +1652,15 @@ where
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-node/src/tests/e2e.rs
@@ -18,6 +18,19 @@ use crate::storage::git::transport;
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -27,8 +40,8 @@ fn test_inventory_sync_basic() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -51,9 +64,9 @@ fn test_inventory_sync_bridge() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -81,9 +94,9 @@ fn test_inventory_sync_ring() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -118,9 +131,9 @@ fn test_inventory_sync_star() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -150,8 +163,8 @@ fn test_replication() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -210,8 +223,8 @@ fn test_replication_ref_in_sigrefs() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -251,8 +264,8 @@ fn test_replication_ref_in_sigrefs() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -304,8 +317,8 @@ fn test_migrated_clone() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -357,8 +370,8 @@ fn test_dont_fetch_owned_refs() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -384,8 +397,8 @@ fn test_fetch_followed_remotes() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -439,8 +452,8 @@ fn test_missing_remote() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -468,8 +481,8 @@ fn test_fetch_preserve_owned_refs() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -514,8 +527,8 @@ fn test_clone() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -572,8 +585,8 @@ fn test_fetch_up_to_date() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -601,8 +614,8 @@ fn test_fetch_unseeded() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -631,8 +644,8 @@ fn test_large_fetch() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -681,14 +694,16 @@ fn test_concurrent_fetches() {
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -773,8 +788,8 @@ fn test_connection_crossing() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -841,9 +856,9 @@ fn test_non_fastforward_sigrefs() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -949,9 +964,9 @@ fn test_outdated_sigrefs() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1045,9 +1060,9 @@ fn test_outdated_delegate_sigrefs() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1133,8 +1148,8 @@ fn missing_default_branch() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -1185,9 +1200,9 @@ fn test_background_foreground_fetch() {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1273,10 +1288,10 @@ fn test_catchup_on_refs_announcements() {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/node/config.rs
@@ -234,6 +234,19 @@ impl Default for PeerConfig {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -276,9 +289,9 @@ pub struct Config {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -310,7 +323,7 @@ impl Config {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/serde_ext.rs
@@ -110,6 +110,16 @@ pub fn is_default<T: Default + PartialEq>(t: &T) -> bool {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|