diff --git a/.bin/dexec_browser b/.bin/dexec_browser index b7c9dcf..0c07e6c 100755 --- a/.bin/dexec_browser +++ b/.bin/dexec_browser @@ -12,7 +12,7 @@ . ${HOME}/.bin/_config -BROWSER=luakit +BROWSER=Firefox HISTFILE="${HOME}/.browser_history" touch "${HISTFILE}" diff --git a/.bin/obsdmake b/.bin/obsdmake index 45c668d..8e91b0c 100755 --- a/.bin/obsdmake +++ b/.bin/obsdmake @@ -7,6 +7,7 @@ trap abort 1 2 3 6 9 11 abort() { echo "Abort with >$0 $ARGS< on $(date)" >> /tmp/obsdmake.log; } JOBS="${JOBS:=$(sysctl -n hw.ncpuonline)}" +JOBS=1 LOG="/tmp/obsdmake.log" diff --git a/.bin/tailscale-tunnel-client b/.bin/tailscale-tunnel-client index decbe39..df4d729 100755 --- a/.bin/tailscale-tunnel-client +++ b/.bin/tailscale-tunnel-client @@ -3,5 +3,4 @@ doas tailscale up \ --reset \ --accept-dns=true \ - --accept-routes \ --exit-node=dalek diff --git a/.kshrc b/.kshrc index 8e14357..b73d8aa 100644 --- a/.kshrc +++ b/.kshrc @@ -241,6 +241,43 @@ alias portroach="portroach-cli -m codevoid" alias ugrep="\ugrep -nI --exclude=tags --exclude=.tags --exclude='cscope.*'" alias tarsnap="doas \tarsnap" alias ts="doas tailscale" +ts-configure() {( + set -x + ts up \ + --reset \ + --exit-node=dalek \ + --accept-dns=false \ + --accept-routes=true \ + --advertise-connector=false \ + --advertise-exit-node=false \ + --report-posture \ + --exit-node-allow-lan-access=false \ + --shields-up=false + )} +ts-up() { + route4=$(route -n show -inet | grep -E "default.*trunk0" | awk '{ print $2 }') + if [ ! -z "$route4" ] + then + echo "$route4" > /tmp/ts.route4.backup + doas route del -inet default $route4 + fi + route6=$(route -n show -inet6 | grep -E "default.*trunk0" | awk '{ print $2 }') + if [ ! -z "$route6" ] + then + echo "$route6" > /tmp/ts.route6.backup + doas route del -inet6 default $route6 + fi + ts up + doas route add -inet default $(ifconfig tun0 inet | grep inet | awk '{ print $2 }') + doas route add -inet6 default $(ifconfig tun0 inet6 | grep inet6 | tail -1 | awk '{ print $2 }') +} +ts-down() { + ts down + doas route del -inet default $(ifconfig tun0 inet | grep inet | awk '{ print $2 }') + doas route del -inet6 default $(ifconfig tun0 inet6 | grep inet6 | tail -1 | awk '{ print $2 }') + doas route add -inet default $(< /tmp/ts.route4.backup) + doas route add -inet6 default $(< /tmp/ts.route6.backup) +} mystuff() { cd /usr/ports/mystuff