Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
392 commits
Select commit Hold shift + click to select a range
f035d2d
test for exit location in large patch
czarte Sep 13, 2024
2f518d6
implementing exit_location
czarte Sep 17, 2024
b5a3622
ExitLocation struct and its members to messages.rs, set_exit_location…
czarte Sep 20, 2024
a5e8cf2
Gh 784 review four (#521)
czarte Sep 23, 2024
2c3a3dd
implemented country-codes and fallback-routing into MessageBody for N…
czarte Sep 23, 2024
a62fea7
completed test for c
czarte Sep 24, 2024
fdcfcab
implemented handler for exit_location_opt, rename exit_loctation to e…
czarte Sep 29, 2024
85a3835
fmt for HashSet<ExitLocation>, finished the assertions in test exit_l…
czarte Sep 29, 2024
c4890f2
cleanup, test for fallback-routing: false, logger for fallback-routin…
czarte Sep 29, 2024
304363a
change exit_locations_opt from HashSet to HashMap
czarte Sep 30, 2024
acf9999
clearing bootstrapper config
czarte Oct 1, 2024
39aa160
country_undesidability to NodeRecordMetadata
czarte Oct 2, 2024
88306ae
added member for NodeRecordMetadata and processing for country_undesi…
czarte Oct 2, 2024
39b2c5b
added assertion message for assert on db change in actor
czarte Oct 2, 2024
52a659a
refacotring neighborhood_test_utils: extracted make_segmented_ip, and…
czarte Oct 3, 2024
7d65f9b
added unset exit_location logic with test
czarte Oct 3, 2024
6152a9e
change name of test
czarte Oct 3, 2024
5bc34df
merge GH-784 into GH-468
czarte Oct 3, 2024
6578185
fiixing tests for set_exit_location_command, fixing log assertion for…
czarte Oct 4, 2024
fe74815
added assertion on neighborhood to exit_location tests
czarte Oct 7, 2024
e7be714
pull request branch changed to GH-784
czarte Oct 7, 2024
d2adbfe
formatting
czarte Oct 7, 2024
2c09618
fixing comments from review
czarte Oct 7, 2024
867134b
polishing helps
czarte Oct 8, 2024
9a4c1a0
addressing comments from review
czarte Oct 8, 2024
5a234df
polishing helps for exit-location
czarte Oct 9, 2024
9e1c1c7
add use super::*; to tests use
czarte Oct 9, 2024
fff1c3d
add cfg(test) for tests in set_exit_location_command
czarte Oct 9, 2024
3456b2e
fixing clippy complains
czarte Oct 10, 2024
516712a
fix multinode neighborhood constructor
czarte Oct 10, 2024
24ab306
rename set_exit_location_command.rs to exit_location_command.rs
czarte Oct 10, 2024
f14ab6d
add protection for empty Neighborhood DB
czarte Oct 10, 2024
4be9596
change protection for empty Neighborhood
czarte Oct 10, 2024
9a4c687
fixed shared schema, added exit location to --help of masq
czarte Oct 11, 2024
eb3ca81
set version for sccache
czarte Oct 14, 2024
aa01112
add lifetime for daemon_shared_app fn return
czarte Oct 14, 2024
c3e36f2
fixing log assertion in tests, add db to exit location test, fix app …
czarte Oct 14, 2024
129ec37
introduce test utilities
czarte Oct 15, 2024
7174c9f
remove unused import - localhost linux compile and passes all ip_coun…
czarte Oct 16, 2024
e21b545
addressing comments from review
czarte Oct 17, 2024
9208137
addressing comments from review, refactoring Neighborhood for exit-lo…
czarte Oct 21, 2024
0771086
fix tests for separate_u64_values
czarte Oct 22, 2024
60dc65a
add Eq to ExitPreference
czarte Oct 22, 2024
de2a90d
rearranged test_utilities, fix to exit_location_handler and its tests
czarte Oct 22, 2024
6307d39
fixing ByteArrayWriter and Reader for masq
czarte Oct 23, 2024
34ee03b
added more nodes to exit_location test with fallback to test UNREACHA…
czarte Oct 23, 2024
b85eaf5
move test_utilities to dev-dependencies
czarte Oct 24, 2024
56ae969
test_utilities from dev to production dependencies in masq_lib
czarte Oct 24, 2024
9932e02
formatting help
czarte Oct 25, 2024
c628ca8
formatting help
czarte Oct 25, 2024
0da1a22
review 3 - refactoring message handler for exit location, and few min…
czarte Oct 25, 2024
4a53523
country codes for NodeRecords in tests Neighborhood DBs, constants fo…
czarte Oct 27, 2024
c2e57dc
formatting
czarte Oct 28, 2024
c024595
fix todo comment, and formatting
czarte Oct 29, 2024
dddc69a
exit-loaction data structures moved into the ExitTools, cloned into N…
czarte Oct 30, 2024
2474e75
implemented adding country_undesirability for introducer and debutant
czarte Oct 31, 2024
6f4c6d1
formatting and remove unnecesary let
czarte Nov 1, 2024
e43083f
fallback routing assertion change
czarte Nov 1, 2024
cc24a1f
formatting
czarte Nov 1, 2024
a7351e6
rename ExitTools
czarte Nov 3, 2024
641001e
fix request for neverssl.com to impersonate user-agent
czarte Nov 4, 2024
39c2ec3
merge GH-468-545 to GH-788
czarte Nov 5, 2024
5eff1d7
changes in test for country_code_route, remove country_code_opt from …
czarte Nov 6, 2024
9c0d116
working exit country selection wihtout fallback, introduces new struc…
czarte Nov 7, 2024
d550a3c
start of implementing find_exit_location
czarte Nov 8, 2024
8b25698
changes to create db_countries
czarte Nov 8, 2024
10afc2a
completed process for db_countries and routign_engine for fallback_ro…
czarte Nov 11, 2024
89d4a4f
handling missing locations in NeighborhoodDB
czarte Nov 12, 2024
ce70127
introduced Error responose for ExitLocation handler, adjusted tests, …
czarte Nov 13, 2024
f516f53
modified routing engine to harvest more exit nodes from Neihgborhood DB
czarte Nov 18, 2024
ae8547d
implemented recursion for research neighborhood, adjusted tests, miss…
czarte Nov 19, 2024
0493290
fix research_neighborhood in routing_engine, new recursion call for r…
czarte Nov 20, 2024
ef6432c
formatting and compiler complains resolved
czarte Nov 21, 2024
7ee0024
test for db_countries setting on handle gossip
czarte Nov 27, 2024
d4fec75
completed test for newly introduced exit node, added assertions, works
czarte Nov 28, 2024
ce8e766
test for removing exit location of last node with particular country …
czarte Nov 28, 2024
5d67816
formatting
czarte Nov 29, 2024
15b65cf
removing comments, introducing TODOs
czarte Nov 29, 2024
22d791e
unit test for init_db_countries(), removed duplicit test for handle g…
czarte Nov 29, 2024
37f513a
added --show-countries for exit-location subcommand for testing purposes
czarte Nov 29, 2024
f2c1994
first cherry pick from amoy commit b2a3ebf85199b3c1a6620a9047aaab4109…
Apr 2, 2024
0861864
added amoy network
czarte Dec 4, 2024
a66de41
formatting
czarte Dec 8, 2024
f664481
amoy fixing
czarte Dec 8, 2024
62a0c42
Merge branch 'GH-788-QA-amoy' of https://github.com/MASQ-Project/Node…
czarte Dec 8, 2024
62d8ef9
fixing routing engine for direction back in route, and fallback-routi…
czarte Dec 11, 2024
c128e40
create prefix with capacity
czarte Dec 13, 2024
39e8a54
back to previous version of routing_engine
czarte Dec 19, 2024
d65a743
fix dotgraph
czarte Dec 19, 2024
7270bbf
allow dead code for unused service functions for new multinode integr…
czarte Dec 19, 2024
9ab9911
fix tilde for windows - cherry pick from master
czarte Dec 20, 2024
9970cab
formatting
czarte Dec 20, 2024
f483308
remove unused imports
czarte Dec 20, 2024
9aeda6c
fix tilde in config-file path from master
czarte Dec 20, 2024
a0d0206
merge master into branch
czarte Dec 31, 2024
8ae6303
replace neverssl.com for testingmcafeesites.com in multiple_streans_z…
czarte Jan 2, 2025
40dc4c8
formatting
czarte Jan 2, 2025
481e88d
remove slash from url in test to pass
czarte Jan 2, 2025
dbdcb71
multinode test with processing functions
czarte Jan 7, 2025
ee6bfcf
remove unused imports and questionmark
czarte Jan 7, 2025
bddce48
connect last node to germany network
czarte Jan 7, 2025
a2214cc
interconnect_world_network public
czarte Jan 7, 2025
3880b59
remove networks before creation
czarte Jan 7, 2025
897e003
add creation of integration_net to test
czarte Jan 8, 2025
2802fb7
remove world network from last node
czarte Jan 8, 2025
a29c886
fix first node
czarte Jan 8, 2025
f097620
network into docker run
czarte Jan 8, 2025
95d7c64
add clone, debug, partialeq to NetworkPack
czarte Jan 8, 2025
e5fdf9a
fix arguments count to do_docker_run
czarte Jan 8, 2025
1e4c8a2
fix do_prepared_docker_run
czarte Jan 8, 2025
3fbd3ee
solving temporary issue
czarte Jan 8, 2025
f932afd
solving dereference
czarte Jan 8, 2025
cd5197e
solving free while use issue
czarte Jan 8, 2025
3e63b57
resolve lifetime issues
czarte Jan 8, 2025
315e1f6
resolve lifetime issues do_docker_run
czarte Jan 8, 2025
95b6f12
remove network connect duplication
czarte Jan 8, 2025
deca93d
fix ip start index for nodes in loop
czarte Jan 8, 2025
7f93b10
fix ip start index for nodes in loop cz
czarte Jan 8, 2025
7b3f90b
fix ip start in loop
czarte Jan 8, 2025
9fcb0b8
fix ip start in loop de
czarte Jan 8, 2025
3d86f32
multinode integration test with multiple real networks, selecting exi…
czarte Jan 20, 2025
0610481
country_code_exit_location_routing - final stage with multiple networks
czarte Jan 20, 2025
acba592
multinode test http_end_to_end_routing_test_with_exit_locationL
czarte Jan 21, 2025
ea54b5c
rebuilding exit-location command response
czarte Jan 24, 2025
4227dcf
introduced UiSetExitLocationResponse and processing it in masq CLI, f…
czarte Feb 3, 2025
4499149
multinode test and refactoring masq command request and response
czarte Feb 4, 2025
5b6330c
resolving self-review: updated copyright to right year, removing obso…
czarte Feb 14, 2025
7b392c4
added assertions Response and udated Response processing exit-locatio…
czarte Feb 17, 2025
4cd9bd8
remove unnecessary Docker components for exit_location test, fixing s…
czarte Feb 19, 2025
c5a114b
resolved handle_new_public_ip test, and half way to resolve handle_go…
czarte Feb 20, 2025
652c670
test for init_db_countries in handle_agrs, condition for one-hop in h…
czarte Feb 24, 2025
ff55453
formatting
czarte Feb 24, 2025
6fa1ff7
fix exit-location cmd assertion
czarte Feb 25, 2025
e175d39
multinode test from master
czarte Feb 25, 2025
4f69f33
make_node_record do not add country if show_ip is false
czarte Feb 25, 2025
d038969
ok_responose partialy from master for MockBlockchainClientServer
czarte Feb 26, 2025
18cb5e3
Merge branch 'master' into GH-788_multinode_test
czarte Feb 26, 2025
137ebea
resolved last comments
czarte Feb 26, 2025
bb19b4a
remove data from dbip_country.rs - prepared for actions build
czarte Feb 27, 2025
443a398
working on exit_location_command
czarte Feb 27, 2025
849214c
addressing issues from review
czarte Mar 4, 2025
14b4c03
continue addressing review comments
czarte Mar 5, 2025
dd6873b
Added DBIP file generation
FinsaasGH Mar 15, 2025
e2b77c4
ci: improve GitHub Actions workflow - Replace s3-sync-action with AWS…
FinsaasGH Mar 15, 2025
3d13940
refactor: improve path resolution and code quality in generate_dbip
FinsaasGH Mar 15, 2025
e5d6dfa
ci: remove unnecessary dependencies and update generate dbip step
FinsaasGH Mar 15, 2025
5e77a80
chore: remove unused generate_dbip_country.sh script
FinsaasGH Mar 15, 2025
4ae5489
docs: update download script message to reference cargo command
FinsaasGH Mar 15, 2025
a3cdcf0
refactor: Improve generate_dbip.rs organization and efficiency
FinsaasGH Mar 15, 2025
6614f58
fix: Update dbip_country.rs paths in CI workflow to use temp directory
FinsaasGH Mar 15, 2025
0c995bb
fix: Update verification pattern for generated dbip file
FinsaasGH Mar 15, 2025
3dd52e1
ci: revert platform changes to legacy
FinsaasGH Mar 15, 2025
c0780a3
ci: update windows specific file move to use bash
FinsaasGH Mar 15, 2025
325bd40
ci: corrected verification step
FinsaasGH Mar 15, 2025
a803c46
more addressed comments from review
czarte Mar 17, 2025
cb56d7b
test for min_hops_change affects exit_countries and enrich_exit_count…
czarte Mar 18, 2025
c23f6c8
new machinery for min-hop affects exit location settings
czarte Mar 19, 2025
666699e
handle_config_change_msg debugging
czarte Mar 20, 2025
60643e0
finalize min_hops_change_affects_db_countries test
czarte Mar 20, 2025
bbf67df
rename test
czarte Mar 20, 2025
b0e74e8
refactoring neighborhood/mod.rs, moving AccessibleGossipRecord to gos…
czarte Mar 20, 2025
1db154c
Room for an MMDB parser
dnwiebe Mar 23, 2025
63d26da
Generating countries, rudimentary
dnwiebe Mar 23, 2025
3f7404f
parse() should produce a Countries object, instead of Vec<(String, St…
dnwiebe Mar 24, 2025
04807b0
fix db to dot grap test
czarte Mar 24, 2025
cd7e2ae
Interim commit
dnwiebe Mar 25, 2025
7fb6d7e
addressing more comments from review
czarte Mar 25, 2025
c1682ad
addressing minor changes from review
czarte Mar 26, 2025
22936bf
addressing review comments
czarte Mar 26, 2025
3d4ffff
resolving comments from review
czarte Mar 27, 2025
1a8d6b2
Must make tests self-adapting
dnwiebe Mar 28, 2025
c89dca2
No MMDB yet, but tests pass
dnwiebe Mar 30, 2025
8248649
addressing comments from review
czarte Apr 1, 2025
6148a71
UI README updated (uncompleted), comment explaining country_undesirab…
czarte Apr 3, 2025
9c32dd1
About to try bringing in an actual DBIP file
dnwiebe Apr 4, 2025
174259b
Happy-path test passing
dnwiebe Apr 7, 2025
d50da6b
formatting for ExitLovationSet
czarte Apr 8, 2025
98a9800
setup_reporter_shared_app and wait_for_masq_node_ends
czarte Apr 8, 2025
81faa51
CountryCodes to CountryBlocks, fix formatting of ExitLocationSet in t…
czarte Apr 8, 2025
be250eb
resolving unimplemented Copy trait in Process
czarte Apr 8, 2025
6d01238
new clap test providing_show_countries_with_other_argument_fails
czarte Apr 8, 2025
7fe5998
format
czarte Apr 8, 2025
cf1be29
MMDB parser seems to be finished
dnwiebe Apr 9, 2025
7adb418
fallback routing test change
czarte Apr 9, 2025
9d97e23
country codes to nodes names in tests
czarte Apr 9, 2025
2573729
description to exit-location response
czarte Apr 9, 2025
5269084
removing comments, adding country codes to node names in tests
czarte Apr 9, 2025
b714d97
Now MMDB parser isn't as wasteful
dnwiebe Apr 10, 2025
e9c7a64
Removed dead data
dnwiebe Apr 10, 2025
cfb1ba0
Tests all pass
dnwiebe Apr 10, 2025
eb83b48
Merge branch 'GH-788_multinode_test-review2' into GH-v2-580b
dnwiebe Apr 10, 2025
03546ed
Merge mostly complete; lots of tests pass. Maybe all of them?
dnwiebe Apr 14, 2025
d7a6ddb
One test failing. Can't figure why.
dnwiebe Apr 14, 2025
de6edae
All masq tests passing now
dnwiebe Apr 14, 2025
e7b7e3c
Multinode tests pass; one bit of code cleanup remains
dnwiebe Apr 14, 2025
d1dc3e9
All tests should be passing
dnwiebe Apr 14, 2025
199cd04
Removed dead code
dnwiebe Apr 14, 2025
4d50c3a
Little surgery on modules and imls
dnwiebe Apr 14, 2025
41456e5
Updated the CSV country list from MMDB
dnwiebe Apr 15, 2025
b67a4b3
Started GitHub Actions file for monthly downloads
dnwiebe Apr 15, 2025
07d9121
conditions for failing download and gargo run, to not continue, file …
czarte Apr 16, 2025
894deaf
Going to try out the dbip_download workflow
dnwiebe Apr 16, 2025
62fedaf
Temporary on:
dnwiebe Apr 16, 2025
0135f19
addressing review 2 comments
czarte Apr 16, 2025
3dc3c4c
addressing comments from review2
czarte Apr 17, 2025
915df8b
fixing line length in user interface interface md
czarte Apr 18, 2025
84278e8
tests to remove unexistent countries from user_exit_preferences.locat…
czarte Apr 22, 2025
89239d2
remove tests and commnet of filtering out unexistent country_codes
czarte Apr 22, 2025
b1cf2fa
comment about the locations_opt
czarte Apr 22, 2025
5589c5f
make_node_record_cc and adjusting tests, get rid of free world bit
czarte Apr 23, 2025
71f222b
fixes country_code on tests, introduced make_node_record_cc
czarte Apr 24, 2025
e670b46
addressing commnets from review3
czarte Apr 28, 2025
2e8c2b7
remove pub from CountryCodeFinder member, and remove commented out code
czarte Apr 28, 2025
669b67b
utilization of strings in clap test for show-countries
czarte Apr 28, 2025
d371ab4
last review with master merged in
czarte Apr 28, 2025
fda0c20
merged master in
czarte Apr 28, 2025
2b835c9
forgotten change
czarte Apr 29, 2025
2b57dc0
generate dbip_country.rs workflow and checkout dbip_country.rs from s…
czarte Apr 29, 2025
ac82b47
merge GH-788 in
czarte Apr 29, 2025
00bf223
resolved most failing tests, now failing debut_with_node_addr_not_acc…
czarte Apr 30, 2025
244c6df
fixing failing tests
czarte May 2, 2025
242dad5
comment out fetch dbip, and remove unwanted action build dbip
czarte May 2, 2025
bc80424
try to fix actions
czarte May 2, 2025
2fef65a
all countries in test dbip_country.rs
czarte May 2, 2025
38fb895
removing misstake
czarte May 2, 2025
86c259f
added checkout of read dbip_country.rs from DBIP-Experiment
czarte May 5, 2025
645fb80
new workflow: in local we work with reduced dbip, but on ci/all.sh we…
czarte May 5, 2025
7d46624
testing git pre-commit hook
czarte May 7, 2025
d7202cc
update pre-commit hook
czarte May 7, 2025
54cd278
remove checkout of dbip_country.rs from ci-matrix, it will be handled…
czarte May 7, 2025
369e541
testing pre-commit hooks changes
czarte May 12, 2025
0349cb7
testing commit hook
czarte May 12, 2025
c955825
testing pre commit hook
czarte May 12, 2025
e2d09c2
testing pre commit hook
czarte May 12, 2025
23db9a9
final polishing of pre-commit hook
czarte May 12, 2025
3127a44
addressed comments from Review
czarte May 12, 2025
eb49ebd
formatting
czarte May 12, 2025
166e706
addressing review comments, plus fix double entry of ip_country in mo…
czarte May 15, 2025
e493777
Enabled IDE tests in ip_country
dnwiebe May 15, 2025
d5c8276
Fixed module-definition problem, addressed two review comments
dnwiebe May 15, 2025
4c5d524
Weird stuff with TryFrom and From
dnwiebe May 15, 2025
0d4f36f
addressing review comments
czarte May 20, 2025
37dca71
fix ci.all condition for chekout dbip
czarte May 20, 2025
c707004
remove comments and exit in ci/all.sh
czarte May 20, 2025
67929a0
generated-source from Node repo
czarte May 29, 2025
ba6daab
dbip download workflow for master
czarte May 29, 2025
697b3e5
adjust cron shedule for dbip download
czarte May 29, 2025
7dd6307
final touch for dbip workflow
czarte Jun 6, 2025
1f34ba3
Merge branch 'master' into GH-v2-580b-czarte
czarte Jun 6, 2025
65be2e7
git pull before ci/all.sh
czarte Jun 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# File to check (relative to repo root)
FILENAME="ip_country/src/dbip_country.rs"

if ! git diff --cached --name-only | grep -q "^$FILENAME$"; then
exit 0
fi

# find 'Nonexistents' country in dbip_country.rs
@cat "$FILENAME" | grep '("NOEX", "Nonexistent")'
NONEXISTENT=$?

# Get local file size (staged version, not working copy)
LOCAL_SIZE=$(git ls-files --stage | grep "$FILENAME" | awk '{print $2}' | xargs git cat-file -s)

if [[ $LOCAL_SIZE -gt 1000000 || NONEXISTENT -gt 0 ]]; then
if [[ $LOCAL_SIZE -gt 1000000 ]]; then
echo "❌ Commit blocked: $FILENAME size it not dev version, we want to keep dev version under 1 MB."
echo " Local file size: $LOCAL_SIZE bytes"
fi
if [[ $NONEXISTENT -gt 0 ]]; then
echo "❌ Commit blocked: Dev file must contain '(\"NOEX\", \"Nonexistents\")' country"
fi
echo ""
echo " ⚡ Please sync the file with the remote before committing using:"
echo " git checkout HEAD -- ip_country/src/dbip_country.rs"
exit 1
fi

# All good
exit 0
68 changes: 41 additions & 27 deletions .github/workflows/ci-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Build node on ${{ matrix.target.os }}
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -36,7 +36,8 @@ jobs:
toolchain: 1.63.0
components: rustfmt, clippy
override: true
- uses: actions/cache@v3

- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -45,10 +46,13 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Build ${{ matrix.target.os }}
run: |
git fetch
./ci/all.sh
./ci/multinode_integration_test.sh
./ci/collect_results.sh
Expand All @@ -59,49 +63,59 @@ jobs:
with:
name: Node-${{ matrix.target.name }}
path: results

- name: diagnostics
if: failure()
run: |
echo "final disc diagnostics ------>"
df -h /Users/runner/work/Node/Node/node/target/release
deploy_to_s3:
needs: build
if: success() && (startsWith(github.head_ref, 'GH') || startsWith(github.head_ref, 'v'))
strategy:
matrix:
os: [linux, macos, windows]
runs-on: ubuntu-22.04
os: [linux, macos, windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1

- name: Download artifacts
uses: actions/download-artifact@v4

- name: Display structure of downloaded files
run: ls -R

- name: Check artifacts exist
run: |
if [ ! -d "Node-${{ matrix.os }}/generated/bin/" ]; then
echo "Error: Build artifacts not found"
exit 1
fi

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- if: startsWith(github.head_ref, 'GH')
name: Versioned S3 Sync
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl private --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-2'
DEST_DIR: 'Node/${{ github.head_ref }}/Node-${{ matrix.os }}'
SOURCE_DIR: 'Node-${{ matrix.os }}/generated/bin/'
run: |
aws s3 sync "Node-${{ matrix.os }}/generated/bin/" "s3://${{ secrets.AWS_S3_BUCKET }}/Node/${{ github.head_ref }}/Node-${{ matrix.os }}" \
--delete \
--no-progress \
--acl private

- if: startsWith(github.head_ref, 'v')
name: Latest S3 Sync
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl private --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-2'
DEST_DIR: 'Node/latest/Node-${{ matrix.os }}'
SOURCE_DIR: 'Node-${{ matrix.os }}/generated/bin/'
run: |
aws s3 sync "Node-${{ matrix.os }}/generated/bin/" "s3://${{ secrets.AWS_S3_BUCKET }}/Node/latest/Node-${{ matrix.os }}" \
--delete \
--no-progress \
--acl private

- name: Invalidate Binaries CloudFront
uses: chetan/invalidate-cloudfront-action@v2.4
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/dbip_download.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Download DBIP data and generate dbip_country.rs

on:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * *" # Runs at midnight on the 3rd of every month
schedule:
- cron: "0 0 3 * *" # Runs at midnight on the 3rd of every month

env:
TEMP_DIR: '/tmp'
Expand All @@ -26,26 +25,22 @@ jobs:

- name: Download DBIP data in MMDB format
run: |
set -xv
export YEAR_MONTH=$(date +%Y-%m)
echo "TEMP_DIR=$(mktemp -d)" >> $GITHUB_ENV
echo "YEAR_MONTH=$YEAR_MONTH" >> $GITHUB_ENV
git clone https://github.com/MASQ-Project/DBIP-Experiment.git dbipexperiment
cd dbipexperiment/ip_country
cd ip_country
mkdir -p dbip-data
curl -L -o dbip-data/dbip-country-lite.mmdb.gz "https://download.db-ip.com/free/dbip-country-lite-$YEAR_MONTH.mmdb.gz"
gunzip dbip-data/dbip-country-lite.mmdb.gz

- name: Generate Rust source file
run: |
set -xv
cd dbipexperiment/ip_country
cd ip_country
cargo run < "dbip-data/dbip-country-lite.mmdb" > "$TEMP_DIR"/dbip_country.rs
ls "$TEMP_DIR"

- name: Commit and push generated file
run: |
set -xv
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch
Expand Down
2 changes: 2 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions USER-INTERFACE-INTERFACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,75 @@ descriptor (for example, if it's still waiting on the router to get a public IP
Node descriptor (for example, if its neighborhood mode is not Standard), the `nodeDescriptorOpt`
field will be null or absent.

#### `exit-location`
##### Direction: Request
##### Correspondent: Node
##### Layout:
```
"payload": {
"fallbackRouting": <boolean>,
"exitLocations": [
{
"countryCodes": [string, ..],
"priority": <positive integer>
},
],
"showCountries": <boolean>
}
```
##### Description:
This command requests information about the countries available for exit in our neighborhood and allows us to set up the
desired locations with their priority. The priority provides the node's perspective on how important a particular country
is for our preferences.

This command can be used in two ways which can't be combined:
1. If we use the command with showCountries set to true.
2. If we want to set an exit location.

In case 1. it retrieves information about the available countries in our neighborhood. Other parameters are
ignored.

In case 2. we must set showCountries to false and then configure fallbackRouting and exitLocations with our preferences.

The `fallbackRouting` parameter is defaulted as `false`, if not provided. Determines whether we want to block exit for a particular
country. If parameter is `false` and requested country is no longer available, the route to exit will fail during construction.
If is set to `true`, we can exit through any available country if none of our specified exitLocations are accessible.

Priorities are used to determine the preferred exit countries. Priority 1 is the highest, while higher numbers indicate
lower priority. For example, if we specify DE with priority 1 and FR with priority 2, then an exit through France will
only be used if a German exit is unavailable or significantly more expensive.

#### `exit-location`
##### Direction: Response
##### Correspondent: UI
##### Layout:

```
"payload": {
"fallbackRouting": <boolean>,
"exitCountrySelection": <[
{
"countryCodes": [string, ..],
"priority": <positive integer>
},
]>,
"missingCountries": <[string, ..]>
"exitCountries": <optional[string, ..]>
}
```
##### Description:
In response, the Node sends a payload to the UI that contains either the Exit Location settings (which may include missing
countries) or a list of exit countries.

Exit Location settings consist of fallbackRouting, exitCountrySelection, and missingCountries, where:
1. fallbackRouting is a boolean representing the user's choice to enable or disable fallback routing within the neighborhood.
2. exitCountrySelection is an array of objects, where each object represents a set of country codes along with their assigned priority.
3. missingCountries is an array of strings representing a list of countries that are currently unavailable in the Node's Neighborhood Database.

Exit Countries (or exitCountries) is an optional array containing ISO country code strings. These represent the countries
currently available in the Node's Neighborhood Database. The user can select from these countries to configure the Exit
Location settings.

#### `financials`
##### Direction: Request
##### Correspondent: Node
Expand Down
Loading
Loading