This file contains 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 | |
# v0.1 Avinash H. Duduskar <strykar@live.com> | |
# This adjusts OpenWRT SQM settings by re-calculating up/down bandwidth | |
# Needs the Speedtest.net CLI binary - https://www.speedtest.net/apps/cli | |
# Call this script every 4 or 6 hours via cron | |
set -euf -o pipefail | |
_sqm_int="queue" # Your actual wan interface: ifstatus wan | grep -e l3_device | |
_pul="90" # Percentage of wan upload speed to set, 90-95 is good | |
_pdl="95" # Percentage of wan download speed to set, 90-95 is good |
This file contains 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
[weechat] | |
filter = | |
enabled = false | |
banaction = nftables | |
action = nftables-allports[name=weechat] | |
backend = auto | |
logpath = /home/user/.local/share/weechat/logs/core.weechat.weechatlog | |
logencoding = utf-8 | |
port = 9000 | |
protocol = tcp |
This file contains 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
# | |
# Copyright (C) 2006-2015 OpenWrt.org | |
# | |
# This is free software, licensed under the GNU General Public License v2. | |
# See /LICENSE for more information. | |
# | |
include $(TOPDIR)/rules.mk | |
PKG_NAME:=ncurses |
This file contains 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
Based on https://miloserdov.org/?p=659 | |
Hardware: | |
- TP-Link TL-WN722N + TP-Link TL-ANT2408CL | |
- Raspberry Pi 3 | |
1.) Get Archlinux für Raspberry | |
RaspArch Build 181117 (http://raspex.exton.se/?p=983) | |
Download (https://sourceforge.net/projects/rasparch/files/latest/download) |
This file contains 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/bash -x | |
set -euf -o pipefail | |
# Test if sudo exists, comment out if sudo isn't installed | |
command -v sudo >/dev/null 2>&1 || { printf 'I require to be run as root, or sudo to be installed. Aborting. \n' >&2; exit 1; } | |
# Setting gateway's needs root privileges, elevate with sudo, tested on kernel 5.8.5-arch1-1. | |
# Comment out if script is called as root | |
if [ "$EUID" != 0 ]; then | |
sudo "${BASH_SOURCE[0]}" "$@" |
This file contains 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/bash | |
# Acme.sh reloadcmd file | |
set -euf -o pipefail | |
# Setup the TLS file the way Weechat expects it | |
/usr/bin/cat /home/strykar/.acme.sh/i5.xxx.in/i5.xxx.in.key > /home/strykar/.config/weechat/ssl/relay.pem | |
/usr/bin/cat /home/strykar/.acme.sh/i5.xxx.in/fullchain.cer >> /home/strykar/.config/weechat/ssl/relay.pem | |
# Run the /relay sslcertkey command via Weechat's FIFO to reload the new cert | |
# Weechat's FIFO plugin must be loaded and running |
This file contains 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
[Unit] | |
Description=AutoSSH service to remotely access signald's unix socket for weechat's signal.py (/smsg +145789323231) | |
After=network-online.target | |
# Use this instead if autossh will interact with the local SSH server | |
# After=network-online.target sshd.service | |
[Service] | |
Environment="AUTOSSH_GATETIME=30" | |
Environment="AUTOSSH_POLL=30" | |
Environment="AUTOSSH_FIRST_POLL=30" |
This file contains 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
#BadTCP | |
tcp.analysis.flags && ! tcp.analysis.window_update | |
#TCP header length is less than 28 and has the SYN flag enabled | |
(tcp.hdr_len < 28) && (tcp.flags.syn == 1) | |
#TCP stream time delta < 1s and packet does not have the RST/FIN flag set and no HTTP GET [&& (http.request.method != "GET")] | |
#Plot I/O chart vs tcp.time_delta | |
(tcp.time_delta > 1) && (tcp.flags.reset == 0) && (tcp.flags.fin == 0) | |
(tcp.time_delta > .5) && (tcp.flags.reset == 0) && (tcp.flags.fin == 0) |
This file contains 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/sbin/nft -f | |
## vim: ft=pf | |
flush ruleset | |
define wan = eth0 | |
define cjd = tun0 | |
define wg_int = wg0 | |
define vpn_gw = 192.168.10.1 | |
define vpn_net = 192.168.10.0/24 | |
define proto_allow = { ah, esp, igmp, ipv6 } |
This file contains 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
2022-04-01 20:52:37,777 - pyradio.radio - INFO - <<<===--- Program start ---===>>> | |
2022-04-01 20:52:37,777 - pyradio.radio - INFO - TUI initialization on python v. 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0] on Arch Linux (AUR) | |
2022-04-01 20:52:37,777 - pyradio.radio - INFO - Terminal supports 256 colors | |
2022-04-01 20:52:37,777 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [4, 0], 'Messages Border': [3, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''} | |
2022-04-01 20:52:37,778 - pyradio.player - INFO - Probing available multimedia players... | |
2022-04-01 20:52:37,778 - pyradio.player - INFO - Implemented players: mpv, mplayer, vlc | |
2022-04-01 20:52:37,779 - pyradio.player - INFO - <class 'pyradio.player.VlcPlayer'> supported. | |
2022-04-01 20:52:37,779 - pyradio.radio - DEBUG - body starts at line 2, ends at line 66 | |
2022-04-01 20:52:37,782 - pyradio.radio - DEBU |