Add the next_hop script.
This script determines the next hop for a packet leaving this machine destined for the given address.
This commit is contained in:
parent
04ede4bfee
commit
ea133ded21
@ -15,6 +15,14 @@
|
||||
# "2001:4860:4860::8844#dns.google"
|
||||
# "2001:4860:4860::8888#dns.google"
|
||||
|
||||
let
|
||||
patchScriptBin =
|
||||
filename: contents:
|
||||
((pkgs.writeScriptBin filename contents).overrideAttrs (old: {
|
||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||
}));
|
||||
next_hop = (patchScriptBin "next_hop" (builtins.readFile ./files/next_hop_linux.bash));
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@ -88,6 +96,7 @@
|
||||
arp-scan # To find devices on the network
|
||||
wavemon
|
||||
dhcpcd # For Android USB tethering.
|
||||
next_hop
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
exec ip route get "${@}"
|
||||
Loading…
x
Reference in New Issue
Block a user