This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Script for migrating OpenVPN variables in NVRAM for FreshTomato. | |
| # Converts old variable names to new ones used in version 2026.1+ | |
| # | |
| # Copyright 2026 pedro | |
| # https://freshtomato.org/ | |
| # | |
| # Short HOWTO: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ash | |
| # shellcheck shell=dash | |
| set -eu # Exit on error or undefined variable | |
| # (borrowed from: https://github.com/rveznaver/pia-freshtomato) | |
| # requirements: | |
| # - FreshTomato >= 2025.5 or some Linux distro | |
| # - wg kernel module for WireGuard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # wg.sh ver 1.22 - rs232 - 03/23 | |
| # DO NOT EDIT THIS FILE! | |
| # All the config is placed in the wg0.conf and you can produce this automatically via "wg.sh makeconf" | |
| export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/root | |
| PID=$$ | |
| black="\033[0;40m" | |
| grey="\033[0;5;238m" | |
| green="\033[48;2;32m" | |
| alias logw='logger -p WARN -t wg-sh[$PID]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo | |
| echo "######################## Filter (default) table: #######################" | |
| iptables -t filter -vnL --line-numbers | |
| echo | |
| echo "######################## Nat table: ########################" | |
| iptables -t nat -vnL --line-numbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| TESTS=1 | |
| CPUS=`cat /proc/cpuinfo | grep -c processor` | |
| if [[ ${CPUS} -gt 1 ]]; then TESTS=`expr "${TESTS} ${CPUS}"`; fi | |
| echo "aes-256-cbc:" | |
| for THREADS in ${TESTS} | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/root | |
| # | |
| # Script to generate server/client(s) keys for openvpn | |
| # Use it on FreshTomato router | |
| # | |
| # Copyright (C) 2024 pedro | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # USE AT YOUR OWN RISK. | |
| # THIS SCRIPT DOES NOT COME WITH ANY WARRANTY WHATSOEVER. | |
| # | |
| # Backs up selected nvram variables; import them just by running the resulting script. | |
| # Should work equally well with both MIPS and ARM builds. | |
| # | |
| # Thanks to ryzhov_al for basic approach. | |
| # |