Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 37 additions & 21 deletions bash/nord/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,55 @@ These scripts make it easy to manage NordVPN Meshnet peers, configure exit nodes

You can copy these scripts to your local bin directory to run them from anywhere:

Does need some ass bringing party tonight!

```bash
./copy_scripts.sh
source ~/.bashrc
./copy_scripts.sh
source ~/.bashrc
```

Once installed, all commands are globally available with a `nord_` prefix (e.g. `nord_login`).# Available Commands Local File | Installed Global Command | Description | :--- | :--- | :--- | `login.sh` | `nord_login` | Authenticate with NordVPN | `logout.sh` | `nord_logout` | Log out of NordVPN |
`config.sh` | `nord_config` | Configure NordVPN routing and settings |
`connect.sh` | `nord_connect <peer>` | Connect to a Meshnet peer |
`exit_node.sh` | `nord_exit_node <peer>` | Set a peer as your exit node |
`list_peers.sh` | `nord_list_peers` | List available Meshnet peers |
`set_nickname.sh` | `nord_set_nickname` | Set a local nickname for the device |
`reset.sh` | `nord_reset` | Reset NordVPN settings to defaults |
Once installed, all commands are globally available with a `nord_` prefix (e.g. `nord_login`).
Comment on lines 7 to +14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Document the ~/.local/bin prerequisites.

copy_scripts.sh does not create ~/.local/bin or add it to PATH. source ~/.bashrc only reloads the existing file. On a clean system, installation can fail or the commands will not be available globally.

Add directory creation and a correct persistent PATH setup to these instructions, or make copy_scripts.sh perform those steps.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` around lines 7 - 14, Update the installation
instructions surrounding copy_scripts.sh to ensure ~/.local/bin exists and is
persistently included in PATH before sourcing ~/.bashrc, or move these
responsibilities into copy_scripts.sh. Preserve the documented global nord_
command usage after installation.


## Setup Examples
## Available Commands

| Local File | Installed Global Command | Description |
| :--- | :--- | :--- |
| `login.sh` | `nord_login` | Authenticate with NordVPN |
| `logout.sh` | `nord_logout` | Log out of NordVPN |
| `config.sh` | `nord_config` | Configure NordVPN routing and settings |
| `connect.sh` | `nord_connect <peer>` | Connect to a Meshnet peer |
| `exit_node.sh` | `nord_exit_node <peer>` | Set a peer as your exit node |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Describe nord_exit_node as local exit-node configuration.

bash/nord/exit_node.sh accepts a nickname for the current device, sets that local nickname, and grants permissions to peers from peers.json. It does not select <peer> as the current device’s exit node.

Update the command signature, description, and heading.

Proposed documentation change
-| `exit_node.sh` | `nord_exit_node <peer>` | Set a peer as your exit node |
+| `exit_node.sh` | `nord_exit_node <nickname_for_this_device>` | Configure this device as an exit node |

-### Set Exit Node
+### Configure This Device as an Exit Node

Also applies to: 31-35

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` at line 24, Update the README documentation for
nord_exit_node to describe local exit-node configuration: change the command
signature to use the current device nickname, revise the table description, and
update the related heading around the documented section. Do not describe the
command as selecting a peer as the current device’s exit node.

| `list_peers.sh` | `nord_list_peers` | List available Meshnet peers |
| `set_nickname.sh` | `nord_set_nickname` | Set a local nickname for the device |
| `reset.sh` | `nord_reset` | Reset NordVPN settings to defaults |

Get a beautiful naighbour, love her, proposed to her, go puse for
## Setup Examples

### Set Exit Node

nord_exit_node mesh-raspberry
1
2 ### Connect to Peer
```bash
nord_exit_node mesh-raspberry
```

### Connect to Peer

```bash
nord_connect mesh-raspberry
nord_connect mesh-dell
```

## Peer Names

The following peer names are configured/referenced:

- `mesh-hp`
- `mesh-dell`
- `mesh-tab8`
- `mesh-pixel`
- `mesh-raspberry`
- `mesh-sunndal`

## RaspberryPi Routing / Exit Node Setup

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the standard product name Raspberry Pi.

Change RaspberryPi to Raspberry Pi.

🧰 Tools
🪛 LanguageTool

[grammar] ~54-~54: Ensure spelling is correct
Context: ...- mesh-raspberry - mesh-sunndal ## RaspberryPi Routing / Exit Node Setup The Raspberr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` at line 54, Update the “RaspberryPi Routing / Exit Node
Setup” heading to use the standard product name “Raspberry Pi,” preserving the
rest of the heading unchanged.

Source: Linters/SAST tools


The Raspberry Pi is configured to act as an exit-node for other Meshnet peers, allowing them to route traffic through it and
access LAN devices (like printers or cameras).
*Note:* If you want to route streaming traffic (e.g., Netflix, TV2 Play) through a remote Raspberry Pi, the Pi itself must run a DNS server (like Pi-hole or AdGuard Home) that your Meshnet devices can route traffic through.
The Raspberry Pi will be configured to act as an exit-node for other Meshnet peers. Other peers using the Raspberry Pi for routing also gives them permission to access local devices like printers, cameras, and other LAN-connected devices.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Separate routing permission from LAN-access permission.

bash/nord/exit_node.sh uses separate allowed_for_routing and allowed_for_local lists. In bash/nord/peers.json, several routing peers are not in the local-access list. Routing through the Raspberry Pi does not automatically grant access to printers, cameras, or other LAN devices.

State that only peers in allowed_for_local receive local-network access.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` at line 56, Update the Raspberry Pi exit-node
documentation to clarify that routing permission does not grant LAN access; only
peers listed in allowed_for_local receive access to local-network devices, while
allowed_for_routing controls exit-node routing separately.


The ultimate goal is to install this Raspberry Pi at a remote location (e.g., family home) so that you can connect to local streaming services (Netflix, TV2 Play, etc.) from other locations.

ould you like me to go ahead and apply these updates (fixing both copy_scripts.sh and rewriting README.md)?
*Note:* If you want to route streaming traffic through a remote Raspberry Pi, the Pi itself must run a DNS server (like Pi-hole or AdGuard Home) that your Meshnet devices can route traffic through.
1 change: 1 addition & 0 deletions bash/nord/copy_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

cp config.sh ~/.local/bin/nord_config
cp connect.sh ~/.local/bin/nord_connect
cp exit_node.sh ~/.local/bin/nord_exit_node

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Install peers.json with nord_exit_node.

bash/nord/exit_node.sh loads peers.json from the directory that contains the installed command. This change copies only the script, so nord_exit_node fails with “Peers configuration file not found” after a clean installation.

Copy the configuration file to the same directory, or change the script to use a documented configuration path.

Proposed fix
 cp exit_node.sh ~/.local/bin/nord_exit_node
+cp peers.json ~/.local/bin/peers.json
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
cp exit_node.sh ~/.local/bin/nord_exit_node
cp exit_node.sh ~/.local/bin/nord_exit_node
cp peers.json ~/.local/bin/peers.json
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/copy_scripts.sh` at line 17, Update the installation flow around
copy_scripts.sh so peers.json is installed alongside nord_exit_node in
~/.local/bin, preserving exit_node.sh’s lookup behavior and ensuring clean
installations can find the peer configuration.

cp list_peers.sh ~/.local/bin/nord_list_peers
cp login.sh ~/.local/bin/nord_login
cp logout.sh ~/.local/bin/nord_logout
Expand Down
107 changes: 0 additions & 107 deletions bash/nord/exit_node.sh

This file was deleted.